var now = new Date();
var yr = now.getYear();
var thu = now.getDay()+1;

if (yr == 100) { yr += 1900 }

var mName = now.getMonth() + 1;
var dayNr = now.getDate();
var hours = now.getHours();

//chuyen thanh thang tuong ung

if(mName==1) Month="01";
if(mName==2) Month="02";
if(mName==3) Month="03";
if(mName==4) Month="04";
if(mName==5) Month="05";
if(mName==6) Month="06";
if(mName==7) Month="07";
if(mName==8) Month="08";
if(mName==9) Month="09";
if(mName==10) Month="10";
if(mName==11) Month="11";
if(mName==12) Month="12";

//chuyen thanh ngay tuong ung
if(thu==1) Ngaythu="Dimanche";
if(thu==2) Ngaythu="Lundi";
if(thu==3) Ngaythu="Mardi";
if(thu==4) Ngaythu="Mercredi";
if(thu==5) Ngaythu="Jeudi";
if(thu==6) Ngaythu="Vendredi"
if(thu==7) Ngaythu="Samedi";

function twoDigits(x){
    x = '0' + x;
    return x.match(/\d\d$/);
}
dayNr = twoDigits(dayNr) ;

    var browser_type = 0;
    var browser_message = "Not Supported";
    if(navigator.userAgent.indexOf("Netscape")!= -1 )
    {
            browser_type = 1;
    }
    else
    if(navigator && navigator.userAgent && navigator.userAgent.indexOf && navigator.userAgent.indexOf('Gecko') != -1)
    {
         //document.write(editor);
         browser_type=2;
    }
    else
    if(navigator.userAgent.indexOf("Opera")!= -1)
    {
        //document.write(browser_message);
        browser_type =4;
        submit ="";
    }
    else
    if(navigator.userAgent.indexOf("MSIE")!= -1)
    {
        //document.write(editor);
        browser_type=3;
    }
    else
    {
        //document.write(browser_message);
        browser_type =5;
        submit ="";
    }
    //alert(browser_type) ;
var strMyBrowser;
setMyBrowser();
function Is() {
    var agent = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
    this.ns2 = (this.ns && (this.major == 2));
    this.ns3 = (this.ns && (this.major == 3));
    this.ns4 = (this.ns && (this.major == 4));
    this.ns5 = (this.ns && (this.major > 4));
     this.ns6    = (this.ns && (this.major == 6));
     this.ns7    = (this.ns && (agent.indexOf("netscape/7") !=-1));
     this.ns71    = (this.ns && (agent.indexOf('netscape/7.1')!=-1));
     this.ns72    = (this.ns && (agent.indexOf('netscape/7.2')!=-1));
     this.firefox    = (this.ns && (agent.indexOf('firefox')!=-1));
    this.ie = (agent.indexOf("msie") != -1);
    this.ie3 = (this.ie && (this.major == 2));
    this.ie4 = (this.ie && (this.major >= 4));
    this.ie55    = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.5") != -1));
    this.ie6    = (this.ie && (agent.indexOf("msie 6.0")!=-1));
    this.cs6    = (agent.indexOf("2000 6")!=-1); // CompuServe 6.0
    this.cs7    = (agent.indexOf("cs 2000 7")!=-1); // CompuServe 7.0
    this.op3 = (agent.indexOf("opera") != -1);
    this.mac = (agent.indexOf("mac") != -1);
    this.client = ( (navigator.userAgent.indexOf('AOL')!=-1) || (navigator.userAgent.indexOf('CS 2000')!=-1) )? 1 : 0;
}


function setMyBrowser() {
   if (document.all) {
      strMyBrowser = "IE";
   } else {
      strMyBrowser = "Netscape";
   }
}

function createMyObj(divblock) {
    if (strMyBrowser == "IE") {
        return eval("document.all."+divblock+".style");
    } else if (is.ns5) {
        return document.getElementById(divblock).style;
    } else if (is.ns4) {
        return eval("document."+divblock);
    }
}

function showdiv(div) {
     if (is.ns4)
        div.visibility="show";
     else
        div.visibility="visible";

}
function hidediv(div) {
     if (is.ns4)
        div.visibility="hide";
     else
        div.visibility="hidden";

}
