//
//  G1.JS - Global JavaScript External file.
//  Author: Noam Arnon (n0am AT hotmail DOT com), © 2000 Noam Arnon.
//  <SCRIPT src="g1.js" type="text/javascript"></SCRIPT>
//

// ------------------ Miscellaneous ------------------
function w(m)  {document.write(""+m+"")}
function wl(m) {document.writeln(""+m+"")}
function wb(m) {document.write(""+m+"<br>")}
//function wb(m) {document.write((""+m=="undefined")?"<br>":m+"<br>");}
//function wb(m) {m=(""+m=="undefined")?"":m; document.write(m+"<br>");}

function jump(u) {location.href=u}
function Win(u,t) {window.open(u,t)}

function goR(o)  {o.Co=o.style.color; o.style.color="red"; o.style.cursor="hand";}
function reC(o)  {o.style.color=o.Co} // use with MouseOver...

function onn(o) {o.style.display="";}  // Show, Hide &Toggle section display...
function off(o) {o.style.display="none";}
function tog(o) {o.style.display=(o.style.display="")?"none":"";}
// ------------------ For expanding with.. ------------------
var _ss=null    // _ss=section, null => all sections closed
function ssec(c) { if(_ss!=null)_ss.style.display='none'; if(c!=_ss)
   {c.style.display=""; _ss=c;} else _ss=null; } // Close open sec, open clicked sec.

// ------------------ For Exanding over.. ------------------
function show(o) {if ((de=document.getElementById(o))!=null)
   {de.style.visibility='visible'; de.style.display='block';}}
function hide(o) {if ((de=document.getElementById(o))!=null)
   {de.style.visibility='hidden'; de.style.display='none';}}

// ------------------ Browser Version ------------------
function checkBrowser(){
  this.ver=navigator.appVersion
  this.dom=document.getElementById?1:0
  this.ie4=(document.all)?1:0;
  this.ns4=(document.layers)?1:0;
  this.ie5=(this.ie4&&this.ver.indexOf("5.")!=-1)?1:0;
  this.ie6=(this.ie4&&this.ver.indexOf("6.")!=-1)?1:0;
  this.ns5=(this.ns4&&parseInt(this.ver)>=5)?1:0;
  this.mac=(this.ver.indexOf("Mac")!=-1)?1:0;
  this.bw=(this.ie5||this.ie4||this.ns4||this.ns5)
  return this}
// bw=new checkBrowser();

// -------------- Handle Mouse right-button Clicks --------------
   var CRmsg="Copyright (c) N0am 2000";
   function click() {if(event.button==2){alert(CRmsg); return false;}}
// document.onmousedown=click;   defaultStatus=CRmsg;

// ------------------ Animated Status message ------------------
//<SCRIPT>  <!--
// var msg="Welcome to Vitel Electronics & Microwave Components / Systems!";
// var b=12, i=0, d=true; // <- for ping(50)
// var s=m=lm=""; // <- for sMessage()
// -->  </SCRIPT>
// == (1) ==
function ping(ss) {
  if(d){window.status=msg=" "+msg;      i++; if(i==b)d=!d;}
  else {window.status=msg=msg.slice(1); i--; if(i==0)d=!d;}
  setTimeout("ping("+ss+");",ss);}
// == (2) ==
function sMessage() { if(m==""){m=msg; s=" "; lm="";}
  if (s.length==1) {while(m.slice(0,1)==" ") {
      lm=lm+s; s=m.slice(0,1); m=m.slice(1);}
    lm=lm+s; s=m.slice(0,1); m=m.slice(1);
    for (var ii=0;ii<120;ii++)s=" "+s;}
  else s=s.slice(10);
  window.status=lm+s; setTimeout('sMessage()',10) }
// == (3) ==
function scrl(s) {var o=" ", c=1, m=msg; // call with s=99
  if (s>100) {s--; tt=setTimeout("scrl("+s+")",100);}
  else if(s<=100&&s>0) {for(c=0;c<s;c++)o+=" "; o+=m; s--;
    window.status=o; tt=setTimeout("scrl("+s+")",100);}
  else if(s<=0) {if(-s<m.length) {o+=m.slice(-s); s--;
    window.status=o; tt=setTimeout("scrl("+s+")",100);}
    else {window.status=" "; tt=setTimeout("scrl(100)",75);}}}

// ------------------  ------------------

