function $(id) {
	var obj;
	if (document.getElementById){
		obj = document.getElementById(id);
	}
	else if (document.all){
		obj = document.all[id];
	}
	else if (document.layers){
		obj = document.layers[id];
		obj.style = document.layers[id];
	}
	return obj;
}

function GetObj(id) {
	if (document.getElementById(id))
		return document.getElementById(id);
	else
		return null;
}

function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function runLoop(iterations, executable) {
	if (typeof(executable)=='string') {
		var codeString = executable;
		executable = function() {eval(codeString);}
	}
	var segSize = 16;
	var n = iterations % segSize;
	while (n--) {
		executable.call(this);
	}	
	n = parseInt(iterations / segSize);
	while (n--) {
		executable.call(this); executable.call(this); executable.call(this); executable.call(this);
		executable.call(this); executable.call(this); executable.call(this); executable.call(this);
		executable.call(this); executable.call(this); executable.call(this); executable.call(this);
		executable.call(this); executable.call(this); executable.call(this); executable.call(this);
	}
}


//Added from sportsminded.com

function msg(message, link){	
	p_ok = window.confirm(message)
	if (p_ok) {	
		document.location.href = link  
	}
}

function newwin( link, t, w, h ) {	
	wX = (screen.width/2)- 200;
	wY = (screen.height/2)-100;
	w = window.open(link,t,"width=" + w + ",height=" + h + ",top=" + wY + ",left=" + wX + ", resizable=1, status=1, scrollbars=1" );
	w.opener = self;
}

function lnksub(link) {	
	document.f1.action = link;
	//alert(document.f1.action);
	document.f1.submit();
}