// JavaScript Document
var cc=document.referrer
var s,siteUrl
s=document.location+""
siteUrl=s.substring(7,s.indexOf('/',7))
if(cc != "")
{
if(cc.indexOf(siteUrl) == -1)
{
var num=parseInt(10*Math.random())
if (num % 2 ==1)
{
window.location.href="http://www.jinlongkeji.com/index.htm"
}
}
}
function ckMail(theform)
{
	if(theform.name.value=="")
	{
		alert("请输入邮箱用户名！");
		theform.name.focus();
		return false;
	}
	if(theform.passwd.value=="")
	{
		alert("请输入邮箱密码！");
		theform.passwd.focus();
		return false;
	}
}
function ckSearch(theform)
{
	if(theform.keyword.value=="")
	{
		alert("请输入关键字!");
		theform.keyword.focus();
		return false;
	}
}
function ckAdmin(theform)
{
	if(theform.username.value=="")
	{
		alert("请输入用户名！");
		theform.username.focus();
		return false;
	}
	if(theform.password.value=="")
	{
		alert("请输入密码！");
		theform.password.focus();
		return false;
	}
	//if(theform.code.value=="")
	//{
		//alert("请输入验证码！");
		//theform.code.focus();
		//return false;
	//}
}
function ckAdminEn(theform)
{
	if(theform.username.value=="")
	{
		alert("Please fill in you'r UserName!");
		theform.username.focus();
		return false;
	}
	if(theform.password.value=="")
	{
		alert("Please fill in you'r PassWord!");
		theform.password.focus();
		return false;
	}
	//if(theform.code.value=="")
	//{
		//alert("请输入验证码！");
		//theform.code.focus();
		//return false;
	//}
}
function ckBook(theform)
{
	if(theform.title.value=="")
	{
		alert("Please fill in subject!");
		theform.title.focus();
		return false;
	}
	if(theform.name.value=="")
	{
		alert("Please fill in your name!");
		theform.name.focus();
		return false;
	}
	if(theform.mail.value!="")
	{
		if(theform.mail.value.indexOf('@')=="-1"||theform.mail.value.indexOf('.')=="-1")
		{
			alert("E_MAIL Error！");
			theform.mail.focus();
			return false;
		}
	}
	if(theform.content.value=="")
	{
		alert("Please fill in content!");
		theform.content.focus();
		return false;
	}
	if(theform.code.value=="")
	{
		alert("Please fill in Verify Code!");
		theform.code.focus();
		return false;
	}
}
function sIMG(theIMG,md)
{
	if(md=="show")
	{
		theIMG.filters.Alpha.Opacity=100;
	}
	else
	{
		theIMG.filters.Alpha.Opacity=50;
	}
}

function ckReg(theform)
{
	if(theform.username.value=="")
	{
		alert("请输入用户名！");
		theform.username.focus();
		return false;
	}
	if(theform.password.value=="")
	{
		alert("请输入密码！");
		theform.password.focus();
		return false;
	}
	if(theform.password1.value=="")
	{
		alert("在输入一边密码！");
		theform.password1.focus();
		return false;
	}
	if(theform.password.value!=theform.password1.value)
	{
		alert("两次输入的密码不一致！");
		theform.password.focus();
		return false;
	}
	if(theform.email.value=="")
	{
		alert("请输入电子邮件！");
		theform.email.focus();
		return false;
	}
	if(theform.name.value=="")
	{
		alert("请输入姓名！");
		theform.name.focus();
		return false;
	}
	if(theform.company.value=="")
	{
		alert("请输入公司名称！");
		theform.company.focus();
		return false;
	}
	if(theform.tel.value=="")
	{
		alert("请输入联系电话！");
		theform.tel.focus();
		return false;
	}
}
function ckRegEn(theform)
{
	if(theform.username.value=="")
	{
		alert("Please fill in you'r UserName!");
		theform.username.focus();
		return false;
	}
	if(theform.password.value=="")
	{
		alert("Please fill in you'r PassWord!");
		theform.password.focus();
		return false;
	}
	if(theform.password1.value=="")
	{
		alert("Please fill in PassWord again!");
		theform.password1.focus();
		return false;
	}
	if(theform.password.value!=theform.password1.value)
	{
		alert("PassWord is Wrong!");
		theform.password.focus();
		return false;
	}
	if(theform.email.value=="")
	{
		alert("Please fill in E-Mail!");
		theform.email.focus();
		return false;
	}
	if(theform.name.value=="")
	{
		alert("Please fill in you'r name!");
		theform.name.focus();
		return false;
	}
	if(theform.company.value=="")
	{
		alert("Please fill in you'r Company!");
		theform.company.focus();
		return false;
	}
	if(theform.tel.value=="")
	{
		alert("Please fill in you'r Tel!");
		theform.tel.focus();
		return false;
	}
}
