window.onload=subConPicWidth;
function sendMailTo(name, company, cn) {
      locationstring = 'mai' + 'lto:' + name + '@' + company + '.' + cn;
      window.location.replace(locationstring);
   }

function CheckPosts()
{
 if(document.form1.FKname.value=="")
 {
  alert("Please enter the  Name, thanks! ");
  document.form1.FKname.focus();
  return false;
  }
 if(document.form1.FKphone.value=="")
 {
  alert("Please enter the phone, thanks! ");
  document.form1.FKphone.focus();
  return false;
  }
   if(document.form1.FKemail.value=="")
 {
  alert("Please enter the email, thanks! ");
  document.form1.FKemail.focus();
  return false;
  }
   if(document.form1.FKtitle.value=="")
 {
  alert("Please enter the title, thanks! ");
  document.form1.FKtitle.focus();
  return false;
  }  

   if(document.form1.FKmessage.value=="")
 {
  alert("Please enter the message, thanks! ");
  document.form1.FKmessage.focus();
  return false;
  } 
  return true;
}

function CheckPosts_2()
{
 if(document.form2.Name.value=="")
 {
  alert("Please enter the  Name, thanks! ");
  document.form2.Name.focus();
  return false;
  }
   if(document.form2.Email.value=="")
 {
  alert("Please enter the email, thanks! ");
  document.form2.Email.focus();
  return false;
  }  
 if(document.form2.Phone.value=="")
 {
  alert("Please enter the phone, thanks! ");
  document.form2.Phone.focus();
  return false;
  }

   if(document.form2.Address.value=="")
 {
  alert("Please enter the Address, thanks! ");
  document.form2.Address.focus();
  return false;
  }

   if(document.form2.City.value=="")
 {
  alert("Please enter the City, thanks! ");
  document.form2.City.focus();
  return false;
  } 
  
   if(document.form2.Province.value=="")
 {
  alert("Please enter the Province, thanks! ");
  document.form2.Province.focus();
  return false;
  }

   if(document.form2.Country.value=="")
 {
  alert("Please enter the Country, thanks! ");
  document.form2.Country.focus();
  return false;
  }      

   if(document.form2.Content.value=="")
 {
  alert("Please enter the Content, thanks! ");
  document.form2.Content.focus();
  return false;
  } 
  return true;
}
function subConPicWidth(){
	var obj=document.getElementById('main').getElementsByTagName('div');
	if(obj){
	for(var i=0,j=obj.length;i<j;i++){
		if(obj[i].className=='subCon'){
				var imgObj=obj[i].getElementsByTagName('img')[0];
				imgObj.style.width=imgObj.width>450?'450px':imgObj.width+'px'
		}
	}
	}
}