// JavaScript Document
function autofitpopup2(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop,Category,Code,Name,Size,Material,Weight,Text) {  
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=1,resizable=1,menubar=1,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
	newWindow.document.write('<html><head><title>'+alt+'</title><META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\">\n'); 
	newWindow.document.write('</head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" >\n');
	newWindow.document.write("<script src=\"wz_dragdrop.js\" language=\"JavaScript\"><\/script>\n");
	if (imageName!='') {
		newWindow.document.write("<div id=\"container\" style=\"position:relative;\">\n");
		newWindow.document.write("<table cellpadding=\"0\">\n");
		newWindow.document.write("<tr>\n");
		newWindow.document.write("<td>\n");
		newWindow.document.write('<img align=\"left\" name=\"'+Code+'\" src=\"'+imageName+'\" title=\"Left click and drag image\">');
		newWindow.document.write("</td>\n");
		newWindow.document.write("</tr>\n");
		newWindow.document.write("</table>\n");
		newWindow.document.write("</div>\n");
	}
	if (Code!='') {newWindow.document.write('<br>Product code: '+Code+'<br>\n');}
	if (Name!='') {newWindow.document.write('Description: '+Category+' - '+Name+'<br>\n');}
	if (Size!='') {newWindow.document.write('Size: '+Size+'<br>\n');}
	if (Material!='') {newWindow.document.write('Material: '+Material+'<br>\n');}
	if (Weight!=0) {newWindow.document.write('Shipping weight: '+Weight+' kg<br>\n');}
	if (Text!='') {newWindow.document.write(Text+'<br>\n');}
	
	//SET_DHTML(CURSOR_MOVE, Code);
	
	newWindow.document.write("<script language=\"JavaScript\">\n");
	newWindow.document.write("<!--\n");
	preload();
	//newWindow.document.write("SET_DHTML(CURSOR_MOVE, \""+Code+"\");");
	newWindow.document.write("//-->");
	newWindow.document.write("\n<\/script>\n");
	
	//newWindow.document.write("<script language=\"JavaScript\" type=\"text/javascript\">SET_DHTML(CURSOR_MOVE, \""+Code+"\");</script\>");
	
	
	newWindow.document.write("</body>\n");
	newWindow.document.write("</html>");
	
	newWindow.document.close();
	newWindow.focus();
}


function autofitpopup(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop,Category,Code,Name,Size,Material,Weight,Text) {  
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=1,resizable=1,menubar=0,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><head><title>'+alt+'</title><META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\">\n'); 
	newWindow.document.write('</head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" >\n');
	if (imageName!='') {newWindow.document.write('<img src=\"'+imageName+'\">');}
	if (Code!='') {newWindow.document.write('<br>Product code: '+Code+'<br>');}
	if (Name!='') {newWindow.document.write('Description: '+Category+' - '+Name+'<br>');}
	if (Size!='') {newWindow.document.write('Size: '+Size+'<br>');}
	if (Material!='') {newWindow.document.write('Material: '+Material+'<br>');}
	if (Weight!=0) {newWindow.document.write('Shipping weight: '+Weight+' kg<br>');}
	if (Text!='') {newWindow.document.write(Text+'<br>');}
	newWindow.document.write('<br></body> </html>');
	newWindow.document.close();
	newWindow.focus();
}





//
function preload() {
  if (!document.images) return;
  var ar = new Array();
  var arguments = preload.arguments;
  for (var i = 0; i < arguments.length; i++) {
    ar = new Image();
    ar.src = arguments;
  }
}





