function CheckLogin() {
  if (document.getElementById("ctl00$ContentPlaceHolder1$UserLogin1$txtName").value == "") {
    alert("用户名不能为空!");
    return false;
  }
  if (document.getElementById("ctl00$ContentPlaceHolder1$UserLogin1$txtPassword").value == "") {
    alert("密码不能为空!");
    return false;
  }
  //if (document.getElementById("ctl00$ContentPlaceHolder1$UserLogin1$txtYangzheng").value == "") {
   // alert("验证码不能为空!");
  //  return false;
  //}
}
   function window_onload()
    {
     MM_CheckFlashVersion('7,0,19,0','本页内容需要使用较新的 Macromedia Flash Player 版本。是否现在下载它？');; //如果你的body 有启动函数加在这儿;
    }
    window.onload=window_onload;

canshu=0;
function f_wave()
{canshu=canshu-10;
//ShowCool.style.filter="Wave(Freq=1,LightStrength=20,Phase=" + canshu + ")";
setTimeout("f_wave()",100);
}
window.onload=f_wave;

function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100

else
cur.filters.alpha.opacity=80
}

function borderit(which,color){ 
if (document.all||document.getElementById){ 
which.style.borderColor=color 
} 
}


		function goprint(){
			var src = document.getElementById('couponpicsrc').src;
			window.open("../../print.aspx?url="+src);
		}

function w(vd) {
  var ob = document.getElementById(vd);
  if (ob.style.display == "block" || ob.style.display == "") {
    ob.style.display = "none";
    event.srcElement.style.background = "url(../pics/+.gif) no-repeat 0 0";
    //event.srcElement.style.margin = "0";
    //event.srcElement.style.padding = "0";
  } else {
    ob.style.display = "block";
    event.srcElement.style.background = "url(../pics/-.gif) no-repeat 0 0";
  }
}
function k(vd) {
  var ob = document.getElementById(vd);
  if (ob.style.display == "block") {
    ob.style.display = "none";
    event.srcElement.style.background = "url(../pics/+.gif) no-repeat 0 0";
  } else {
    ob.style.display = "block";
    event.srcElement.style.background = "url(../pics/-.gif) no-repeat 0 0";
  }
}

function high() {
  event.srcElement.style.backgroundColor = "#dcdcdc"
}
function low() {
  event.srcElement.style.backgroundColor = "white"
}
function high2() {
  event.srcElement.style.backgroundColor = "#ffcc66"
}
function low2() {
  event.srcElement.style.backgroundColor = ""
}

// JavaScript Document

function RequestKey(R_str, R_text) {
  if (R_str.value == R_text) {
    R_str.value = '';
  }
}
function opensearch() {
  var v = document.getElementById("ctl00_ddlType").options[document.getElementById("ctl00_ddlType").selectedIndex].value;
  var keyword = document.getElementById("ctl00_txtKeyword").value;
  window.open("../ProductList.aspx?type=" + v + "&keyword=" + keyword);
}

function SearchGoogle(key, evt) {
  var cof = "GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1";
  if (evt.keyCode == 13 || evt.keyCode == 0 || evt.type == 'click') {
    key.focus();
    var keystr = encodeURIComponent(key.value);
    url = "http://www.baidu.com/s?wd=" + keystr + "&submit=&ct=2097152&si=ballwest.com&s=on&ie=UTF-8";
    //url = url + keystr;
    //url += "&sa=%CB%D1%CB%F7&sitesearch=" + site + "&forid=1&ie=UTF-8&oe=GB2312&cof=" + cof + "&hl=zh-CN";
    //window.location=url;
    window.open(url, "111", "height=500,width=800,status=yes, toolbar=yes, resizable=yes, menubar=yes, scrollbars=yes, location=yes");
    return false;
  }
}
function SetNull(key) {
  if (key.value == "输入内容进行本站搜索") {
    key.focus();
    key.value = "";
  }
}
function SetDefault(key) {
  if (key.value == "") {
    key.value = "中国酒水定制网";
  }
}
