

//This line gets the thumb nail string.
//alert(strRow01[1].substring(0,strRow01[1].length-4) + '_thumb.jpg');



var strImageHeight = "60";

function writeRow(strRow,strImageHeight,strPicturePath){
  	var strPicture,strThumb;
	var i = 0;

      if (strRow.length > 0){
		document.write("<TR>");
      	for(i=0;i<strRow.length;i++) {
      		if (!(strRow[i] == null)){
         			strThumb = strPicturePath + strRow[i].substring(0,strRow[i].length - 4) + "_thumb.jpg'";
               		strPicture = strPicturePath + strRow[i];
               		//alert(strThumb);		
               		//alert(strPicture);		
               		document.write("<td align='center'><a href='" + strPicture + "'><img border='0' height=" + strImageHeight + " src='" + strThumb + "'></a></td>");
       			}
      	}
		document.write("</TR>");
	}
}

function findRow(strRow){

	if (strRow == strRow01)
		findRow = '01';
	if (strRow == strRow02)
		findRow = '02';
	if (strRow == strRow03)
		findRow = '03';
	if (strRow == strRow04)
		findRow = '04';
	if (strRow == strRow05)
		findRow = '05';
	if (strRow == strRow06)
		findRow = '07';
	if (strRow == strRow08)
		findRow = '08';
	return findRow;
}

function writeRowViewer(strRow,strImageHeight,strPicturePath,strViewer){
  	var strPicture,strThumb,strRowSelected;

	if (strRow == strRow01)
		strRowSelected = '01';
	if (strRow == strRow02)
		strRowSelected = '02';
	if (strRow == strRow03)
		strRowSelected = '03';
	if (strRow == strRow04)
		strRowSelected = '04';
	if (strRow == strRow05)
		strRowSelected = '05';
	if (strRow == strRow06)
		strRowSelected = '06';
	if (strRow == strRow07)
		strRowSelected = '07';
	if (strRow == strRow08)
		strRowSelected = '08';
	if (strRow == strRow09)
		strRowSelected = '09';

	var i = 0;
      if (strRow.length > 0){
		document.write("<TR>");
      	for(i=0;i<strRow.length;i++) {
      		if (!(strRow[i] == null)){
         			strThumb = strPicturePath + strRow[i].substring(0,strRow[i].length - 4) + "_thumb.jpg'";
               		strPicture = strPicturePath + strRow[i];

		
//               		document.write("<td align='center'><a target=_blank href=" + strViewer + "?uid=" + strRowSelected + "0" + i + "><img border='0' height=" + strImageHeight + " src='" + strThumb + "'></a></td>");
               		document.write("<td align='center'><a href=javascript:displayOpenWindow('" + strViewer + "?uid=" + strRowSelected + "0" + i + "');><img border='0' height=" + strImageHeight + " src='" + strThumb + "'></a></td>");
       			}
      	}
		document.write("</TR>");
	}
}

function writeTitle(strTitle){
	document.write("<font size=+2 >" + strTitle + "</font>")
}

function displayOpenWindow(strLocation) {    
  var options = "width=600,height=500,";
  options += "resizable=no,scrollbars=no,status=no,";
  options += "menubar=no,toolbar=no,location=no,directories=no,hotkeys=no";

  quickLinksWin = window.open(strLocation, '_blank', options);
  quickLinksWin.focus();}
