function trim_all(strObjName){ 

        var strObj = strObjName;
        var strRet = "";
        for (i = 0;i < strObj.length;i++)
        {
                if(strObj.charAt(i) != " " && strObj.charAt(i) != "")
                        strRet = strRet+strObj.charAt(i);
        }
        return strRet;
}

function setcheckme(){
	var securityQUESTION = document.ut.securityQUESTION;	
	if(trim_all(securityQUESTION.value) == ""){
		document.getElementById('qalert').style.display='block';
		securityQUESTION.focus();
		return false;
	}else{
		document.getElementById('qalert').style.display='none';		
	}
	
	var securityANSWER = document.ut.securityANSWER;	
	if(trim_all(securityANSWER.value) == ""){
		document.getElementById('calert').style.display='block';
		securityANSWER.focus();
		return false;
	}else{
		document.getElementById('calert').style.display='none';		
	}
	
	var moreCHARITY = document.ut.moreCHARITY.value;
	if(moreCHARITY==1){
	 var charity = document.ut.charity;	
	 var raisedCHARITY=document.ut.raisedCHARITY;
	 
		if(trim_all(charity.value) != 0 && raisedCHARITY.value==""){
			document.getElementById('rcalert').style.display='block';
			raisedCHARITY.focus();
			return false;
		}else{
			document.getElementById('rcalert').style.display='none';		
		} 
	}	
	/* var searchFROM = document.ut.searchFROM;	
	if(searchFROM.value=="work"){
		chkaddress(searchFROM.value);
	}else{
	
	}
	 */
	/* var moreCHARITY = document.ut.moreCHARITY;
	
	if(moreCHARITY.value==1){
		var charity = document.ut.charity;	
		if(trim_all(charity.value) == ""){
			document.getElementById('cqalert').style.display='block';
			charity.focus();
			return false;
		}else{
			document.getElementById('cqalert').style.display='none';		
		}
		
		var raisedCHARITY = document.ut.raisedCHARITY;	
		if(trim_all(raisedCHARITY.value) == ""){
			document.getElementById('cralert').style.display='block';
			raisedCHARITY.focus();
			return false;
		}else{
			document.getElementById('cralert').style.display='none';		
		}
	} */
	
	document.getElementById('changes').value=0;
	document.ut.updte.value = 1;
	return true;
}

/* function checkme(){
	setcheckme();
} */ 
function getcharity(val)
{ 
	xajax_processForm2(val);	
	return false;
}
function valuecharity(val,valdis)
{	
	document.getElementById('charity').value=valdis;
	document.getElementById('chart').value=val;
	document.getElementById('divcharity').style.display='none';
	
}
/*function chkcharity(id,value,val){
	xajax_processForm(id,value,val);
	setTimeout("displaycharity()",500);
	return false;
}
function displaycharity(){
	xajax_processForm3();
	return false;
}*/

function chkcharity(id,value,val){
	xajax_processForm(id,value,val);
	return false;
	
	
}
function displaycharity(){
	xajax_processForm3();
	return false;
}

function publishwall(){	
	if(navigator.appName == "Netscape"){
		setTimeout("document.ut.submit()",990);
	}else{
		document.ut.submit();
	}
	
	
}

function chkaddress(value){
	if(value=="work"){
		document.getElementById('chkaddr').style.display='block';
		xajax_processForm1(value);
		return false;
	}else{
		document.getElementById('chkaddr').style.display='none';
	}	
}

function savechanges(){

  	document.getElementById('changes').value=1;
} 

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1900,height=600,left = 540,top = 100');");
}

function pw() {return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth}; function mouseX(evt) {return evt.clientX ? evt.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) : evt.pageX;} function mouseY(evt) {return evt.clientY ? evt.clientY + (document.documentElement.scrollTop || document.body.scrollTop) : evt.pageY} function popUp(evt,oi) {if (document.getElementById) {var wp = pw(); dm = document.getElementById(oi); ds = dm.style; st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else {tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; lv += 'px';tv += 'px';  ds.left = lv; ds.top = tv; ds.visibility = "visible";}}}
