// ==========================================================================
// Some variables and default Browsercheck
// ==========================================================================
function bwCheck(){ 
	this.ver=navigator.appVersion;
	this.dom=document.getElementById?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5)?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5);
	this.ns=(this.ns4 || this.ns5);
	this.ie=(this.ie4 || this.ie5 || this.ie6);
	return this
}
var bw=new bwCheck();
// ==========================================================================
// If older browser inform about next steps to proceed
// ==========================================================================
if (!bw.bw) {
document.write('<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="1" WIDTH="400" BGCOLOR="#86ED00" ALIGN=CENTER><TR><TD VALIGN="middle" WIDTH="50"><FONT FACE="Verdana,Geneva,Arial,Sans Serif" SIZE="1">&nbsp;</FONT></TD><TD><FONT FACE="Verdana,Geneva,Arial,Sans Serif" SIZE="1"><b>Welcome to the Pixelshit Network</b><br> <br> To view these pages properly your browser needs to support Javascript. This means you need to upgrade to <A HREF="http://www.netscape.com/computing/download/index.html">Netscape Communicator 4.0</A> or later, or <A HREF="http://www.microsoft.com/downloads/">Microsoft Internet Explorer 4.0</A></FONT></TD></TR></TABLE>');
}
// ==========================================================================
// If correct browser writeIn stylesheet according to browser/platform combination and load JSEngine
// ==========================================================================
if (bw.bw) {
  if (navigator.platform.indexOf('Mac') > -1) {
    if (navigator.appName.indexOf('Microsoft') > -1) {
      document.write('<LINK HREF="'+currentPath+'css/mac_ie.css" REL="styleSheet" TYPE="text/css">');
    } else {
      document.write('<LINK HREF="'+currentPath+'css/mac_ns.css" REL="styleSheet" TYPE="text/css">');}
  } else {
    if (bw.ie) {
      document.write('<LINK HREF="'+currentPath+'css/win_unix_ie.css" REL="styleSheet" TYPE="text/css">');
    } else if (bw.ns4) {
      document.write('<LINK HREF="'+currentPath+'css/win_unix_ns4.css" REL="styleSheet" TYPE="text/css">');
    }
	else {
      document.write('<LINK HREF="'+currentPath+'css/win_unix_ns.css" REL="styleSheet" TYPE="text/css">');
  
    }
  }
} else { // Stylesheet for all other browsers
      document.write('<LINK HREF="'+currentPath+'css/other.css" REL="styleSheet" TYPE="text/css">');
}
// ==========================================================================
// MakePageCoordinates function to scan the user's available document body width and height plus add. options
// ==========================================================================
function makePageCoords(){
	this.x=0;
	this.x2=(bw.ns4 || bw.ns5)?innerWidth:document.body.offsetWidth;
	this.y=0;
	this.y2=(bw.ns4 || bw.ns5)?innerHeight:document.body.offsetHeight;
	this.x50=this.x2/2;	
	this.y50=this.y2/2;
	this.x10=(this.x2*10)/100-5;
	this.y10=(this.y2*10)/100-5;
	this.x15=(this.x2*15)/100-5;
	this.y15=(this.y2*15)/100-5; 
	return this
}
// ==========================================================================
// Img-Swap and Highlight
// ==========================================================================
function on(name){
         document[name].src = eval(name + "on.src");
}

function off(name){
         document[name].src = eval(name + ".src");
}
// ==========================================================================
// rePosition function when resizing window or menubars (specify new pageCoords and re-position all objects)
// ==========================================================================
function rePos() {
	if (this.x2 != window.innerWidth || this.y2 != window.innerHeight)
	document.location.href = document.location.href
}
// ==========================================================================
// PopUp centered win with add. features
// ==========================================================================
function newWin(page, name, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(page, name, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}



