function CheckAll(theElement) {
	var theForm = theElement.form, z = 0;
	for(z=0; z<theForm.length;z++){
		if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
			theForm[z].checked = theElement.checked;
		}
	}
}

function Submit(sAction,sForm) { 
	document.getElementById(sForm).action = sAction; 
	document.getElementById(sForm).submit(); 
} 

function GetDiv(sName){
	var Div = document.getElementById(sName);
	Div.style.cursor = "hand";

	if (Div.style.display == "none"){
		Div.style.display = "";
	}else{
		Div.style.display = "none";
	}
}

function popup(sUrl,sWidth1,sHeight1) {
	myleft=(screen.width)?(screen.width-sWidth1)/2:100;
	mytop=(screen.height)?(screen.height-sHeight1)/2:100;
	var sHeight = sHeight1;
	var sWidth = sWidth1;
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(sUrl, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + sWidth + ',height=' + sHeight + ',left = '+ myleft +',top = '+ mytop +'');");
}

function rCheck(sName){
	var Div = document.getElementById(sName);
	if (Div.checked == true){
		Div.checked = false;
	}else{
		Div.checked = true;
	}
}

function MouseOver(sName) {
	sName.style.cursor = 'hand';
	sName.style.backgroundColor = '#C8EBFF';
}
function MouseOut(sName) {
	sName.style.cursor = 'hand';
	sName.style.backgroundColor = '';
}

function GetURL(url) {
	parent.location.href = url;
	return false;
}

function Num(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46 && charCode != 44){
		return false;
	}else{
		return true;
	}
}