var CategoryDialogArgs; function ShowCategoryDialog(txt1,val1,txt2,val2,txt3,val3) { CategoryDialogArgs = {"txt1":txt1,"val1":val1,"txt2":txt2,"val2":val2,"txt3":txt3,"val3":val3}; if(window.showModalDialog) { window.showModalDialog("http://english.mainone.com/DLG/Category/index.htm", CategoryDialogArgs, "dialogWidth:800px; dialogHeight:600px; status:0; help:0; scroll:no"); } else { var win = window.open("http://english.mainone.com/DLG/Category/index.htm","","left=200,top=200,width=800,height=570,menubar=no,toolbar=no,dependent=yes,chrome=yes,modal=yes"); } } function GetCategoryDialogVal() { return CategoryDialogArgs; } var OnCategoryReturn; if(!String.trim) { String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g,""); } } if(!String.equal) { String.prototype.equal = function(str) { var x = this.trim().toUpperCase(); var y = str.trim().toUpperCase(); return x == y; } } function ThroughSearch(frmid) { var frm = document.getElementById(frmid); alert(frm.innerHTML); } function showWhiteBook(id) { alert(id); } var mylastclsid = null; if(!window.XMLHttpRequest) { function getXmlHttp(clsid) { var xmlHttp = null; try { xmlHttp = new ActiveXObject(clsid); mylastclsid = clsid; return xmlHttp; } catch(ex) {} } window.XMLHttpRequest = function() { if(mylastclsid != null) { return getXmlHttp(mylastclsid); } var xmlHttp = null; var clsids = ["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP.2.6","Microsoft.XMLHTTP.1.0","Microsoft.XMLHTTP.1","Microsoft.XMLHTTP"]; for(var i=0; i maxlimit) field.value = field.value.substring(0, maxlimit); else document.getElementById(ShowObj).value = maxlimit - field.value.length; } var ToMailSubject = ""; var ToMailContent = ""; function ShowToMail(subject,content) { ToMailSubject = subject; ToMailContent = content; window.open("http://english.mainone.com/DLG/ToMail.aspx","ToMailWin","height=400,width=400,top=200,left=300,location=no,menubar=no,resizable=no,status=no,titlebar=no,toolbar=no,scrollbars=yes"); } function GetToMailSubject() { return ToMailSubject; } function GetToMailContent() { return ToMailContent; } function showWhiteBook(strID) { if(strID!="") { var target="http://english.mainone.com/ProductFlat/ShowWhiteBook.aspx?companyid="+strID; newwindow=window.open("","","scrollbars") if (document.all){ newwindow.moveTo( -4, -4 ); newwindow.resizeTo( screen.width, screen.height ); var nDiffHeight = newwindow.screenTop; newwindow.moveTo( -6, -nDiffHeight - 5 ); newwindow.resizeTo( screen.width+ 12, screen.height + nDiffHeight + 35 ); } newwindow.location=target } } document.write(""); function AddCompanyFavorite(id) { document.getElementById("ActionFrame").src="http://biz.mainone.com/AddCompanyFavorite.aspx?CompanyID=" + id ; } function AddProductFavorite(id) { alert('正在建设中'); //var XmlDoc = new ActiveXObject("Microsoft.XMLDOM"); //XmlDoc.async = false; //XmlDoc.load( "http://biz.mainone.com/product/AddProductFavorite.aspx?ProductID=" + id ); //var root = XmlDoc.documentElement; //alert(unescape(root.text)); } function AddSupplyFavorite(id) { alert('正在建设中'); //var XmlDoc = new ActiveXObject("Microsoft.XMLDOM"); //XmlDoc.async = false; //XmlDoc.load( "http://biz.mainone.com/Supply/AddSupplyFavorite.aspx?SupplyID=" + id ); //var root = XmlDoc.documentElement; //alert(unescape(root.text)); } function ShowProductSearchStyle1(companyID,txtID,txtName) { var args = {"txtBox":document.getElementById(txtName),"hidBox":document.getElementById(txtID)}; var ret = showModalDialog("http://english.mainone.com/DLG/Product/SearchProductcontainer.aspx?companyid="+companyID, args, "dialogWidth:640px; dialogHeight:480px; status:0; help:0; scroll:no"); }