function sendMailTo(name,company,cn){
	this.name=name || 'sales';
	this.company=company || 'zongyi';
	this.cn=cn || 'cn';
	location.replace('mailto:'+this.name+'@'+this.company+'.'+this.cn);
}

function set_bg_fun(){
				var bodyObj=document.getElementsByTagName('body')[0];
				var imgObj=document.getElementById('imgList').getElementsByTagName('img');

				var num=Math.ceil(Math.random()*imgObj.length);
				bodyObj.style.background='url('+imgObj[num].src+')';
}
function set_bg_one_fun(){
				var bodyObj=document.getElementsByTagName('body')[0];
				var imgObj=document.getElementById('imgDetail').getElementsByTagName('img');
				var str=imgObj[0].src.replace('.jpg','');
				imgObj[0].style.width=imgObj[0].offsetWidth>460 ? '460px':imgObj[0].offsetWidth+'px';
				bodyObj.style.background='url('+str+'_small.jpg)';
}

window.onload=function(){
	try{
		set_bg_one_fun();	
	}catch(e){}
}
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 $crt(o,t){
	t=document.createElement(t);
	return (typeof(o)=='object')?o.appendChild(t):$(o).appendChild(t);
}
function zh(){
	var bo=document.body || document.documentElement;
	var div1=bo.getElementsByTagName('div')[0];
	var createObj=document.createElement('div');
	var newObj=bo.insertBefore(createObj,div1);
	var newObjStyle={
		clear:'both',
		height:'58px',
		marginBottom:'20px',
		textAlign:'center',
		background:'url(/images/zhanhui_bg.gif) repeat-x'
	}
	for(var i in newObjStyle){
		newObj.style[i]=newObjStyle[i];	
	}
	newObj.innerHTML='<a href=http://www.zongyi.cn/2010.html><img src=/images/zhanhui.jpg /></a>';
}