function openWindow(imageName,imageWidth,imageHeight,alt)
{
	doneit=0;
	if((imageHeight==0)&&(imageWidth==0))
	{
		newWindow = window.open("tatfaq.html","faqWin","width=368,height=350,top=100,left=100,scrollbars=yes");
		newWindow.focus();
		doneit=1;
	}
	if((imageHeight==1)&&(imageWidth==1))
	{
		newWindow = window.open("subfaq.html","subWin","width=368,height=350,top=100,left=100,scrollbars=yes");
		newWindow.focus();
		doneit=1;
	}	
	if(!doneit)
	{
		h=screen.availHeight;
		w=screen.availWidth;
		tmph=parseInt(imageHeight, 10);
		tmpw=parseInt(imageWidth, 10);	
		features="";
		w=w-20;
		h=h-50;
		cut=0;
		
		if(tmpw>w)
			cut=1;
		if(tmph>h)
		{
			if(!cut)
				cut=2;
			else
				cut=3;
		}
		
		if(cut==1)
			features="width="+w+",height="+(tmph+18)+",top=0,left=0,scrollbars=yes";
		if(cut==2)
			features="width="+(tmpw+18)+",height="+h+",top=0,left=0,scrollbars=yes";
		if(cut==3)
			features="width="+w+",height="+h+",top=0,left=0,scrollbars=yes";
		if(cut==0)
			features="width="+imageWidth+",height="+imageHeight+",top=50,left=50";

		newWindow = window.open("","newWindow",features);
		newWindow.document.open();
		newWindow.document.write('<HTML>\n<head>\n<TITLE>'+alt+'</TITLE>\n</head>\n<BODY bgcolor=\"#FFFFFF\" LEFTMARGIN=\"0\" TOPMARGIN=\"0\" MARGINHEIGHT=\"0\" MARGINWIDTH=\"0\">');
		newWindow.document.write('\n<IMG SRC=\"'+imageName+'\" WIDTH='+imageWidth+' HEIGHT='+imageHeight+' ALT=\"'+alt+'\">');
		newWindow.document.write('\n</BODY></HTML>');
		newWindow.document.close();
		newWindow.focus();
	}
}



/*		features="width="+imageWidth+",height="+imageHeight+",top=50,left=50";
		
		if((tmpw>(w-20)) && (tmph>(h-50)))
		{
			features="width="+(w-20)+",height="+(h-50)+",top=0,left=0,scrollbars=yes";
		}
		if((tmpw>(w-20)) && (tmph<=(h-50)))
		{
			features="width="+(w-20)+",height="+(tmph+18)+",top=0,left=0,scrollbars=yes";
		}
		if((tmpw<=(w-20)) && (tmph>(h-50))
		{
			features="width="+(tmpw+18)+",height="+(h-50)+",top=0,left=0,scrollbars=yes";
		}
*/