//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//   SuperMain - JavaScript Function Collection
// -============================================-
//   Use It For Free But Dont Forget To Mention
//       www.SuperMain.com (Where U Get It)
//        Yovav Gad - Yovav@SuperMain.com
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Check Current Client Browser And Version
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function BrowserVer()
 {
 var Agent  = navigator.userAgent.toLowerCase();
 this.Name  = navigator.appName;
 this.Ver   = parseFloat(navigator.appVersion);
 this.Major = parseInt(navigator.appVersion);
 this.Minor = parseFloat(navigator.appVersion);
 this.IE    = (Agent.indexOf("msie") != -1);
 this.IE3   = (this.IE && (this.Major == 2));
 this.IE4   = (this.IE && (this.Major == 4));
 this.IE5   = (this.IE && (this.Major == 5));
 this.IE6   = (this.IE && (this.Major >= 6));
 this.Mac   = (Agent.indexOf("mac")!=-1);
 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.NS4b  = (this.NS && (this.Minor < 4.04)); // To Detect a Specific Bug In That Version
 this.NS4   = (this.NS && (this.Major == 4));
 this.NS5   = (this.NS && (this.Major == 5));
 this.NS6   = (this.NS && (this.Major >= 6));
 this.OP3   = (Agent.indexOf("opera") != -1);
 this.Unix  = (Agent.indexOf("x11")!=-1);
 this.Win   = (Agent.indexOf("win")!=-1);
 }
 var Browser = new BrowserVer(); // Used To Be Called Within The Program Body

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Determin How To Handle The Browser KeyWords
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(Browser.NS)
 {
 doc = "document";
 sty = "";
 htm = ".document"
 }
else // if(Browser.IE)
 {
 doc = "document.all";
 sty = ".style";
 htm = ""
 }

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Handle Link When Mouse On .Text_On
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function Text_On()
 {
 el = event.srcElement ;
 if (el.getAttribute("litUp1") != null) { el.className = "Text_On" ; }
 }
 document.onmouseover = Text_On;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Handle Link When Mouse Off .Text_Off
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function Text_Off() 
 {
 el = event.srcElement ;
 if (el.getAttribute("litUp1") != null) { el.className = "Text_Off"; }
 }
 document.onmouseout = Text_Off;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Turn On Image (Replace With Existing)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 function Turn_On(Image)
  { imgOn = eval(Image + "on.src"); document [Image].src = imgOn; }

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Turn Off Image (Replace With Existing)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 function Turn_Off(Image) 
  { imgOff = eval(Image + "off.src"); document [Image].src = imgOff; }


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Open a New Window With Parameters
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function NewWindow(URL)
 {
 MessageWindow = window.open(URL ,"","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizeable=yes,menubar=no,width=0,height=0");
 }
