function showlayer(obj1,c){
  if (c == "1"){
    obj1.style.visibility = "visible";
  }else if (c == "2"){
    obj1.style.visibility = "hidden";
  }
}

function changecolor(obj1,c){
  if (c == "1"){
    obj1.bgColor = "#6b6b6b";
    obj1.style.color = "white";
  }else if (c == "2"){
    obj1.bgColor = "#585858";
    obj1.style.color = "white";
  }
}

function OpenWindow(FN,w,h){
    window.open(FN,"","width=" + w + ",height=" + h + ",top=" + ((window.screen.height - h) / 2) + ",left=" + ((window.screen.width - w) / 2) + ",fullscreen=no,channelmode=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no","replace");
}

function ShowHide(Obj){
  if (Obj.style.display == ""){
    Obj.style.display = "none";
  }else{
    Obj.style.display = "";
  }
}

function checkdateformat(syy,smm,sdd){
  if (syy == "" || smm == "" || sdd == ""){
    return true;
  }else{
    if (smm == "4" || smm == "6" || smm == "9" || smm == "11"){
      if (sdd > 30){
    	return false;
      }else{
        return true;
      }
    }else{
      if (smm == "2"){  
    	if ((syy % 4) == 0){  
    	  if (sdd > 29){
    	    return false;
          }else{
            return true;
          }
        }else{
          if (sdd > 28){
    	    return false;
          }else{
            return true;
          }
        }
      }else{
        return true;  	
      } 	
    }
  }
}

function checksearchall(str1){
  var a = document.getElementById("askeyowrd");
  if(a.value == ""){
    alert(str1);
  }else{
    window.location.href = "search.asp?keyword=" + escape(a.value);
  }
}

function checksearchallkeydown(str1){
  if (event.keyCode == 13){
    checksearchall(str1);			
  }
}

