﻿function ie()
{     
   if ((navigator.userAgent.indexOf("Opera") != -1) || (navigator.userAgent.indexOf("Fire") != -1) 
   || (navigator.userAgent.indexOf("Netscape") != -1) || (navigator.userAgent.indexOf("Chrome") != -1))
     {return false;}
   else 
     {return true;}
}

function opera()
{
   return (navigator.userAgent.indexOf("Opera") != -1);
}

function chrome()
{
   return (navigator.userAgent.indexOf("Chrome") != -1);
}

function correctNavigatorVersion()
{
  var version;
  var ua = navigator.userAgent;
  
  s = "MSIE";  
  if ((i = ua.indexOf(s)) >= 0) {    
    version = parseFloat(ua.substr(i + s.length));        
    if (version < 7)
      return false;
    else 
      return true;  
  }  
  
  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {        
    return true;
  }  
  
  s = "Opera";  
  if ((i = ua.indexOf(s)) >= 0) {          
    return false;
  }  
  
  return false; 
}

function navigatorwidth(ob)
{        
   var obj = ob? ob:top;                     
   if (ie())       
     return obj.document.documentElement.clientWidth;
   else
     return obj.window.innerWidth;   
}

function navigatorheight(ob)
{       
   var obj = ob? ob:top;                     
   if (ie())       
     return obj.document.documentElement.clientHeight; 
   else
     return obj.window.innerHeight;                     
}