function popUp(URL)
{
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=280,height=415');");
 }

function popUpPost(URL)
{
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=280,height=415');");
 }
  
function openWin(dir,name,w,h)
{
	var left = (screen.availWidth/2) - (w/2);
	var top = (screen.availHeight/2) - (h/2);
	colorWin = window.open(dir, name, 'scrollbars=1, toolbar=0, statusbar=0, width='+w+', height='+h+', left='+left+', top='+top);
	colorWin.focus()
}  

    function dodel(gb,gburl){
	if(confirm(gb)){
		window.location = gburl
	}
}

var ie45,ns6,ns4,dom;
if (navigator.appName=="Microsoft Internet Explorer")
  ie45=parseInt(navigator.appVersion)>=4;
else if (navigator.appName=="Netscape"){
  ns6=parseInt(navigator.appVersion)>=5;
  ns4=parseInt(navigator.appVersion)<5;}
dom=ie45 || ns6;

function showhide(id) {
el = document.all ? document.all[id] : 
  dom ? document.getElementById(id) : 
  document.layers[id];
els = dom ? el.style : el;
if (dom){
  if (els.display == "none")
    els.display = "";
  else els.display = "none";
  }
else if (ns4){
  if (els.display == "show")
    els.display = "hide";
  else els.display = "show";
  }
}

function setsmile(Titi) {
   document.signgb.yousay.value =
   document.signgb.yousay.value + Titi;
}

function openScript(url, width, height) {
        var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no,status=no' );
}

function check_search(okk)
{
if (okk.key.value == "")
  {
    alert("Chua nhap tu khoa");
   okk.key.focus();
    return (false);
  }
}