// JavaScript Document
function checkform(){
	
	if (document.myform.YourName.value == ""){
		alert ("Name cannot be empty!");
		document.myform.YourName.focus();
		return false;
	}
	
	if (document.myform.Email.value == ""){
		alert ("Email cannot be empty!");
		document.myform.Email.focus();
		return false;
	}
	 var rule=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (!rule.test(document.myform.Email.value)){

		alert ("Are you sure the email is correct?");
		document.myform.Email.focus();
		return false;
	}
	
	if (document.myform.Message.value == ""){
		alert ("Message cannot be empty!");
		document.myform.Message.focus();
		return false;
	}
}
function check(){
	
	if (document.mailform.name.value == ""){
		alert ("Name cannot be empty!");
		document.mailform.name.focus();
		return false;
	}
	
	if (document.mailform.email.value == ""){
		alert ("Email cannot be empty!");
		document.mailform.email.focus();
		return false;
	}
	if (document.mailform.email.value.indexOf('@')<1 || document.mailform.email.value.indexOf('.')<1){
		alert ("Are you sure the email is correct?");
		document.mailform.email.focus();
		return false;
	}
	
	
}

function showid_zzjs_net(idname){
	var isIE = (document.all) ? true : false;
	var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);
	var newbox=document.getElementById(idname);
	newbox.style.zIndex="9999";
	newbox.style.display="block"
	newbox.style.position = !isIE6 ? "fixed" : "absolute";
	newbox.style.top =newbox.style.left = "50%";
	/*newbox.style.marginTop = window.screen.width / 2 + "px";
	newbox.style.marginLeft = window.screen.height / 2 + "px";*/
	newbox.style.marginTop = - newbox.offsetHeight / 2 + "px";
	newbox.style.marginLeft = - newbox.offsetWidth / 2 + "px";
	var layer=document.createElement("div");
	layer.id="layer";
	layer.style.width=layer.style.height="100%";
	layer.style.position= !isIE6 ? "fixed" : "absolute";
	layer.style.top=layer.style.left=0;
	layer.style.backgroundColor="#000";
	layer.style.zIndex="9998";
	layer.style.opacity="0.6";
	document.body.appendChild(layer);
	/*var sel=document.getElementsByTagName("select");
	for(var i=0;i<sel.length;i++){
		sel[i].style.visibility="hidden";
	}*/
function layer_iestyle(){
	layer.style.width=Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth)
	+ "px";
	layer.style.height= Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) +
	"px";
	layer.style.display="block";
}
function newbox_iestyle(){
	newbox.style.top ="300px";
	newbox.style.left = "50%";
	newbox.style.marginTop = document.documentElement.scrollTop - newbox.offsetHeight / 2 + "px";
	newbox.style.marginLeft = document.documentElement.scrollLeft - newbox.offsetWidth / 2 + "px";
}
if(isIE){layer.style.filter ="alpha(opacity=60)"; layer.style.display="block";}
if(isIE6){
   layer_iestyle();
   newbox_iestyle();
   window.attachEvent("onscroll",function(){
	  newbox_iestyle();
   })
	window.attachEvent("onresize",layer_iestyle)
}
/*function closebox(){newbox.style.display="none";layer.style.display="none";for(var i=0;i<sel.length;i++){
sel[i].style.visibility="visible";
}}*/
}

function closebox(){document.getElementById("www_zzjs_net").style.display="none";  document.getElementById("layer").style.display="none"; document.body.removeChild(document.getElementById("layer")); }
