var NS, MO, IE
if (navigator.appName == "Netscape") {NS = true;  MO = false; IE = false;}
else {NS = false; MO = false; IE = true;}
if (navigator.userAgent.indexOf("Gecko") > -1) {NS = false;  MO = true; IE = true;}
if (navigator.userAgent.indexOf("Netscape6") > -1) {NS = false; MO = true; IE = true;}
//*********************************************************************************
function ReloadWin() {
	if (NS) {
      if (origWidth != window.innerWidth || origHeight != window.innerHeight) {
	  myLocation = window.location.href
         window.location.href = myLocation
      }
   }
}
//*********************************************************************************
function WindowPopup(doc, Hx, Wx, name, scroll)
{
window.open(doc, name, "height=" + Hx + ",width=" + Wx + ",status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=" + scroll);
}
//*********************************************************************************
function preloadImages() {
	var d=document;
	
	if(d.images){
		if(!d.MM_p) d.MM_p=new Array();
		var i, j=d.MM_p.length, a=MM_preloadImages.arguments;
		for(i=0; i<a.length; i++)
			if(a[i].indexOf("#")!=0){
				d.MM_p[j]=new Image;
				d.MM_p[j++].src=a[i];
			}
	}
}
//*********************************************************************************

function KW_s(r, g, b, el) {
    d=document;hr=r.toString(16);hg=g.toString(16);hb=b.toString(16);
	hr=(hr.length==1)?"0"+hr:hr;hg=(hg.length==1)?"0"+hg:hg;hb=(hb.length==1)?"0"+hb:hb;
	if (d.getElementById) d.getElementById(el).style.color="#"+hr+hg+hb;
}

function KW_c(a,b,s,i) { return Math.floor(a*((s-i)/s)+b*(i/s)) }

// start fade--red,green,blue, finnish fade--red,green,blue,fade time, link ID
function KW_fade(r,g,b,e,n,l,s,o){
    for(i=0;i<=s;i++)setTimeout("KW_s("+KW_c(r,e,s,i)+","+KW_c(g,n,s,i)+","+KW_c(b,l,s,i)+",'"+o+"');",i*s);
}
//*********************************************************************************