// JavaScript Document
function showImage()
{
if (arguments.length ==1)
{
	//get first argument to str
	var url = arguments[0];
	//create window.open, assign to var
//	var wind = window.open(url,'_blank','width=775px,left=5px,top=10px,scrollbars=1,titlebar=0,toolbar=0,status=0',false)
	var wind = window.open('about:blank','_blank','width=775px,left=5px,top=10px,scrollbars=0,resizable=1,titlebar=0,toolbar=0,status=0',false)
	
	//ensure var is a window, if not, popup blocking is enabled in XPSP2
	//if popup blocking is true, show alert box
	if (wind == null)
	{var ans = confirm("Oops! It appears that popup blocking is enabled.  \n" + 
			"This is inadvertently blocking you from viewing this image.  \n" + 
			"Please add CarrierAnimalHospital.com to your allow list to view the images.  \n" + 
			"If you are running Windows XP SP2 and Internet Explorer, would you like information on how to do so?");
		if (ans ==	true)
			{
			window.location="http://support.microsoft.com/default.aspx?kbid=843016&product=windowsxpsp2";
			}
	}
	wind.document.write("<HTML><HEAD>");
	wind.document.write("<script language='Javascript'>");
	wind.document.write("function closeWin(){window.close();}");
	wind.document.write("function repeatResize(){doResize();setTimeout('repeatResize()',1000);}");
	wind.document.write("function doResize(){");
	wind.document.write("var img = document.getElementById('imgItm');");
	wind.document.write("window.resizeTo(img.width+20,img.height+75);}");
	wind.document.write("</script>");
	wind.document.write("</HEAD><BODY topmargin='0' leftmargin='5' onload='doResize();' onclick='closeWin();'>");
	wind.document.write("<div align='right' style='background-color:#009999;color:#FFFFFF;'><strong>Click anywhere to close window</strong></div>");
	wind.document.write("<img id='imgItm' src='" + url + "'>");
	wind.document.write("<script language='Javascript'>");
	wind.document.write("setTimeout('repeatResize()',500);");
	wind.document.write("</script>");
	wind.document.write("</BODY></HTML>");

//	var w = wind;
//	var d = w.document;
//	var i=d.getElementById('imgItm');
//	wind.resizeTo(i.width+20,i.height+75);
}
}

function doMouseOver()
{

	if (doMouseOver.arguments.length == 1)
		{
			//get first arg as the object it represents
			var pic = document.getElementById(arguments[0]);
			var newStr = pic.src.slice(0,pic.src.length-4);
			newStr=newStr + 'over.gif';
			pic.src=newStr;
			//append the word 'over' to the src of the img 
		}
		//Arguments weren't 1, don't do anything
}

function doMouseOut()
{

	if (doMouseOut.arguments.length == 1)
		{
			//get first arg as the object it represents
			var pic = document.getElementById(arguments[0]);
			var newStr = pic.src.slice(0,pic.src.length-8);
			newStr=newStr + '.gif';
			pic.src=newStr;	
			//remove the word 'over' from the src of the img 
		}
		//Arguments weren't 1, don't do anything
}

