/*
	Main script file
*/
//General


var screenWidth = window.screen.width;
var	screenHeight = window.screen.height;
window.onerror=handleErrors;
function moveWin() {}
//open window for link without any special features

var focusTimer;
var win;
function regainFocus() {
	clearInterval(focusTimer);
	win.focus();
}
function openWindow(theURL) {

	var w=450;
	var h=380;
	var l=screenWidth-w-40;
	var t=310;
	win=window.open(theURL,'linkWindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h+',left='+l+',top='+t);
	win.focus();
	focusTimer=setInterval("regainFocus()",2000);
	//endX = screenWidth - thiswidth - thisMargin;
	//endY = screenHeight - thisheight - thisMargin;
}
//macromedia script for opening windows
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//error trapped
function handleErrors() {

}
/*
function getElement(id) {
	alert(id);
	return document.getElementById ? document.getElementById(id) : document.all ? document.all[id] : null;
}*/
function getElement(e) {
	if (document.all[0]!=null) {
		return document.all[e];
	} else {
		return document.getElementById(e)
	}
}
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}
