var clean=1;
var pageName;
var imageName;

if (document.images) {
  newson 		= new Image(125,32); newson.src = "http://www.battle.net/images/battle/images/menu/news-on.gif";
  newsoff 		= new Image(125,32); newsoff.src = "http://www.battle.net/images/battle/images/menu/news-off.gif";
  forumson		= new Image(125,32); forumson.src = "http://www.battle.net/images/battle/images/menu/forums-on.gif";
  forumsoff		= new Image(125,32); forumsoff.src = "http://www.battle.net/images/battle/images/menu/forums-off.gif";
  chaton		= new Image(125,32); chaton.src = "http://www.battle.net/images/battle/images/menu/chat-on.gif";
  chatoff		= new Image(125,32); chatoff.src = "http://www.battle.net/images/battle/images/menu/chat-off.gif";
  ladderon		= new Image(125,32); ladderon.src = "http://www.battle.net/images/battle/images/menu/ladder-on.gif";
  ladderoff		= new Image(125,32); ladderoff.src = "http://www.battle.net/images/battle/images/menu/ladder-off.gif";
  tournon		= new Image(125,32); tournon.src = "http://www.battle.net/images/battle/images/menu/tourn-on.gif";
  tournoff		= new Image(125,32); tournoff.src = "http://www.battle.net/images/battle/images/menu/tourn-off.gif";
  straton		= new Image(125,32); straton.src = "http://www.battle.net/images/battle/images/menu/strat-on.gif";
  stratoff		= new Image(125,32); stratoff.src = "http://www.battle.net/images/battle/images/menu/strat-off.gif";
  fileson		= new Image(125,32); fileson.src = "http://www.battle.net/images/battle/images/menu/files-on.gif";
  filesoff		= new Image(125,32); filesoff.src = "http://www.battle.net/images/battle/images/menu/files-off.gif";
  suppon		= new Image(125,32); suppon.src = "http://www.battle.net/images/battle/images/menu/supp-on.gif";
  suppoff		= new Image(125,32); suppoff.src = "http://www.battle.net/images/battle/images/menu/supp-off.gif";
}

function pop( pageName ) {
  popup=open( "/popup/" + pageName + ".htm", "popup", "width=300,height=100,resizeable=no" );
  clean=0;
}

function endpop() {
  if ( clean!=1 && !popup.closed ) {
    popup.close();
  }
}

function point( imageName ) {
  if ( document.images ) {
    document[ imageName ].src = eval(imageName + "on.src");
  }
}

function nopoint( imageName ) {
  if ( document.images ) {
    document[ imageName ].src = eval(imageName + "off.src");
  }
}

var visibleVar="null";
var position="null";

       if (navigator.appName == "Netscape") {
			layerStyleRef="layer.";
			layerRef="document.layers";
			styleSwitch="";
			visibleVar="show";
			abc="relative";
       }else{
			layerStyleRef="layer.style.";
			layerRef="document.all";
			styleSwitch=".style";
			visibleVar="visible";
			abc="static";
			
			if (document.styleSheets["bnetstyle"]) {
			
	  			document.styleSheets["bnetstyle"].addRule ("input", "background-color: 021C05");
				document.styleSheets["bnetstyle"].addRule ("input", "border-style: solid");
				document.styleSheets["bnetstyle"].addRule ("input", "border-width: 1px");
	  			document.styleSheets["bnetstyle"].addRule ("input", "border-color: 139220");
				document.styleSheets["bnetstyle"].addRule ("input", "color: 00FF1B");
				
	  			document.styleSheets["bnetstyle"].addRule ("textarea", "background-color: 021C05");
				document.styleSheets["bnetstyle"].addRule ("textarea", "border-style: solid");
				document.styleSheets["bnetstyle"].addRule ("textarea", "border-width: 1px");
	  			document.styleSheets["bnetstyle"].addRule ("textarea", "border-color: 139220");
				document.styleSheets["bnetstyle"].addRule ("textarea", "color: 00FF1B");
				
	  			document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Base-Color: 021C05");
				document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Arrow-Color: 17CD2A");
				document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-3dLight-Color: 17CD2A");
	  			document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-DarkShadow-Color: black");
				document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Highlight-Color: black");		
				document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Shadow-Color: 17CD2A");		
	
				document.styleSheets["bnetstyle"].addRule ("select", "background-color: 021C05");
				document.styleSheets["bnetstyle"].addRule ("select", "color: 00FF1B");
			}
		}
