function getInewsImg(thisind)
{
	var img1 = "";

	pageURL = location.href;
	pageWOhttp = pageURL.substring(7,pageURL.length);
	var strokeL = new Array(10)
	j = 0
	
	for (i=0; i < pageWOhttp.length; i++)
	{
		if (pageWOhttp.charAt(i) == "/")
			strokeL[j++] = i
	}
	
	// Automobile
	if (thisind == 1)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/autoimg.jpg\" border=0>";
	}

	// Plastic
	else if (thisind == 3)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/plasticimg.jpg\" border=0>";
	}

	// Textile
	else if (thisind == 4)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/textileimg.jpg\" border=0>";
	}

	// Packaging
	else if (thisind == 5)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/packimg.jpg\" border=0>";
	}
	
	// Machinery
	else if (thisind == 6)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/macimg.jpg\" border=0>";
	}
			
	return img1;
}

function getInewsTitleImg(thisind)
{
	var img1 = "";

	pageURL = location.href;
	pageWOhttp = pageURL.substring(7,pageURL.length);
	var strokeL = new Array(10)
	j = 0
	
	for (i=0; i < pageWOhttp.length; i++)
	{
		if (pageWOhttp.charAt(i) == "/")
			strokeL[j++] = i
	}
		
	// Automobile
	if (thisind == 1)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/auto_txt.gif\" border=0>";
	}

	// Plastic
	else if (thisind == 3)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/plas_txt.gif\" border=0>";
	}

	// Textile
	else if (thisind == 4)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/tex_txt.gif\" border=0>";
	}

	// Packaging
	else if (thisind == 5)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/pack_txt.gif\" border=0>";
	}
	
	// Machinery
	else if (thisind == 6)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/mac_txt.gif\" border=0>";
	}
			
	return img1;
}

function getInewsImgBar(thisind)
{
	var img1 = "";

	pageURL = location.href;
	pageWOhttp = pageURL.substring(7,pageURL.length);
	var strokeL = new Array(10)
	j = 0
	
	for (i=0; i < pageWOhttp.length; i++)
	{
		if (pageWOhttp.charAt(i) == "/")
			strokeL[j++] = i
	}
	
	// Automobile
	if (thisind == 1)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/autoimgbar.jpg\" border=0>";
	}

	// Plastic
	else if (thisind == 3)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/plasticimgbar.jpg\" border=0>";
	}

	// Textile
	else if (thisind == 4)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/textileimgbar.jpg\" border=0>";
	}

	// Packaging
	else if (thisind == 5)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/packimgbar.jpg\" border=0>";
	}
	
	// Machinery
	else if (thisind == 6)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/macimgbar.jpg\" border=0>";
	}

	// Toy
	else if (thisind == 7)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/toyimgbar.jpg\" border=0>";
	}

	// Building
	else if (thisind == 8)
	{
		img1 = "<img src=\"/"+ pageWOhttp.substring(strokeL[0]+1,strokeL[2]) +"/images/bldgimgbar.jpg\" border=0>";
	}
		
	return img1;
}

function submit_form(theForm)
{
	theForm.submit();
}

function reset_form(theForm)
{
	theForm.reset();
}

function gotoPage(tURL)
{
	opener.location.href = tURL;
	self.close()
}

function submitEmF(theForm,thisAct)
{
	haveSelect = 0;
	
	for(emi=1; emi <= theForm.lrow.value; emi++)
	{
  		tmpV = "theForm.c"+emi;
  		if (eval(tmpV))
  		{
	  		tmpV1 = "theForm.c"+emi+".checked";
	  		if (eval(tmpV1))
				haveSelect = 1;
		}
	}
	
	if (haveSelect == 1)
	{
		theForm.action = theForm.action + "?todo=" + thisAct;
		theForm.submit();
	}
}

function doneEmF(theForm)
{
	theForm.action = "sendadd.asp";
	theForm.submit();	
}

function chkVote(theForm,pgid)
{
	ChkChoice = 0;
  	for (i=0; i <= 2; i++)
  	{
  		tmpV = "theForm.c["+i+"].checked";
  		if (eval(tmpV))
  		{
			ChkChoice = 1;
			if (pgid == 1)
				theForm.action = "javascript:popVote('polling/showpoll.asp?pollid=6&mychoice="+(i+1)+"')";
			else if (pgid == 2)
				theForm.action = "javascript:popVote('../polling/showpoll.asp?pollid=6&mychoice="+(i+1)+"')";			
			else if (pgid == 3)
				theForm.action = "javascript:popVote('../../polling/showpoll.asp?pollid=6&mychoice="+(i+1)+"')";							
			theForm.submit();
			return (true);
		}
	}
  	
  	if (ChkChoice == 0)
  	{
	    	alert("Please make your vote!");
	    	theForm.c[0].focus();
	    	return (false);  		
	}
}

function validFS_en(theForm)
{
	noError = 1;
	
	if (theForm.searchme.value == "")
	{
		if ((theForm.smonth.options[theForm.smonth.selectedIndex].value == "") && (theForm.syear.options[theForm.smonth.selectedIndex].value == "") && (theForm.myIndustry_id.options[theForm.myIndustry_id.selectedIndex].value == -1))
		{
		    	alert("Please select any one of the search criteria.");
		    	theForm.myIndustry_id.focus();
		    	noError = 0;
		    	return (false);  		
		}
	}

	if ((theForm.smonth.options[theForm.smonth.selectedIndex].value != "") && (theForm.syear.options[theForm.smonth.selectedIndex].value == ""))
	{
	    	alert("Please select year.");
	    	theForm.syear.focus();
	    	noError = 0;
	    	return (false);  		
	}
	if ((theForm.syear.options[theForm.smonth.selectedIndex].value != "") && (theForm.smonth.options[theForm.smonth.selectedIndex].value == ""))
	{
	    	alert("Please select month.");
	    	theForm.smonth.focus();
	    	noError = 0;
	    	return (false);  		
	}

	if (noError == 1)
		return (true);
}

function validFS_tw(theForm)
{
	noError = 1;
	
	if (theForm.searchme.value == "")
	{
		if ((theForm.smonth.options[theForm.smonth.selectedIndex].value == "") && (theForm.syear.options[theForm.smonth.selectedIndex].value == "") && (theForm.myIndustry_id.options[theForm.myIndustry_id.selectedIndex].value == -1))
		{
		    	alert("叫匡拒穓兵ン.");
		    	theForm.myIndustry_id.focus();
		    	noError = 0;
		    	return (false);  		
		}
	}

	if ((theForm.smonth.options[theForm.smonth.selectedIndex].value != "") && (theForm.syear.options[theForm.smonth.selectedIndex].value == ""))
	{
	    	alert("叫匡拒.");
	    	theForm.syear.focus();
	    	noError = 0;
	    	return (false);  		
	}
	if ((theForm.syear.options[theForm.smonth.selectedIndex].value != "") && (theForm.smonth.options[theForm.smonth.selectedIndex].value == ""))
	{
	    	alert("叫匡拒る.");
	    	theForm.smonth.focus();
	    	noError = 0;
	    	return (false);  		
	}

	if (noError == 1)
		return (true);
}

function validFS_cn(theForm)
{
	noError = 1;
	
	if (theForm.searchme.value == "")
	{
		if ((theForm.smonth.options[theForm.smonth.selectedIndex].value == "") && (theForm.syear.options[theForm.smonth.selectedIndex].value == "") && (theForm.myIndustry_id.options[theForm.myIndustry_id.selectedIndex].value == -1))
		{
		    	alert("请选择搜索条件.");
		    	theForm.myIndustry_id.focus();
		    	noError = 0;
		    	return (false);  		
		}
	}

	if ((theForm.smonth.options[theForm.smonth.selectedIndex].value != "") && (theForm.syear.options[theForm.smonth.selectedIndex].value == ""))
	{
	    	alert("请选择年份.");
	    	theForm.syear.focus();
	    	noError = 0;
	    	return (false);  		
	}
	if ((theForm.syear.options[theForm.smonth.selectedIndex].value != "") && (theForm.smonth.options[theForm.smonth.selectedIndex].value == ""))
	{
	    	alert("请选择月份.");
	    	theForm.smonth.focus();
	    	noError = 0;
	    	return (false);  		
	}

	if (noError == 1)
		return (true);
}

function validateQnaire(theForm)
{
	// q3
	theForm.q3list.value = "";
	
	for (i=1; i <= 8; i++)
	{
		tmpV1 = "theForm.q3a"+i+".checked";
		if (eval(tmpV1))
		{
			if (theForm.q3list.value != "")
			theForm.q3list.value += ",";
				  			
			tmpV2 = "theForm.q3a"+i+".value";
			theForm.q3list.value += eval(tmpV2);
		}
	}

	// q4
	theForm.q4list.value = "";
	
	for (i=1; i <= 5; i++)
	{
		tmpV1 = "theForm.q4a"+i+".checked";
		if (eval(tmpV1))
		{
			if (theForm.q4list.value != "")
			theForm.q4list.value += ",";
				  			
			tmpV2 = "theForm.q4a"+i+".value";
			theForm.q4list.value += eval(tmpV2);
		}
	}
	
	// q9
	theForm.q9list.value = "";
	
	for (i=1; i <= 5; i++)
	{
		tmpV1 = "theForm.q9a"+i+".checked";
		if (eval(tmpV1))
		{
			if (theForm.q9list.value != "")
			theForm.q9list.value += ",";
				  			
			tmpV2 = "theForm.q9a"+i+".value";
			theForm.q9list.value += eval(tmpV2);
		}
	}

	// q10
	theForm.q10list.value = "";
	
	for (i=1; i <= 11; i++)
	{
		tmpV1 = "theForm.q10a"+i+".checked";
		if (eval(tmpV1))
		{
			if (theForm.q10list.value != "")
			theForm.q10list.value += ",";
				  			
			tmpV2 = "theForm.q10a"+i+".value";
			theForm.q10list.value += eval(tmpV2);
		}
	}			
}

function checkWhichSearch(theForm,whichLang)
{
	toChange = ""
	toGo = 1;
	if (whichLang == 1)
	{
		if (theForm.q.value == "")
		{
			    alert("Please enter one or more search terms in the search box.");
			    theForm.q.focus();
			    toGo = 0;
		}
			
		toChange = "/eng/"
	}	
	else if (whichLang == 2)
	{
		if (theForm.q.value == "")
		{
			    alert("你未有输入搜寻关键字，请重新输入。");
			    theForm.q.focus();
			    toGo = 0;
		}
		toChange = "/simp/"
	}
	else if (whichLang == 3)
	{
		if (theForm.q.value == "")
		{
			    alert("ゼΤ块穓碝闽龄叫穝块");
			    theForm.q.focus();
			    toGo = 0;
		}
		toChange = "/trad/"
	}

	if (toGo == 1)	
	{
		theForm.action = toChange + "se/ourse.asp";			
		theForm.submit();
	}	
}

function chkVoteNew(theForm,pgid)
{
	ChkChoice = 0;
  	for (i=0; i <= theForm.NoChoice.value; i++)
  	{
  		tmpV = "theForm.c["+i+"].checked";
  		if (eval(tmpV))
  		{
			ChkChoice = 1;
			if (pgid == 1)
				theForm.action = "javascript:popQuiz('onlinevote/thank.asp?voteid="+theForm.Voteid.value+"&c="+(i+1)+"')";
			else
				theForm.action = "javascript:popQuiz('../onlinevote/thank.asp?voteid="+theForm.Voteid.value+"&c="+(i+1)+"')";			
			theForm.submit();
			return (true);			
		}
	}
  	
  	if (ChkChoice == 0)
  	{
	    	alert("Please make your vote!");
	    	theForm.c[0].focus();
	    	return (false);  		
	}
}

function chkVoteNewFull(theForm,pgid)
{
	ChkChoice = 0;
  	for (i=0; i <= theForm.NoChoice.value; i++)
  	{
  		tmpV = "theForm.c["+i+"].checked";
  		tmpV1 = "theForm.c["+i+"].value";
  		if (eval(tmpV))
  		{
			ChkChoice = 1;
			if (i>=0 && i <=3)
				myVoteid = 1;
			else if (i>=4 && i <=7)
				myVoteid = 2;
			else if (i>=8 && i <=11)
				myVoteid = 3;
			else if (i>=12 && i <=14)
				myVoteid = 4;
			else if (i>=15 && i <=17)
				myVoteid = 5;
				
			theForm.action = "javascript:popQuizFull('thank1.asp?voteid="+myVoteid+"&c="+eval(tmpV1)+"')";			
			theForm.submit();
			return (true);			
		}
	}
  	
  	if (ChkChoice == 0)
  	{
	    	alert("Please make your vote!");
	    	theForm.c[0].focus();
	    	return (false);  		
	}
}

function enCheckSearch(theForm)
{
	if (theForm.q.value == "")
	{
		    alert("Please enter one or more search terms in the search box.");
		    theForm.q.focus();
		    return (false);  
	}
}

function twCheckSearch(theForm)
{
	if (theForm.q.value == "")
	{
		    alert("ゼΤ块穓碝闽龄叫穝块");
		    theForm.q.focus();
		    return (false);  
	}
}

function cnCheckSearch(theForm)
{
	if (theForm.q.value == "")
	{
		    alert("你未有输入搜寻关键字，请重新输入。");
		    theForm.q.focus();
		    return (false);  
	}
}

function enCheckTrader(theForm)
{
	if (theForm.ttype[0].checked || theForm.ttype[1].checked)
	{
	}
	else
	{
	    	alert("Please enter \"Transaction Type\".");
	    	theForm.ttype[0].focus();
	    	return (false);
	}
	
	if (theForm.iid.options[theForm.iid.selectedIndex].value == 0)	
  	{
    		alert("Please enter \"Industry Type\".");
    		theForm.iid.focus();
    		return (false);
  	}
  	
	if (theForm.ptid.options[theForm.ptid.selectedIndex].value == 0)	
  	{
    		alert("Please enter \"Product Category\".");
    		theForm.ptid.focus();
    		return (false);
  	}
  	
	if (theForm.item.value == "")
  	{
    		alert("Please enter \"Item\".");
    		theForm.item.focus();
    		return (false);
  	}
  	
	if (theForm.desc.value == "")
  	{
    		alert("Please enter \"Description\".");
    		theForm.desc.focus();
    		return (false);
  	}  			

	if (theForm.duration.options[theForm.duration.selectedIndex].value == 0)	
  	{
    		alert("Please enter \"Posted in the last day\".");
    		theForm.duration.focus();
    		return (false);
  	}
  	
	if (theForm.cname.value == "")
  	{
    		alert("Please enter \"Company Name\".");
    		theForm.cname.focus();
    		return (false);
  	}
  	
	if (theForm.addr.value == "")
  	{
    		alert("Please enter \"Address\".");
    		theForm.addr.focus();
    		return (false);
  	}
  	
	if (theForm.Country_id.options[theForm.Country_id.selectedIndex].value == 0)	
  	{
    		alert("Please enter \"Country\".");
    		theForm.Country_id.focus();
    		return (false);
  	} 
  	
	if (theForm.contact.value == "")
  	{
    		alert("Please enter \"Contact Person\".");
    		theForm.contact.focus();
    		return (false);
  	} 
  	
	if (theForm.tel.value == "")
  	{
    		alert("Please enter \"Telephone no.\".");
    		theForm.tel.focus();
    		return (false);
  	}
  	
	if (theForm.fax.value == "")
  	{
    		alert("Please enter \"Fax no.\".");
    		theForm.fax.focus();
    		return (false);
  	}  	  	 	 	
}

function twCheckTrader(theForm)
{
	if (theForm.ttype[0].checked || theForm.ttype[1].checked)
	{
	}
	else
	{
	    	alert("叫块 \"ユ摸\".");
	    	theForm.ttype[0].focus();
	    	return (false);
	}
	
	if (theForm.iid.options[theForm.iid.selectedIndex].value == 0)	
  	{
    		alert("叫块 \"︽穨摸\".");
    		theForm.iid.focus();
    		return (false);
  	}
  	
	if (theForm.ptid.options[theForm.ptid.selectedIndex].value == 0)	
  	{
    		alert("叫块 \"玻珇摸\".");
    		theForm.ptid.focus();
    		return (false);
  	}
  	
	if (theForm.item.value == "")
  	{
    		alert("叫块 \"夹肈\".");
    		theForm.item.focus();
    		return (false);
  	}
  	
	if (theForm.desc.value == "")
  	{
    		alert("叫块 \"冈灿戈\".");
    		theForm.desc.focus();
    		return (false);
  	}  			

	if (theForm.duration.options[theForm.duration.selectedIndex].value == 0)	
  	{
    		alert("叫块 \"程祅ら戳\".");
    		theForm.duration.focus();
    		return (false);
  	}
  	
	if (theForm.cname.value == "")
  	{
    		alert("叫块 \"そ嘿\".");
    		theForm.cname.focus();
    		return (false);
  	}
  	
	if (theForm.addr.value == "")
  	{
    		alert("叫块 \"\".");
    		theForm.addr.focus();
    		return (false);
  	}
  	
	if (theForm.Country_id.options[theForm.Country_id.selectedIndex].value == 0)	
  	{
    		alert("叫块 \"瓣產\".");
    		theForm.Country_id.focus();
    		return (false);
  	} 
  	
	if (theForm.contact.value == "")
  	{
    		alert("叫块 \"羛蹈\".");
    		theForm.contact.focus();
    		return (false);
  	} 
  	
	if (theForm.tel.value == "")
  	{
    		alert("叫块 \"筿杠\".");
    		theForm.tel.focus();
    		return (false);
  	}
  	
	if (theForm.fax.value == "")
  	{
    		alert("叫块 \"肚痷\".");
    		theForm.fax.focus();
    		return (false);
  	}  	
}

function cnCheckTrader(theForm)
{
	if (theForm.ttype[0].checked || theForm.ttype[1].checked)
	{
	}
	else
	{
	    	alert("请输入 \"交易类别\".");
	    	theForm.ttype[0].focus();
	    	return (false);
	}
	
	if (theForm.iid.options[theForm.iid.selectedIndex].value == 0)	
  	{
    		alert("请输入 \"行业类别\".");
    		theForm.iid.focus();
    		return (false);
  	}
  	
	if (theForm.ptid.options[theForm.ptid.selectedIndex].value == 0)	
  	{
    		alert("请输入 \"产品类别\".");
    		theForm.ptid.focus();
    		return (false);
  	}
  	
	if (theForm.item.value == "")
  	{
    		alert("请输入 \"标题\".");
    		theForm.item.focus();
    		return (false);
  	}
  	
	if (theForm.desc.value == "")
  	{
    		alert("请输入 \"详细资料\".");
    		theForm.desc.focus();
    		return (false);
  	}  			

	if (theForm.duration.options[theForm.duration.selectedIndex].value == 0)	
  	{
    		alert("请输入 \"最后刊登日期\".");
    		theForm.duration.focus();
    		return (false);
  	}
  	
	if (theForm.cname.value == "")
  	{
    		alert("请输入 \"公司名称\".");
    		theForm.cname.focus();
    		return (false);
  	}
  	
	if (theForm.addr.value == "")
  	{
    		alert("请输入 \"地址\".");
    		theForm.addr.focus();
    		return (false);
  	}
  	
	if (theForm.Country_id.options[theForm.Country_id.selectedIndex].value == 0)	
  	{
    		alert("请输入 \"国家\".");
    		theForm.Country_id.focus();
    		return (false);
  	} 
  	
	if (theForm.contact.value == "")
  	{
    		alert("请输入 \"联络人\".");
    		theForm.contact.focus();
    		return (false);
  	} 
  	
	if (theForm.tel.value == "")
  	{
    		alert("请输入 \"电话\".");
    		theForm.tel.focus();
    		return (false);
  	}
  	
	if (theForm.fax.value == "")
  	{
    		alert("请输入 \"传真\".");
    		theForm.fax.focus();
    		return (false);
  	}  	
}

function enCheckVexAppt(theForm)
{
	CheckInputF1 = 0;
	CheckInputF2 = 0;
	
	for (j=1; j <= 3; j++)
	{
		tmpV = "theForm.cname"+j+".value";
		if (eval(tmpV) != "")
			CheckInputF1 = 1;
	}

	for (k=1; k <= 3; k++)
	{
		tmpV = "theForm.time"+k+".value";
		if (eval(tmpV) != "")
			CheckInputF2 = 1;
	}
		
	if (CheckInputF1 == 0 || CheckInputF2 == 0)
	{
		alert("Please fill in at least ONE Company Name/Booth No. and ONE Available meeting period.");
		theForm.cname1.focus();
		return (false);  		
	}
	
	if (theForm.pcname.value == "")
  	{
    		alert("Please enter \"Company name\".");
    		theForm.pcname.focus();
    		return (false);
  	}
  	
	if (theForm.pname.value == "")
  	{
    		alert("Please enter \"Name\".");
    		theForm.pname.focus();
    		return (false);
  	}
  	
	if (theForm.ptel.value == "")
  	{
    		alert("Please enter \"Telephone No.\".");
    		theForm.ptel.focus();
    		return (false);
  	}  
  	
	if (theForm.pemail.value == "")
  	{
    		alert("Please enter \"Email\".");
    		theForm.pemail.focus();
    		return (false);
  	}  	  			  		
}

function cnCheckVexAppt(theForm)
{
	CheckInputF1 = 0;
	CheckInputF2 = 0;
	
	for (j=1; j <= 3; j++)
	{
		tmpV = "theForm.cname"+j+".value";
		if (eval(tmpV) != "")
			CheckInputF1 = 1;
	}

	for (k=1; k <= 3; k++)
	{
		tmpV = "theForm.time"+k+".value";
		if (eval(tmpV) != "")
			CheckInputF2 = 1;
	}
		
	if (CheckInputF1 == 0 || CheckInputF2 == 0)
	{
		alert("请输入一个公司名称/ 展台号码及一个建议接洽时间.");
		theForm.cname1.focus();
		return (false);  		
	}
	
	if (theForm.pcname.value == "")
  	{
    		alert("请输入 \"公司名称\".");
    		theForm.pcname.focus();
    		return (false);
  	}
  	
	if (theForm.pname.value == "")
  	{
    		alert("请输入 \"姓名\".");
    		theForm.pname.focus();
    		return (false);
  	}
  	
	if (theForm.ptel.value == "")
  	{
    		alert("请输入 \"电话\".");
    		theForm.ptel.focus();
    		return (false);
  	}  
  	
	if (theForm.pemail.value == "")
  	{
    		alert("请输入 \"电邮\".");
    		theForm.pemail.focus();
    		return (false);
  	}  	  			  		
}

function en_buildEnq_form(theForm)
{
	if (theForm.cname.value == "")
  	{
    		alert("Please enter \"Company\".");
    		theForm.cname.focus();
    		return (false);
  	}
  	
	if (theForm.sal[0].checked || theForm.sal[1].checked)
	{
	}
	else
	{
	    	alert("Please enter \"Salutation\".");
	    	theForm.sal[0].focus();
	    	return (false);
	}
  	
	if (theForm.ccontact.value == "")
  	{
    		alert("Please enter \"Contact Person\".");
    		theForm.ccontact.focus();
    		return (false);
  	}
  	
	if (theForm.tel.value == "")
  	{
    		alert("Please enter \"Telephone No.\".");
    		theForm.tel.focus();
    		return (false);
  	}
  	
  	if (theForm.email.value != "")
  	{
		ChkEmail1 = 0;
		ChkEmail2 = 0;
		for (j=0; j < theForm.email.value.length; j++)
		{
			if (theForm.email.value.charAt(j) == "@")
				ChkEmail1 = 1;
			if (theForm.email.value.charAt(j) == ".")
				ChkEmail2 = 1;				
		}
		
	  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
	  	{
		    	alert("Not a valid email address.");
		    	theForm.email.focus();
		    	return (false);  		
		}  			
	}
	
  	if (theForm.mprod.value == "")
  	{
    		alert("Please enter \"Major Products\".");
    		theForm.mprod.focus();
    		return (false);
  	}    	 	 	
}

function checkAll(field)
{
	for (i = 0; i < field.length; i++)
		field[i].checked = true ;
}

function uncheckAll(field)
{
	for (i = 0; i < field.length; i++)
		field[i].checked = false ;
}

function checkVexKey(theForm,langid)
{
	if (theForm.exhname.value == "")
  	{
  		if (langid == 1)
    			alert("Please enter \"Keyword\".");
  		else if (langid == 2)
    			alert("叫块 \"闽龄\".");
  		else if (langid == 3)
    			alert("请输入 \"关键字\".");
    			
    		theForm.exhname.focus();
    		return (false);
  	}
}

function validBsVexEnq_en(theForm)
{
	noError = 1;
	
	if (theForm.lname.value == "")
	{
		alert("Please enter \"Last name\".");
	    	theForm.lname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.fname.value == "")
	{
		alert("Please enter \"First name\".");
	    	theForm.fname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.mEmail.value == "")
  	{
    		alert("Please enter \"Email address\".");
    		theForm.mEmail.focus();
	    	noError = 0;
    		return (false);
  	}
	else
	{
		ChkEmail1 = 0;
		ChkEmail2 = 0;
		for (j=0; j < theForm.mEmail.value.length; j++)
		{
			if (theForm.mEmail.value.charAt(j) == "@")
				ChkEmail1 = 1;
			if (theForm.mEmail.value.charAt(j) == ".")
				ChkEmail2 = 1;				
		}
		
	  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
	  	{
		    	alert("Not a valid email address.");
		    	theForm.mEmail.focus();
	    		noError = 0;
		    	return (false);  		
		}  			
	}

	if (theForm.mCname.value == "")
  	{
    		alert("Please enter \"Company name\".");
    		theForm.mCname.focus();
	    	noError = 0;
    		return (false);
  	}

	if (noError == 1)
		return (true);
}

function validBsVexEnq_tw(theForm)
{
	noError = 1;
	
	if (theForm.lname.value == "")
	{
		alert("叫块 \"﹎ん\".");
	    	theForm.lname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.fname.value == "")
	{
		alert("叫块 \"﹎\".");
	    	theForm.fname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.mEmail.value == "")
  	{
    		alert("叫块 \"筿秎\".");
    		theForm.mEmail.focus();
	    	noError = 0;
    		return (false);
  	}
	else
	{
		ChkEmail1 = 0;
		ChkEmail2 = 0;
		for (j=0; j < theForm.mEmail.value.length; j++)
		{
			if (theForm.mEmail.value.charAt(j) == "@")
				ChkEmail1 = 1;
			if (theForm.mEmail.value.charAt(j) == ".")
				ChkEmail2 = 1;				
		}
		
	  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
	  	{
		    	alert("ぃ琌Τ筿秎.");
		    	theForm.mEmail.focus();
	    		noError = 0;
		    	return (false);  		
		}  			
	}

	if (theForm.mCname.value == "")
  	{
    		alert("叫块 \"虫嘿\".");
    		theForm.mCname.focus();
	    	noError = 0;
    		return (false);
  	}

	if (noError == 1)
		return (true);
}

function validBsVexEnq_cn(theForm)
{
	noError = 1;
	
	if (theForm.lname.value == "")
	{
		alert("请输入 \"姓氏\".");
	    	theForm.lname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.fname.value == "")
	{
		alert("请输入 \"姓名\".");
	    	theForm.fname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.mEmail.value == "")
  	{
    		alert("请输入 \"电邮地址\".");
    		theForm.mEmail.focus();
	    	noError = 0;
    		return (false);
  	}
	else
	{
		ChkEmail1 = 0;
		ChkEmail2 = 0;
		for (j=0; j < theForm.mEmail.value.length; j++)
		{
			if (theForm.mEmail.value.charAt(j) == "@")
				ChkEmail1 = 1;
			if (theForm.mEmail.value.charAt(j) == ".")
				ChkEmail2 = 1;				
		}
		
	  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
	  	{
		    	alert("不是有效的电邮地址.");
		    	theForm.mEmail.focus();
	    		noError = 0;
		    	return (false);  		
		}  			
	}

	if (theForm.mCname.value == "")
  	{
    		alert("请输入 \"单位名称\".");
    		theForm.mCname.focus();
	    	noError = 0;
    		return (false);
  	}

	if (noError == 1)
		return (true);
}

function validAEEnq_en(theForm)
{
	noError = 1;

	if ((!theForm.exhc1.checked) && (!theForm.exhc2.checked))
  	{
    		alert("Please select \"You wish to\".");
    		theForm.exhc1.focus();
	    	noError = 0;
    		return (false);
  	}
  		
	if (theForm.lname.value == "")
	{
		alert("Please enter \"Last name\".");
	    	theForm.lname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.fname.value == "")
	{
		alert("Please enter \"First name\".");
	    	theForm.fname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.title.options[theForm.title.selectedIndex].value == "0")	
  	{
    		alert("Please enter \"Title/Position\".");
    		theForm.title.focus();
    		return (false);
  	}
  	else if (theForm.title.selectedIndex == (theForm.title.length-1))
  	{
  		// select others, but didn't fill in the text box
  		if (theForm.title_other.value == "")
  		{
	    		alert("Please specify your \"Title/Position\".");
	    		theForm.title_other.focus();
	    		return (false);
  		}
  	}
  	
	if (theForm.mEmail.value == "")
  	{
    		alert("Please enter \"Email address\".");
    		theForm.mEmail.focus();
	    	noError = 0;
    		return (false);
  	}
	else
	{
		ChkEmail1 = 0;
		ChkEmail2 = 0;
		for (j=0; j < theForm.mEmail.value.length; j++)
		{
			if (theForm.mEmail.value.charAt(j) == "@")
				ChkEmail1 = 1;
			if (theForm.mEmail.value.charAt(j) == ".")
				ChkEmail2 = 1;				
		}
		
	  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
	  	{
		    	alert("Not a valid email address.");
		    	theForm.mEmail.focus();
	    		noError = 0;
		    	return (false);  		
		}  			
	}

	if (theForm.mCname.value == "")
  	{
    		alert("Please enter \"Company name\".");
    		theForm.mCname.focus();
	    	noError = 0;
    		return (false);
  	}

	if (theForm.addr.value == "")
  	{
    		alert("Please enter \"Company address\".");
    		theForm.addr.focus();
	    	noError = 0;
    		return (false);
  	}

	if (theForm.country.options[theForm.country.selectedIndex].value == "0")	
  	{
    		alert("Please enter \"Country\".");
    		theForm.country.focus();
    		return (false);
  	}

	if (theForm.mTel.value == "")
	{
		alert("Please enter \"Tel\".");
	    	theForm.mTel.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.mFax.value == "")
	{
		alert("Please enter \"Fax\".");
	    	theForm.mFax.focus();
	    	noError = 0;
	    	return (false);  	
	}

	theForm.comtel.value = theForm.mTelCC.value + '-' + theForm.mTelAC.value + '-' + theForm.mTel.value;
	theForm.comfax.value = theForm.mFaxCC.value + '-' + theForm.mFaxAC.value + '-' + theForm.mFax.value;
	
	if (noError == 1)
		return (true);
}

function validAEEnq_tw(theForm)
{
	noError = 1;

	if ((!theForm.exhc1.checked) && (!theForm.exhc2.checked))
  	{
    		alert("叫块 \"砍届\".");
    		theForm.exhc1.focus();
	    	noError = 0;
    		return (false);
  	}
	
	if (theForm.lname.value == "")
	{
		alert("叫块 \"﹎ん\".");
	    	theForm.lname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.fname.value == "")
	{
		alert("叫块 \"﹎\".");
	    	theForm.fname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.title.options[theForm.title.selectedIndex].value == "0")	
  	{
    		alert("叫块 \"戮\".");
    		theForm.title.focus();
    		return (false);
  	}
  	else if (theForm.title.selectedIndex == (theForm.title.length-1))
  	{
  		// select others, but didn't fill in the text box
  		if (theForm.title_other.value == "")
  		{
	    		alert("叫爹 \"戮\".");
	    		theForm.title_other.focus();
	    		return (false);
  		}
  	}
  	
	if (theForm.mEmail.value == "")
  	{
    		alert("叫块 \"筿秎\".");
    		theForm.mEmail.focus();
	    	noError = 0;
    		return (false);
  	}
	else
	{
		ChkEmail1 = 0;
		ChkEmail2 = 0;
		for (j=0; j < theForm.mEmail.value.length; j++)
		{
			if (theForm.mEmail.value.charAt(j) == "@")
				ChkEmail1 = 1;
			if (theForm.mEmail.value.charAt(j) == ".")
				ChkEmail2 = 1;				
		}
		
	  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
	  	{
		    	alert("ぃ琌Τ筿秎.");
		    	theForm.mEmail.focus();
	    		noError = 0;
		    	return (false);  		
		}  			
	}

	if (theForm.mCname.value == "")
  	{
    		alert("叫块 \"虫嘿\".");
    		theForm.mCname.focus();
	    	noError = 0;
    		return (false);
  	}

	if (theForm.addr.value == "")
  	{
    		alert("叫块 \"虫\".");
    		theForm.addr.focus();
	    	noError = 0;
    		return (false);
  	}

	if (theForm.country.options[theForm.country.selectedIndex].value == "0")	
  	{
    		alert("叫块 \"瓣產/跋\".");
    		theForm.country.focus();
    		return (false);
  	}

	if (theForm.mTel.value == "")
	{
		alert("叫块 \"筿杠\".");
	    	theForm.mTel.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.mFax.value == "")
	{
		alert("叫块 \"肚痷\".");
	    	theForm.mFax.focus();
	    	noError = 0;
	    	return (false);  	
	}

	theForm.comtel.value = theForm.mTelCC.value + '-' + theForm.mTelAC.value + '-' + theForm.mTel.value;
	theForm.comfax.value = theForm.mFaxCC.value + '-' + theForm.mFaxAC.value + '-' + theForm.mFax.value;

	if (noError == 1)
		return (true);
}

function validAEEnq_cn(theForm)
{
	noError = 1;

	if ((!theForm.exhc1.checked) && (!theForm.exhc2.checked))
  	{
    		alert("请输入 \"兴趣\".");
    		theForm.exhc1.focus();
	    	noError = 0;
    		return (false);
  	}
	
	if (theForm.lname.value == "")
	{
		alert("请输入 \"姓氏\".");
	    	theForm.lname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.fname.value == "")
	{
		alert("请输入 \"姓名\".");
	    	theForm.fname.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.title.options[theForm.title.selectedIndex].value == "0")	
  	{
    		alert("请输入 \"职位\".");
    		theForm.title.focus();
    		return (false);
  	}
  	else if (theForm.title.selectedIndex == (theForm.title.length-1))
  	{
  		// select others, but didn't fill in the text box
  		if (theForm.title_other.value == "")
  		{
	    		alert("请注明 \"职位\".");
	    		theForm.title_other.focus();
	    		return (false);
  		}
  	}
  	
	if (theForm.mEmail.value == "")
  	{
    		alert("请输入 \"电邮地址\".");
    		theForm.mEmail.focus();
	    	noError = 0;
    		return (false);
  	}
	else
	{
		ChkEmail1 = 0;
		ChkEmail2 = 0;
		for (j=0; j < theForm.mEmail.value.length; j++)
		{
			if (theForm.mEmail.value.charAt(j) == "@")
				ChkEmail1 = 1;
			if (theForm.mEmail.value.charAt(j) == ".")
				ChkEmail2 = 1;				
		}
		
	  	if (ChkEmail1 == 0 || ChkEmail2 == 0)
	  	{
		    	alert("不是有效的电邮地址.");
		    	theForm.mEmail.focus();
	    		noError = 0;
		    	return (false);  		
		}  			
	}

	if (theForm.mCname.value == "")
  	{
    		alert("请输入 \"单位名称\".");
    		theForm.mCname.focus();
	    	noError = 0;
    		return (false);
  	}

	if (theForm.addr.value == "")
  	{
    		alert("请输入 \"单位地址\".");
    		theForm.addr.focus();
	    	noError = 0;
    		return (false);
  	}

	if (theForm.country.options[theForm.country.selectedIndex].value == "0")	
  	{
    		alert("请输入 \"国家/地区\".");
    		theForm.country.focus();
    		return (false);
  	}

	if (theForm.mTel.value == "")
	{
		alert("请输入 \"电话\".");
	    	theForm.mTel.focus();
	    	noError = 0;
	    	return (false);  	
	}

	if (theForm.mFax.value == "")
	{
		alert("请输入 \"传真\".");
	    	theForm.mFax.focus();
	    	noError = 0;
	    	return (false);  	
	}

	theForm.comtel.value = theForm.mTelCC.value + '-' + theForm.mTelAC.value + '-' + theForm.mTel.value;
	theForm.comfax.value = theForm.mFaxCC.value + '-' + theForm.mFaxAC.value + '-' + theForm.mFax.value;

	if (noError == 1)
		return (true);
}

function swapURL(thisLang,toLang) 
{
	var temp = parent.location.href;
	var tmp0 = "";
	var tmp1 = "";
	var thisURL1 = "";
	
	if (thisLang == "en")
	{
		if (toLang == "tc")
		{
			if (temp == "http://www.2456.com/chinaplas")
				tmp0 = temp.replace("/chinaplas","/chinaplas/tc/general/info1/eid/3101/order/102/");
			else if (temp == "http://www.2456.com/chinaplas/")
				tmp0 = temp.replace("/chinaplas/","/chinaplas/tc/general/info1/eid/3101/order/102/");
			else
				tmp0 = temp.replace("/chinaplas/index.asp","/chinaplas/tc/general/info1/eid/3101/order/102/");
				
			tmp1 = tmp0.replace("/en/","/tc/");
			thisURL = tmp1.replace("3095","3101");			
		}
		else if (toLang == "sc")
		{
			if (temp == "http://www.2456.com/chinaplas")
				tmp0 = temp.replace("/chinaplas","/chinaplas/sc/general/info1/eid/3148/order/102/");
			else if (temp == "http://www.2456.com/chinaplas/")
				tmp0 = temp.replace("/chinaplas/","/chinaplas/sc/general/info1/eid/3148/order/102/");
			else
				tmp0 = temp.replace("/chinaplas/index.asp","/chinaplas/sc/general/info1/eid/3148/order/102/");
				
			tmp1 = tmp0.replace("/en/","/sc/");	
			thisURL = tmp1.replace("3095","3148");			
		}
	}	
	else if (thisLang == "tc")
	{
		if (toLang == "en")
		{
			tmp1 = temp.replace("/tc/","/en/");
			thisURL = tmp1.replace("3101","3095");			
		}
		else if (toLang == "sc")
		{
			tmp1 = temp.replace("/tc/","/sc/");
			thisURL = tmp1.replace("3101","3148");			
		}
	}	
	else if (thisLang == "sc")
	{
		if (toLang == "en")
		{
			tmp1 = temp.replace("/sc/","/en/");
			thisURL = tmp1.replace("3148","3095");			
		}
		else if (toLang == "tc")
		{
			tmp1 = temp.replace("/sc/","/tc/");
			thisURL = tmp1.replace("3148","3101");			
		}
	}
	
	parent.location.href = thisURL;
}

function gotoPageN(gotoURL)
{
	popEpub('http://auto.2456.com/newsletter/whichAd.asp');		
	location.href = gotoURL;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function homepage() { 
if(document.all)
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://www.2456.com');
} 

function setCookie(name, value, expires, path, domain, secure) {
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

function mail() { 
	var t = new Date(); at = "@"; subject = "Adsale enquiry (" + t.getYear() +"/" + (t.getMonth()+1) + "/" + t.getDate() + " "+ t.getHours() + ":" +t.getMinutes() + ":" + t.getSeconds() + ")"; window.location = "mailto:info06" + at + "EventTrip.com?subject=" +escape(subject);
}