﻿function rndURL(prefix){
	var rd = parseInt(Math.random()*999999999);
	var rndU = prefix + "rand=" + rd;
	return rndU;
	}

function wait(id){
	$(id).innerHTML="<h4 style='text-align: center'><img src='images/loading.gif' width='16' height='16'> Please wait ... </h4>";
	return true;
	}

function getFORM(){	
try{
	myGF = new Ajax.Updater('regForm',url,{method:'get',evalscript:true});
	myGF = null;
	var url = 'form.php'+rndURL('?');
	myGetForm = new Ajax.Updater('regForm',url,{method:'get',evalscript:true});
	myGetForm = null;}
catch(e){throw e;}
	}

function postFORM(){
try{
	myPF = new Ajax.Updater('resFORM','wait.htm'+rndURL('?'),{method:'get',evalscript:true});	
	myPF = null;
	var url = 'process.php?'+Form.serialize('prFRM')+rndURL('&');
	myPostForm = new Ajax.Updater('resFORM',url,{method:'get',evalscript:true});	
	myPostForm = null;}
catch(e){throw e;}
	}

function disFRM(frm){
	Form.disable(frm);
	}
	
function getXFORM(){	
try{
	myGF = new Ajax.Updater('resFORM','wait.htm'+rndURL('?'),{method:'get',evalscript:true});
	myGF = null;
	var url = 'form.php'+rndURL('?');
	myGetForm = new Ajax.Updater('resFORM',url,{method:'get',evalscript:true});
	myGetForm = null;}
catch(e){throw e;}
	}
	