// richardseymour.net javascripts, written by Richard Shea for Millini Interactive
// (c) 2003 www.millini.co.uk


function WinWPos(){w = (screen.width);  return (w/2 - 375);}
function WinHPos(){h = (screen.height); return (h/2 - 225);}

function ResetWin(){
	this.moveTo(OrigW,OrigH)
	this.focus();
	setTimeout("ResetWin()",2000)
}

function CloseMate(){
	if (opener.MasterWin){opener.CloseMate()}
}

function QueryString() {
  var oQuery = new Object();
  var sSearch = document.location.search.substring(1);
  if (sSearch.length > 0) {
    var asKeyValues = sSearch.split('&');
    var asKeyValue = '';
    for (var i = 0; i < asKeyValues.length; i++) {
      asKeyValue = asKeyValues[i].split('=');
      oQuery[asKeyValue[0]] = asKeyValue[1];
    }
 } return oQuery;
}
var myQueryStuff = new QueryString();

var MouseOv=0
if (navigator.appName.indexOf("Netscape") != -1 && parseFloat(navigator.appVersion) >= 3.00){MouseOv=1;}
if (navigator.appName.indexOf("Microsoft") != -1 && parseFloat(navigator.appVersion) >= 4.00){MouseOv=1;}

// Variable names required: Iloc = Image Location (i.e. 'images/nav/'), Ext = Extension (i.e. '.gif')
Rloc=''; Iloc='images/'; Ext='.gif'; Numx='x'; Stateon='_on'; Stateoff='_off';


////////////////// GENERAL MOUSEOVER FUNCTIONS ///////////////////
i = "0"
function MouseCLICK(Num){
if (MouseOv){document.images[Num].src = Iloc+document.images[Num].name+Stateon+Ext;

if (Numx != Num && Numx != 'x'){document.images[Numx].src = Iloc+document.images[Numx].name+Stateoff+Ext;}
Numx = Num}
window.status="";
}

function MouseON(Num,Srs){
	if (MouseOv){document.images[Num].src = Iloc+document.images[Num].name+Stateon+Ext;}
	if (Srs == null){Srs = document.images[Num].alt}
	window.status=Srs;
}
function MouseOFF(Num){
	if (MouseOv){
		if (Num != Numx){document.images[Num].src = Iloc+document.images[Num].name+Stateoff+Ext;}
		}
	window.status="";
}
function ImageOn(){
	MouseCLICK(ImgOn)
}
function MouseStick(Num){
	if (MouseOv){document.images[Num].src = Iloc+document.images[Num].name+'_on'+Ext; Numx = Num}
	window.status="";
}

/////////////////////////////////////////////////////////////
// Layer functions
if (document.getElementById){
   var doc = 'document.', vis = '.style.visibility', pos = '.style.top';;
}
else if (document.all) {
   var doc = 'document.all.', vis = '.style.visibility', pos = '.style.top';;
}
else if (document.layers){
	var doc = 'document.document.', vis = '.visibility', pos = '.top';;
}


function show(object) {
	if (document.getElementById){
		eval(doc + "getElementById('"+object+"')" + vis + ' = "visible"');
	}
	else if (document.layers || document.all){
		eval(doc + object + vis + ' = "visible"');
	}
}
function hide(object) {
	if (document.getElementById){
		eval(doc + "getElementById('"+object+"')" + vis + ' = "hidden"');
	}
	else if (document.layers || document.all){
		eval(doc + object + vis + ' = "hidden"');
	}
}

function WriteToLayer(object,content){
	if (document.getElementById){
		document.getElementById(object).innerHTML = content;
	}
	if (document.layers) {
		document.layers[object].document.open();
		document.layers[object].document.write(content);
		document.layers[object].document.close();
	}
	else if (document.all){
		document.all(object).innerHTML =  content;
	}
}

