function correctPNG() 
{
   for(var i=0; i<document.images.length; i++)
   {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase();
	  if( (img.src.indexOf("google.com") >= 0) || (img.src.indexOf("maps.gstatic") >= 0) ){
			//IF the images are from google server dont apply pngfix						
		}
		else{
			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
					  }
		}
			
   }
}
try{
	window.attachEvent("onload", correctPNG); 
}catch(err){
}

//validation for contact form
function validateform(contact){
//alert("dddd");
if ( (contact.Name.value == ""))
  {
      alert("Please Enter the Name");
	  document.contact.Name.focus();
      return false;
  }
  if ( (contact.Company.value == ""))
  {
      alert("Please Enter the Company Name");
	  document.contact.Company.focus();
      return false;
  }
  if ( (contact.Phone.value == ""))
  {
      alert("Please Enter the Phone Number");
	  document.contact.Phone.focus();
      return false;
  }
  var Phone=contact.Phone;
  if(Phone.value!=""){
  		phoneVal = Phone.value;
		if(phoneVal.match(/[^0-9\-\s\+]/g)){ 
			alert("Please enter valid Phone Number.");
			Phone.value="";
			Phone.focus();
			return false;
		} 
		if(phoneVal.length<=7){
			alert("Please enter valid Phone Number.");
			Phone.value="";
			Phone.focus();
			return false;
		}
		/*if(phoneVal.length>=15){
			alert("Please enter valid Phone Number.");
			Phone.value="";
			Phone.focus();
			return false;
		}*/
  	}
	else{
			alert("Please give the Phone Number.");
			return false;
	} 
  if ( (contact.Email.value == ""))
  {
      alert("Please Enter the Email ID");
	  document.contact.Email.focus();
      return false;
  }
  if ( (contact.Email.value.indexOf("@") == -1) || (contact.Email.value.indexOf(".") == -1) )
  {
    alert("Please enter a valid E-mail address.");
    contact.Email.select( );
    contact.Email.focus( );
    return false;
  }
  if ( (contact.Subject.value == ""))
  {
      alert("Please Enter the Subject");
	  document.contact.Subject.focus();
      return false;
  }
  if ( (contact.Message.value == ""))
  {
      alert("Please Enter the Message");
	  document.contact.Message.focus();
      return false;
  }
  
}