/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

	Written by Bugimus 

	Copyright © 2001-2002 Bugimus, all rights reserved.

	You may use this code for your own *personal* use provided you leave this comment block intact.  

	A link back to Bugimus' page would be much appreciated.  

	http://bugimus.com/



	This script should work for NN4, NN6, IE5+, and OP6

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */



IE5=NN4=NN6=OPA=false

if(navigator.userAgent.toLowerCase().indexOf("opera")+1)OPA=true

else if(document.all)IE5=true

else if(document.layers)NN4=true

else if(document.getElementById)NN6=true



onload=initialize   // call initialize() when page loads

onresize=rePos      // call rePos() whenever page is resized



// Opera doesn't have an onresize event so you have to call rePos all the time.

if(OPA) setInterval("rePos()",500)



function initialize() {

	if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {

		enableAlphaImages();

	}

	if(NN4){ 

		myObj=document.centerDiv

		

	}else{ 

		myObj=document.getElementById("centerDiv").style

		

	}

	rePos()

}



w=607   // width of the div



function rePos() {

	// compute center coordinate

	if(NN4||NN6) {

		xc=Math.round((window.innerWidth/2)-(w/2))

		xh = window.innerHeight;

	} else {

		xc=Math.round((document.body.clientWidth/2)-(w/2))

		xh = document.body.clientHeight;

	}

	if(xc<0){

		xc = 0;

	}

	// reposition div

	if(this.NN4) {

		myObj.moveTo(xc,0)

		

	} else {

		myObj.left = xc + "px"

	}

	myObj.visibility = (NN4) ? "show" : "visible";

	

  	//this.element.visibility = (NS4) ? "hide" : "hidden";



	/*myObj.visibility = "visible";

	topDirtObj.visibility = "visible";

	bottomDirtObj.visibility = "visible";*/

}

function getHeight(id){

	return document.getElementById(id).offsetHeight;

}

//PNG

function enableAlphaImages(){

	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');

	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	if (itsAllGood) {

		for (var i=0; i<document.all.length; i++){

			var obj = document.all[i];

			var bg = obj.currentStyle.backgroundImage;

			var img = document.images[i];

			if (bg && bg.match(/\.png/i) != null) {

				var img = bg.substring(5,bg.length-2);

				var offset = obj.style["background-position"];

				obj.style.filter =

				"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img+"', sizingMethod='crop')";

				obj.style.backgroundImage = "url('img/px.gif')";

				obj.style["background-position"] = offset; // reapply

			} else if (img && img.src.match(/\.png$/i) != null) {

				var src = img.src;

				img.style.width = img.width + "px";

				img.style.height = img.height + "px";

				img.style.filter =

				"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')"

				img.src = "img/px.gif";

			}



		}

	}

}





//No spam function for email

function NoSpam(n,d){

	this.location.href = "mailto:"+n+"@"+d;	

}