


function picObject (src, width, height, alt, fullsize) {
this.src = src;
this.width = width;
this.height = height;
this.alt = alt;
this.fullsize = fullsize;
}

function iconObject (src, alt, url, title, subtitle, descript) {
this.src = src;
this.alt = alt;
this.url = url;
this.title = title;
this.subtitle = subtitle;
this.descript = descript;
}



function showFullSize(picNum) {
var thePic = picArray[picNum];
var htmltext = ("<html><body><div align=\"center\" style=\"margin-top:3px;margin-bottom:6px;\"><a href=\"javascript:window.close();\" style=\"font-size:10px;\">Close Window</a><\/div><div align=\"center\"><img src=\"" + imgServer + "/images/eng/products/fullsize/" + thePic.src + "\" border=\"1\"\"><\div><\/body><\/html>");
var newWindow = writeWindow('FullSizeImage', this.window, htmltext, '', true);
return(false);
}


function showPic(picType, picNum) {
	if (picType == "image") {
		var theCanvas = document.getElementById('divCanvas');
		var thePic = picArray[picNum];
		var outString = "";
		if (theCanvas) {
			if (thePic.fullsize == true) {
				outString += ("<a href=\"javascript: jQuery.facebox(\'<img src=" + imgServer + "/images/eng/products/fullsize/" + thePic.src + ">\');\">");
			}
			outString += ("<img src=\"" + imgServer + "/images/eng/products/image/" + thePic.src + "\" name=\"picCanvas\" border=\"0\" width=\"" + thePic.width + "\" height=\"" + thePic.height + "\">");
			if (thePic.fullsize == true) {
				outString += ("<\/a>");
			}
			if (thePic.fullsize == true) {
				var enlargeMessage = document.getElementById('enlargeMessageDiv');
				enlargeMessage.innerHTML = ("<a href=\"javascript: jQuery.facebox(\'<img src=" + imgServer + "/images/eng/products/fullsize/" + thePic.src + ">\');\">View Full Size</a><br/>" + thePic.alt);
			} else {
				var enlargeMessage = document.getElementById('enlargeMessageDiv');
				enlargeMessage.innerHTML = (thePic.alt);
			}
			
			theCanvas.innerHTML = outString;
			
		}
		
		//if (document.images['picCanvas']) {
		//	if (document.images['picCanvas'].src != thePic.src) {
		//		document.images['picCanvas'].src = imgServer + "/images/eng/products/image/" + thePic.src;
		//		document.images['picCanvas'].width = thePic.width;
		//		document.images['picCanvas'].height = thePic.height;
		//		document.images['picCanvas'].alt = thePic.alt;
		//	}
		//}
		
		//alert("outstring is " + outString);
		
		var canvasIndex = 1;
		var canvasBlankIndex = 2;
		if (maxImgW > 275) {
			canvasIndex = 2;
			canvasBlankIndex = 1;
		}
		var theCanvasName;		
		theCanvasName = "descriptCanvas" + canvasBlankIndex;
		theCanvas = document.getElementById(theCanvasName);
		if (theCanvas) {
			theCanvas.innerHTML = "";
		}
	}
	
	if (picType == "icon") {
		var canvasIndex = 1;
		var canvasIndexDescript = 2;
		var canvasBlankIndex = 1;
		var thePic = iconArray[picNum];
		var theCanvasName;
		theCanvasName = "divCanvas";
		theCanvas = document.getElementById(theCanvasName);
		theCanvas.innerHTML = getIconHTML(picNum);
	}
return(false);
}



function getIconHTML(picNum) {
var thePic = iconArray[picNum];
var tmptxt = "";
tmptxt += ("<div class=\"contentbox\" style=\"border-width:1px;width:" + (maxImgW-20) + "px;\">");
tmptxt += ("<table border=0 cellpadding=0 cellspacing=0>");
tmptxt += ("<tr>");
tmptxt += ("<td width=\"" + thePic.width + "\" valign=\"top\" align=\"center\"><img src=\"" + imgServer + "\/images\/eng\/general\/" + thePic.src + "\" vspace=\"5\" hspace=\"5\"></td>");
tmptxt += ("<td width=\"100%\" valign=\"top\" align=\"left\">");
tmptxt += ("<div style=\"line-height:18px;font-family:trebuchet ms,arial;font-weight:bold;font-size:18px;padding-left:3px;padding-right:3px;\">" + thePic.title + "<\/div>");
tmptxt += ("<DIV style=\"font-size:11px;font-style:italic;margin-bottom:6px;\">" + thePic.subtitle + "<\/DIV></td>");
tmptxt += ("</tr>");
tmptxt += ("<tr><td colspan=2>");
tmptxt += ("<div align=\"left\" style=\"font-size:10px;\">" + thePic.descript + "<\/div>");

if (thePic.url != "") {
	tmptxt += ("<div style=\"font-size:10px;\" align=\"right\"><a href=\"" + thePic.url + "\" target=\"_blank\" onClick=\"return popWindow('IconInfo', this.window, \'" + thePic.url + "\', 'width=600,height=400,scrollbars=yes');\">Read More...<\/a><\/div>");
}

tmptxt += ("<\/div></td></tr></table>");
return(tmptxt);
}














function overThumb(picType, picNum) {
	if (picType == "image") {
		var picName = ("thumb" + picNum);
		//document.images[picName].width = 110;
		//document.images[picName].height = 110;
		//document.images[picName].border = 3;
		//document.images[picName].hspace = 3;
		//document.images[picName].vspace = 3;
	}
	
	if (picType == "icon") {
		var picName = ("icon" + picNum);
		//document.images[picName].border = 3;
	}
}


function outThumb(picType, picNum) {
	if (picType == "image") {
		var picName = ("thumb" + picNum);
		//document.images[picName].width = 60;
		//document.images[picName].height = 60;
		//document.images[picName].border = 1;
	}
	
	if (picType == "icon") {
		var picName = ("icon" + picNum);
		//document.images[picName].border = 1;
	}
}


