

function trim(str) 

{

   return str.replace(/^\s*|\s*$/g,"");

}



function reset_form(field)

{

eval ("document." +field + ".reset();");

	/*

	var frm = document[field];

	

	alert(frm.name);

	frm.reset();*/

}





function SP_refreshform(str)

{

	//alert(str);

	//document.frmRecord.frmNoOfRec.value="No";

	

	//alert( eval("document."+str).name );
	//alert( document['CustomerProjectsSummary'].name );
	//document['CustomerProjectsSummary'].submit();
	//eval("document."+str+".submit()");
	eval("document."+str).submit();

}



function showHide(mnuobj)

{

	//Added by dharmesh on 5th July 05

	//Function Find Div Objects under main div object and Show/hide them

mnuobj = document.getElementById(mnuobj);



var parentobj = mnuobj.parentElement;

var x1 = parentobj.getElementsByTagName("div");



for (i = 0; i < x1.length; i++) 

{

x1[i].style.display = "none";

}



mnuobj.style.display  = '';	

return true;

}



function showHideSingle(mnuobj,action)

{

	//Added by dharmesh on 5th July 05

	//Function Find Div Objects under main div object and Show/hide them

mnuobj = document.getElementById(mnuobj);

mnuobj.style.display = action;

return true;

}