function updatePaAccnt(paID){
	mParam="&paName="+document.getElementById('paName').value+"&paEmail="+document.getElementById('paEmail').value+"&paPassword="+document.getElementById('paPassword').value+"&pavPassword="+document.getElementById('pavPassword').value+"&paPhone="+document.getElementById('paPhone').value+"&paCell="+document.getElementById('paCell').value;
	//alert(mParam);
	if (window.XMLHttpRequest){
		xmlhttp=new XMLHttpRequest();
	}else{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			res=xmlhttp.responseText;
			document.getElementById("paAccount").innerHTML=res;
			document.getElementById('paEdAccount').style.display='none';
			document.getElementById('fade').style.display='none';
		}
	}
	xmlhttp.open("GET","getData.asp?action=UPDATEPAACCNT&paID="+paID+mParam,true);
	xmlhttp.send();
}

function createStAccnt(paID){
	mParam="&stFname="+document.getElementById('stFname').value+"&stLname="+document.getElementById('stLname').value+"&birthDate="+document.getElementById('birthDate').value+"&stSchool="+document.getElementById('stSchool').value+"&stGrade="+document.getElementById('stGrade').value+"&tchrID="+document.getElementById('tchrID').value+"&stAllergy="+document.getElementById('stAllergy_desc').value+"&stAllergy_desc="+document.getElementById('stAllergy_desc').value;
	alert(mParam);
/*	if (window.XMLHttpRequest){
		xmlhttp=new XMLHttpRequest();
	}else{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			res=xmlhttp.responseText;
			document.getElementById("paAccount").innerHTML=res;
			document.getElementById('paEdAccount').style.display='none';
			document.getElementById('fade').style.display='none';
		}
	}
	xmlhttp.open("GET","getData.asp?action=UPDATEPAACCNT&paID="+paID+mParam,true);
	xmlhttp.send();*/
}
	
function pasChn(){
	//alert('giUsob');
	document.getElementById('vPass').style.display='block';
	document.getElementById('passcheck').value='1';
}

function getTeacher(){
	alert(document.getElementById('school').value);
}



function confirmdelete(DestURL){
	var ok = confirm("Are you sure you want to delete?");
	if (ok) {location.href = DestURL;}
	return ok;
}

function formatCurrency(num) {
	num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num))
		num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
	if(cents<10)
		cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
			num = num.substring(0,num.length-(4*i+3))+','+
			num.substring(num.length-(4*i+3));
	return (((sign)?'':'-') + '$' + num + '.' + cents);
}
