<!--
var intloop=0;
var homeurl='http://www.ydyongye.com/';
var homename='www.ydyongye.com';


function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function showselpro(){
var inthtml='',prolist='',thecookie='',key='';
thecookie=GetCookie('inquire_product');
if (!(thecookie=='')){
	intloop=0
	prolist=thecookie.split(':');
	window.writepro.innerHTML='';
	inthtml='<table style="BORDER-COLLAPSE: collapse" borderColor="#D6C394" cellSpacing="0" cellPadding="0" width="100%" align="center" border="1"><tr vAlign="center" align="middle" bgColor="#D6C394"><td class="p9" bgColor="#D6C394" colSpan="3" height="18" ><font COLOR="#000000" class="p12"><b>Product list</b></font></td></tr><tr vAlign="center" align="middle" bgColor="#E3D5A8"><td width="78" valign="top" class="p9" height="19" bgColor="#E3D5A8"><font COLOR="#000000">Produce</font></td><td valign="top" width="618" class="p9" bgColor="#E3D5A8"><font COLOR="#000000">Details</font></td><td class="p9" width="56" bgColor="#E3D5A8">';
	for (key in prolist){
		if  (prolist[intloop]>""){
		inthtml=inthtml+'<tr bgColor="#F3F1E4" id="SelPrd'+prolist[intloop]+'"><td height="80" width="80" vAlign="middle" class="p9" align="center"><a href="show.asp?id='+prolist[intloop]+'" target="_blank"><img src="pic/'+prolist[intloop]+'.GIF" border="0"></a></td><td vAlign="center" class="p9" align="middle"><input type="hidden" name="prono'+intloop+'" value="'+prolist[intloop]+'"><textarea class="myinput" style="WIDTH: 430px; HEIGHT: 75px" name="memo'+intloop+'" rows="2" wrap="VIRTUAL" cols="50"></textarea></td><td valign="middle" class="p9" onclick="deldiv(\''+prolist[intloop]+'\')" align="center"><font COLOR="#000000">DELETE</font></td></tr>';
		intloop++;
		};
	};
	};
window.writepro.innerHTML=inthtml+'</table>';
 window.sendform.total.value =intloop;
}


function ReplaceTest(str,patrn, replStr){
  var regEx;
  var str1;               // 建立变量。
  regEx = new RegExp(patrn,"g");               // 建立正则表达式。
  str1=str.replace(regEx, replStr);         //作替换。
  return(str1);
}


function deldiv(trid){
var intloop=1,thecookie='',prolist='',key='';
thecookie=GetCookie('inquire_product');
prolist=thecookie.split(':');
thecookie='';
for (key in prolist){
	if (!(prolist[key]==trid) && (prolist[key]>"")){
		thecookie=thecookie+prolist[key]+':';
		};
	};
SetCookie('inquire_product',thecookie);
showselpro();
return true;
}


function send(){
if ((document.sendform.NAME.value=='') || (document.sendform.COMPANY.value=='') || (document.sendform.EMAIL.value=='') || (document.sendform.TEL.value=='') || (document.sendform.FAX.value=='') || (document.sendform.ADDRESS.value=='')){
	window.alert('Please kindly send your inquire with your detailed \n information (company\'s name,company\'s adress,tel,\n fax,website and email)');
	document.sendform.NAME.focus;
	}
	else {
	document.sendform.submit();
	};
return true;
};


function GetCookie(name){
var tempcookie='';
var key='',subof=0;
id=name+'=';
var strnum=id.length;
tempcookie=document.cookie.split(';');
for (key in tempcookie){
	subof=tempcookie[key].indexOf(id)
	if (subof>=0){
		return unescape(tempcookie[key].substr(strnum+subof));
		};
	};
return "";
};


function SetCookie(name,value){
var expdate=new Date();
var path="/";
expdate.setTime(expdate.getTime()+(60*60*1000));
document.cookie=name+"="+escape(value)+"; expires="+expdate.toGMTString()+"; path=/";
};


function addinquire(prono){
var thecookie=GetCookie('inquire_product');
var re=new RegExp(prono,'i');
if (thecookie.search(re)==-1){
thecookie =thecookie+prono+":";
SetCookie('inquire_product',thecookie);
};
alert("add to Enquiry")
}


function bookmarkit(){
window.external.addFavorite(homeurl,homename)
}

function fun_hidefocus(tag){
if(document.all){
var tags=document.all.tags(tag)
for (var i=0;i<tags.length;i++)
tags(i).outerHTML=tags(i).outerHTML.replace(">"," hidefocus=true>")}
}

function delinquire(trid){
var intloop=1,thecookie='',prolist='',key='';
thecookie=GetCookie('inquire_product');
prolist=thecookie.split(':');
thecookie='';
for (key in prolist){
	if (!(prolist[key]==trid) && (prolist[key]>"")){
		thecookie=thecookie+prolist[key]+':';
		};
	};
SetCookie('inquire_product',thecookie);
}
//-->