if(800 == screen.width && 600 == screen.height){
   var SetHtml = document.getElementById("HtmlStyle");
   SetHtml.className = 'BodyScroll';
}
 function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
  function checklog()
{
    if(document.loginfo.username.value=="") {
	document.loginfo.username.focus();
    alert("Username can not be empty！");
    return false;
  }
    if(document.loginfo.UserPassword.value=="") {
	document.loginfo.UserPassword.focus();
    alert("Password can not be empty！");
    return false;
  }
}
function docheck()
{	
if (document.form2.searchtext.value == "") {
		alert("Please enter the keyword!");
		document.form2.searchtext.focus();
		return false;
}
}
function docheck1()
{	
if (document.SearchForm.searchkey.value == "" || document.SearchForm.searchkey.value=="KeyWord") {
		alert("Please enter the keyword!");
		document.SearchForm.searchkey.focus();
		return false;
}
}
	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}

function Cart(Url){
  window.open(Url,'','width=800,height=600,top=50,left=20,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;
}

function newCheckAlitalkInstalled(){
  var obj;
  try{
    obj = new ActiveXObject("AlitalkSetup.Install");
  }
  catch(e){
  }
  if (null!=obj){
    delete obj;
    return true;
  } else {
    return false;
  }
}
function NewCheckAlitalkInstalled(){
  return newCheckAlitalkInstalled();
}
  function check1(infoType,MyCount) {
     var OnLine = 1;
    //判断浏览者是否安装了贸易通
    if(clientCaps.isComponentInstalled("{8601658B-9360-00C1-AE00-00C03EA25D91}", "componentID") || NewCheckAlitalkInstalled()) {
        var d = new Date();
        if (document.images) {
          (new Image()).src = "http://china.alibaba.com/others/offeralitalkclick.htm?online="+OnLine+"&type="+infoType+"&member=pm&time="+d.getTime();
    	}

        if(infoType=="product"||infoType=="company"){
            window.location = "Alitalk:SendIM?"+MyCount+"&url2=http://page.china.alibaba.com/others/feedbackfromalitalk.html?online="+OnLine+"#type="+infoType+"#memberLevel=pm#offerId=0#time="+d.getTime()+"#page=athena";
        }else{
            window.location = "Alitalk:SendIM?"+MyCount+"&url1=http://amis1.sh1.china.alibaba.com/potentialContact.dll?offerId=0&url2=http://page.china.alibaba.com/others/feedbackfromalitalk.html?online="+OnLine+"#type="+infoType.toLowerCase()+"#memberLevel=pm#offerId=0#time="+d.getTime()+"#page=athena";
        }
    } else {
        //提示安装贸易通
        window.target = "_blank";
      	window.open("http://china.alibaba.com/community/turbine/template/community%2CATCPromotionDown");
    }
  }


