/***************************************************************************
Global Javascript 
RMT Students .com All Right reserved
-------------------------------------
Developed By Cory Caines - Kreatednine.com
**************************************************************************/

/*Dom Functions */
function $(id){
	return window.document.getElementById(id);	
}
function tag(domTag){
	return window.document.getElementsByTagName(domTag);
}
function msg(txt){
	window.alert(txt);
}
function echo(txt){
	window.document.write(txt);
}
function wopen(url){
	var posX = (screen.width - 400) / 2;
	var posY = (screen.height - 400) / 2;
	params = 'height=400,width=400,top='+posY+',left='+posX+',scrollbars=yes,status=0,resizable=1';
	var pic =  window.open(url, "viewPic", params);
	pic.focus();
	
}

/*Browser Check */
function CheckBrowser(){
	this.IE    = false;
	this.NS    = false
	agent = navigator.userAgent;
	if ((i = agent.indexOf("MSIE")) >= 0) {
		this.IE = true;
		return;
	}
	if ((i = agent.indexOf("Gecko")) >= 0) {
		this.NS = true;
		return;
	}
	if ((i = agent.indexOf("Netscape6/")) >= 0) {
		this.NS = true;
		return;
	}	
}

// Jump around the page with anchors
function jump(loc){
	window.document.location.hash = loc;
}

//functions for the search box
function sFocus(el){
	if(el.value=='Search'){
		el.value='';
	}else{
		el.select();
	}
	el.style.width= "220px";
}
function sBlur(el){
	if(el.value=='')el.value='Search';
	el.style.width = "140px";
	
}
function printPage(typ,url){
	var posX = 0;
	var posY = 0;
	params = 'height=10,width=10,top='+posY+',left='+posX+',scrollbars=no,status=0,resizable=0';
	var printpage =  window.open('', "PrintPage", params);
	printpage.location.replace(url);
	printpage.setTimeout("self.close()",2000);
	printpage.focus();
}