﻿function an(id)
{        
    document.getElementById(id).style.display="none";  
  
  } 
  function hien(id)
{        
    document.getElementById(id).style.display="block";  
  
  } 
  
  function tab(tab1,tab2)
  {
   document.getElementById(tab1).style.display="block"; 
     document.getElementById(tab2).style.display="none"; 
  } 
  
  //ham chi cho nhap so
function nhapso(eventObj, obj)
{
    var keyCode
    if (document.all)  {  keyCode=eventObj.keyCode }
    else { keyCode=eventObj.which}
    var str=obj.value

     if(keyCode==8)
    { return true;   }
    if((keyCode<48 || keyCode >58)  &&   (keyCode != 8))
    { // Allow only integers and  points
    return false;
    }

    return true;
}



function bookmark_us(url, title){

if (window.sidebar) // firefox
    window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
    var elem = document.createElement('a');
    elem.setAttribute('href',url);
    elem.setAttribute('title',title);
    elem.setAttribute('rel','sidebar');
    elem.click();
} 
else if(document.all)// ie
    window.external.AddFavorite(url, title);
}

//thay doi mau nen dâtgrid

var lastColor;
function DG_changeBackColor(row, highlight)
{

if (highlight)
{
row.style.cursor = "hand";
lastColor = row.style.backgroundColor;
row.style.backgroundColor = '#ddd8d8';
}
else
row.style.backgroundColor = lastColor;
}

///goi trang pop up
function upload()
{
window.open('upload.aspx','upload','height=250,width=500,left=400,top=300');
}

