<!--
// this page will going to store the commonly use javascript functions.

function trim(strText) { 
    // this will get rid of leading spaces 
    while (strText.substring(0,1) == ' ') 
        strText = strText.substring(1, strText.length);

    // this will get rid of trailing spaces 
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);

   return strText;
} 

function checkframe(){
	if (self != top) {
	top.location = self.location
	}
}
function SetQueryString(txt){
    document.cookie = txt;
}

function ValidateSelectLength(fieldLength){ //this func validates how may records has been selected
	if (fieldLength == 0) {fieldLength = 10}
	var k=0;

	if (!multirequest.ZorID.length){	//(!undefined) will evalue to true
		var numclients=1;
		if (multirequest.ZorID.checked) k=1;
	}else{
		var numclients=multirequest.ZorID.length;	
		for (var n=0; n<numclients; n++){
			if(multirequest.ZorID[n].checked) k=k+1;
		}
	}

	if (k>fieldLength){
		alert("Please limit your selection to maximum of "+ fieldLength +" . You have selected " + k);
		return false;
		}
	else if(k==0){
		alert("Please select at least one...");
		return false;
		}
	return true;
}

function showHide(ID) {

	var theseDivs = document.getElementById(ID).childNodes;
	for(var j=1; j<theseDivs.length;j++) {
		if(theseDivs[j].className=='tab_inner') {
			if(theseDivs[j].style.display=="block")  {
			theseDivs[j].style.display="none";
			document.getElementById(ID).firstChild.style.backgroundImage='url(/images/plus.gif)';
			}
		else  {
			theseDivs[j].style.display="block";
			document.getElementById(ID).firstChild.style.backgroundImage='url(/images/minus.gif)';
			}
		}
	}
}				

-->