LogoJsExist='YES';
LogoH = 150;
LogoW = getLogoW();
//LogoW = 500;
gPos=LogoW/2-70;
emailLeft=220;
menuOffset=239; 
var isShowLog=true;  
if (self.location.href.indexOf('nologo=')!=-1) isShowLog=false;
if (self.location.href.indexOf('e.glob.com.my')!=-1) isShowLog=false;
if (isShowLog) {
   document.write('<div id="logoDIV" align="center" class="noPrint" style="position:absolute; top:0; left:0; z-index:1;">');
   document.write('<IMG id="theLogo" SRC="http://'+self.location.hostname+'/images/globBanner.jpg" width='+(LogoW)+' height="'+LogoH+'">');
   document.write('</div>');
   document.write('<div class="noPrint" id="gDiv" style="position:absolute; top:-10; left:'+gPos+'; z-index:2;">');
   document.write('<A href="http://' +self.location.hostname+'/index.html" onclick="SignOut();" title="back to home page" >');  
   document.write('<IMG align=center SRC="http://'+self.location.hostname+'/images/miniGlob.png" border="0" style="position:absolute;top:5;">');
   document.write('</A></div>');

   document.write('<div id="webmail" class="noPrint" style="position:absolute; top:110; left:'+(LogoW-emailLeft)+';  z-index:3;" >');
   document.write('<img src="http://'+self.location.hostname+'/images/home.gif" width="16" height="16" border=0 >&nbsp;&nbsp;');  
   document.write('<A href="http://'+self.location.hostname+'/index.html" onclick="SignOut();" title="back to home page" >');   
   document.write('<font size=1 font face="Verdana" color="Yellow"><B>HOME</a></B></font>');
   document.write('&nbsp; &nbsp; &nbsp;');
   document.write('<img src="http://'+self.location.hostname+'/images/email.gif" width="16" height="16" border=0 >&nbsp;');  
     document.write('<a href="http://'+self.location.hostname+'/webmail">');
   document.write('<font size=1 font face="Verdana" color="Yellow"><B>Check Mail</a></B></font>');
   document.write('</div>');
}
function getLogoW() {
   if (parseInt(navigator.appVersion)>3) {
      if (navigator.appName=="Netscape") { return document.width-18; }
       if (navigator.appName.indexOf("Microsoft")!=-1) { return document.body.offsetWidth-20;  } 
   } else return 600;
}

/* function getBrowserH() {
   if (parseInt(navigator.appVersion)>3) {
     if (navigator.appName=="Netscape") { 
        return document.height;
     }
     if (navigator.appName.indexOf("Microsoft")!=-1) {
         return document.body.offsetHeight;  
     }
   } else return 600;
} */


function getBrowserH() {
   if (parseInt(navigator.appVersion)>3) {
     if (navigator.appName=="Netscape") { 
        return 600;
     }
     if (navigator.appName.indexOf("Microsoft")!=-1) {
         return 600;  
     }
   } else return 600;
}

function getLogoRef(divID) {
    if( document.getElementById ) { //DOM; IE5, NS6, Mozilla, Opera
        return document.getElementById(divID); }
    if( document.all ) { //Proprietary DOM; IE4
        return document.all[divID]; }
    if( document.layers ) { //Netscape layers
        return document.layers[divID]; }
    if( document[divID] ) { //Netscape alternative
        return document[divID]; }
    return false;
}
function resizeLogo() {
//alert(document.body.clientHeight+'   '+window.screen.height);
winW = document.all ? document.body.clientWidth : window.innerWidth;
    winW = getLogoW();
    if( document.getElementById ) {  document.getElementById('theLogo').width=winW; }
    if( document.all ) {             document.all['theLogo'].width=winW; }
    if( document.layers ) {          document.layers['theLogo'].width=winW; }
    if( document['theLogo'] ) {      document['theLogo'].width=winW; }    
   var eG=getLogoRef('gDiv');
   if (eG) { if (eG.style) eG.style.left=(winW/2-70); }
   var eMa=getLogoRef('webmail');
   if (eMa) { if (eMa.style) eMa.style.left=winW-emailLeft; }
}
function OpenCalendar() {
   cURL=cP+'calendar.html';
   window.open(cURL, '__calendar', 'height=400,width=500,z-index=-1,location=0,resizable=1,scrollbars=1,top=5,left=5 ');
}
function SignOut() {
      document.cookie = "validuser=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
      document.cookie = "userid=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
      document.cookie = "password=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
      document.cookie = "area=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
      document.cookie = "district_zone=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
      document.cookie = "su=;expires=Thu, 01-Jan-1970 00:00:01 GMT";
}