// ************************  Miscellaneous site specific scripts ***************************** //

function XanaWin(which, w, h) {
	popupWin = window.open(which, 'XanaWin', 'scrollbars,width='+w+',height='+h);
	popupWin.focus();
	}
	
function XanaWin2(which, w, h) {
	popupWin = window.open(which, 'XanaWin', 'width='+w+',height='+h);
	popupWin.focus();
	}
	
function writemail(user,domain)
	{
		location.href = "mailto:"+user+"@"+domain;
	}
	
if (top.location != self.location) 
	{
	top.location = self.location
	}
	
window.defaultStatus="Welcome!";

// ************************  Positionable Popup window script ***************************** //

	var PopupWindow=null;
	
	function Popup(mypage,myname,w,h,pos,infocus){
		if(pos=='random'){
			LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
			TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
		if(pos=='center'){
			LeftPosition=(screen.width)?(screen.width-w)/2:100;
			TopPosition=(screen.height)?(screen.height-h)/2:100;}
		else if((pos!='center' && pos!='random') || pos==null){LeftPosition=100;TopPosition=100;}settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
		
		PopupWindow=window.open(mypage,myname,settings);
	}

