<!--
// 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 Bustframe(){
	if (self != top) {
	top.location = self.location
	}
}

function pageOffset() {
    if (document.layers) {
        document.layers['layerName'].pageX = window.pageXOffset + 599;
        document.layers['layerName'].pageY = window.pageYOffset + 115;
    }
    else if (document.all) {
        document.all['layerName'].style.posLeft = document.body.scrollLeft + 599;
        document.all['layerName'].style.posTop = document.body.scrollTop + 115;
    }
    setTimeout('pageOffset()',100);
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function munge(cookie) {
	cookie += "; path=/;"
	document.cookie = cookie;
}

function VSLen(fieldLength){ //this func validates how may records has been selected
	if (fieldLength == 0) {fieldLength = 5}
	var k=0;

	if (!multireceive.ZorID.length){	//(!undefined) will evalue to true
		var numclients=1;
		if (multireceive.ZorID.checked) k=1;
	}else{
		var numclients=multireceive.ZorID.length;	
		for (var n=0; n<numclients; n++){
			if(multireceive.ZorID[n].checked) k=k+1;
		}
	}

	if (k>fieldLength){
		alert("Please limit your selection up to " + fieldLength + ". You have selected " + k);
		return false;
		}
	else if(k==0){
		alert("Please make at least one selection.");
		return false;
		}
	return true;
}

function showProvince(theProvince) {
var province = document.getElementById("prov");
//alert(theProvince.options[theProvince.selectedIndex].value);
	if (theProvince.options[theProvince.selectedIndex].value != "203") {
	province.style.display = "";
	}
	else {
	province.value="";
	province.style.display = "none";
	}
}
function verifygen(button)	{
	var formhere=document.frmLeads
	{
		button.value = 'Please Wait';
		button.disabled = true;
		//return true;
		formhere.submit();
	}
}
-->