function textCounter(field,maxlimit){
  if (field.value.length > maxlimit)
    field.value = field.value.substring(0, maxlimit); 
  else
    document.myform.remLen.value = maxlimit - field.value.length;
}
function SeePic(img,f)
{
  if ( f.value != "" ) { img.src = f.value; }
}
function isBlank(VALUE){
  var w_space = String.fromCharCode(32);
  if(VALUE.length < 1){
    return true;
  }
  var v_length = VALUE.length;
  var strTemp = "";

  var iTemp = 0;

  while(iTemp < v_length){
    if(VALUE.charAt(iTemp) != w_space){
      return false;
    }
    iTemp = iTemp + 1;
  }
  return true;
}
function dohot(k){
  if(k==2)
  {
    eval("hot1").className='BeCold';    
    eval("hot2").className='BeHot';
    eval("hotcenter1").style.display="none";
    eval("hotcenter2").style.display="block";
  }
  else
  {
    eval("hot2").className='BeCold';
    eval("hot1").className='BeHot'; 
    eval("hotcenter2").style.display="none";
    eval("hotcenter1").style.display="block";
  }
}
function dohot1(k){
  if(k==2)
  {
    eval("hot1").className='BeCold1';    
    eval("hot2").className='BeHot1';
    eval("hotcenter1").style.display="none";
    eval("hotcenter2").style.display="block";
  }
  else
  {
    eval("hot2").className='BeCold1';
    eval("hot1").className='BeHot1'; 
    eval("hotcenter2").style.display="none";
    eval("hotcenter1").style.display="block";
  }
}
function doBighot(k){
  if(k==2)
  {
    eval("bighot1").src="/images/s4.gif";
    eval("bighot2").src="/images/s1.gif";
    //eval("hottitle").innerHTML="请输入你感兴趣的美容品关键词：";
    eval("hotline").src="/images/hotl2.gif";
  }
  else
  {
    eval("bighot1").src="/images/s2.gif";
    eval("bighot2").src="/images/s3.gif";
    //eval("hottitle").innerHTML="请输入你用过的美容品关键词：";
    eval("hotline").src="/images/hotl1.gif";
  }
}
function Browser(){var ua, s, i;this.isIE = false;this.isNS = false;this.isOP = false;this.isSF = false;ua = navigator.userAgent.toLowerCase();s = "opera";if ((i = ua.indexOf(s)) >= 0){this.isOP = true;return;}s = "msie";if ((i = ua.indexOf(s)) >= 0) {this.isIE = true;return;}s = "netscape6/";if ((i = ua.indexOf(s)) >= 0) {this.isNS = true;return;}s = "gecko";if ((i = ua.indexOf(s)) >= 0) {this.isNS = true;return;}s = "safari";if ((i = ua.indexOf(s)) >= 0) {this.isSF = true;return;}}
function HtmlEncode(text){var re = {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'};for (i in re) text = text.replace(new RegExp(i,'g'), re[i]);return text;}
function HtmlDecode(text){var re = {'&lt;':'<','&gt;':'>','&amp;':'&','&quot;':'"'};for (i in re) text = text.replace(new RegExp(i,'g'), re[i]);return text;}
function gid(id){return document.getElementById?document.getElementById(id):null;}
function gna(id){return document.getElementsByName?document.getElementsByName(id):null;}
function gname(name){return document.getElementsByTagName?document.getElementsByTagName(name):new Array()}
function ScreenConvert(){var browser = new Browser();var objScreen = gid("ScreenOver");if(!objScreen) var objScreen = document.createElement("div");var oS = objScreen.style;objScreen.id = "ScreenOver";oS.display = "block";oS.top = oS.left = oS.margin = oS.padding = "0px";if (document.body.clientHeight)	{var wh = document.body.clientHeight+ 1000 + "px";}else if (window.innerHeight){var wh = window.innerHeight + "px";}else{var wh = "100%";}oS.width = "100%";oS.height = wh;oS.position = "absolute";oS.zIndex = "3";if ((!browser.isSF) && (!browser.isOP)){oS.background = "#cccccc";}else{oS.background = "#cccccc";}oS.filter = "alpha(opacity=40)";oS.opacity = 40/100;oS.MozOpacity = 40/100;document.body.appendChild(objScreen);var allselect = gname("select");for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "hidden";}
function ScreenClean(){var objScreen = document.getElementById("ScreenOver");if (objScreen) objScreen.style.display = "none";var allselect = gname("select");for (var i=0; i<allselect.length; i++) allselect[i].style.visibility = "visible";}
function showAllInfo(){ScreenConvert();DialogShow(500,300,500,10);}
function showAllInfo_obj(objname){obj=eval("objname");ScreenConvert();DialogShow_obj(obj,500,300,500,10);}
function showAllInfo_1(){ScreenConvert();DialogShow_1(500,-210,350,10);}
//tw,th偏位量，ww,wh窗口大小
function DialogShow_obj(obj,tw,th,ww,wh){var objDialog = document.getElementById("DialogMove");if (!objDialog) objDialog = document.createElement("div");t_DiglogW = tw;t_DiglogH =th;DialogLoc();objDialog.id = "DialogMove";var oS = objDialog.style;oS.display = "block";oS.top = t_DiglogY + "px";oS.left = t_DiglogX + "px";oS.margin = "0px";oS.padding = "0px";oS.width = ww + "px";oS.height = wh + "px";oS.position = "absolute";oS.zIndex = "100";oS.background = "#FFF";oS.border = "solid #000 1px";objDialog.innerHTML = gid(obj).innerHTML;document.body.appendChild(objDialog);}
function DialogShow(tw,th,ww,wh){var objDialog = document.getElementById("DialogMove");if (!objDialog) objDialog = document.createElement("div");t_DiglogW = tw;t_DiglogH =th;DialogLoc();objDialog.id = "DialogMove";var oS = objDialog.style;oS.display = "block";oS.top = t_DiglogY + "px";oS.left = t_DiglogX + "px";oS.margin = "0px";oS.padding = "0px";oS.width = ww + "px";oS.height = wh + "px";oS.position = "absolute";oS.zIndex = "100";oS.background = "#FFF";oS.border = "solid #000 1px";objDialog.innerHTML = floater.innerHTML;document.body.appendChild(objDialog);}
function DialogShow_1(tw,th,ww,wh){var objDialog = document.getElementById("DialogMove");if (!objDialog) objDialog = document.createElement("div");t_DiglogW = tw;t_DiglogH =th;DialogLoc();objDialog.id = "DialogMove";var oS = objDialog.style;oS.display = "block";oS.top = t_DiglogY + "px";oS.left = t_DiglogX + "px";oS.margin = "0px";oS.padding = "0px";oS.width = ww + "px";oS.height = wh + "px";oS.position = "absolute";oS.zIndex = "100";oS.background = "#FFF";oS.border = "solid #000 1px";objDialog.innerHTML = floater_1.innerHTML;document.body.appendChild(objDialog);}
function DialogLoc(){var dde = document.documentElement;if (window.innerWidth){var ww = window.innerWidth;var wh = window.innerHeight;var bgX = window.pageXOffset;var bgY = window.pageYOffset;}else{var ww = dde.offsetWidth;var wh = dde.offsetHeight;var bgX = dde.scrollLeft;var bgY = dde.scrollTop;}t_DiglogX = (bgX + ((ww - t_DiglogW)/2));t_DiglogY = (bgY + ((wh - t_DiglogH)/2));}
function DialogHide(){ScreenClean();var objDialog = document.getElementById("DialogMove");if (objDialog) objDialog.style.display = "none";}
function showP(id){
  eval("sel"+selid).className='BUP';  
  eval("sel"+id).className='BOff';
  selid=id;
  showPCenter.innerHTML = eval("floater"+id).innerHTML;
  return false;
}
function showpop(obj)
{
 ScreenConvert();DialogShow_obj(obj,500,300,500,10);return false;
}