function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
window.attachEvent("onload", correctPNG);

function newwindow(thiswindow){
	window.open(thiswindow,'','height=600,width=800,toolbar=yes,scrollbars=yes,resizable=yes');
}

//*********contact form validation****************

function validates(kevin) {
if (kevin.contact_last_name.value==""||kevin.contact_last_name.value==null)
{window.alert("Please Enter a Correct Value for Your Last Name");
return false;}

if (kevin.contact_first_name.value==""||kevin.contact_first_name.value==null)
{window.alert("Please Enter a Correct Value for Your First Name");
return false;}

if (kevin.contact_email.value==""||kevin.contact_email.value==null)
{window.alert("Please Enter a Correct Value for Your Email Address");
return false;}
}

//***********facilities images*******************

function facilitesimage(image,dim){
if (dim=="L"){
	x=600;
	y=400;
}else{
	x=400;
	y=600;
}
newwin=window.open('','newwin','width='+x+',height='+y+',scrollbars=0,menubars=0,toolbars=0,location=0,directories=0,status=0,top=0,left=0');
newwin.resizeTo(x,y+50);
newwin.document.open();
newwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n');
newwin.document.write('"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
newwin.document.write('\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
newwin.document.write('<meta http-equiv="Imagetoolbar" content="no" />\n');
newwin.document.write('<title>Shelter Images</title>\n');
newwin.document.write('</head>');
newwin.document.write('<body style="margin:0;padding:0">\n<img src="'+image+'" width="'+x+'" height="'+y+'" />');
newwin.document.write('\n</body></html>');
newwin.document.close();
newwin.focus();
}