function verifyEnterprise() {	var x = document.getElementById('sbCompanyID').value	var y = document.getElementById('sbPasscode').value	matchString = x+y	resultFrame.location.replace('entLkupV?openAgent&CompPass=' + matchString)	}function show(id) {       var e = document.getElementById(id);       if(e.style.display == 'block')          e.style.display = 'block';       else          e.style.display = 'block';    }function hide(id) {       var e = document.getElementById(id);       if(e.style.display == 'none')          e.style.display = 'none';       else          e.style.display = 'none';    }function toggle(id) {       var e = document.getElementById(id);       if(e.style.display == 'block')          e.style.display = 'none';       else          e.style.display = 'block';    }function ValidateNumber(theForm){// only allow numbers to be entered	var checkOK = "0123456789";	var checkStr = theForm.prLicenseNo.value;	var allValid = true;	var allNum = "";	for (i = 0;  i < checkStr.length;  i++) {	ch = checkStr.charAt(i);	for (j = 0;  j < checkOK.length;  j++)	if (ch == checkOK.charAt(j))	break;	if (j == checkOK.length) {	allValid = false;	break;}	if (ch != ",")	allNum += ch;}	if (!allValid) {	alert("You may enter numbers only.");	theForm.prLicenseNo.focus();	return (false);}}function ValidateEmail(theForm) {	var email = theForm.Email.value;	var first_name = theForm.FirstName.value;	var last_name = theForm.LastName.value;	var emailRegex = /^[\w-\.]+\w+@([\w-]+\.)+[\w-]{2,4}$/;	var nameRegex = /^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ]*))*$/;  if (!email.match(emailRegex)) {	alert('Email Address format is invalid. Please correct it before proceeding.');	theForm.Email.focus();    return (false);  }if (!first_name.match(nameRegex)) {    alert('Invalid Character(s) in first name. Please correct it before proceeding.');	theForm.FirstName.focus();    return (false);  }if (!last_name.match(nameRegex)) {    alert('Invalid Character(s) in last name. Please correct it before proceeding.');	theForm.LastName.focus();    return (false);  }else {	ValidatePassword(theForm);	}}function ValidatePassword(theForm){// require at least 5 characters in the password fieldif (theForm.NewPassword.value.length < 5){alert("Your Password must be at least 5 characters.");theForm.NewPassword.focus();return (false);}// check if both password fields are the sameif (theForm.NewPassword.value != theForm.NewPasswordConfirm.value){	alert("The two passwords you entered do not match.");	theForm.NewPasswordConfirm.focus();	return (false);} show('confirmScreen');if (document.forms["frmSubscribe"].sbType[0].checked) {	document.forms["frmSubscribe"].sbLevelD.value = document.forms["frmSubscribe"].sbLevel.value;	document.forms["frmSubscribe"].FirstNameD.value = document.forms["frmSubscribe"].FirstName.value;	document.forms["frmSubscribe"].LastNameD.value = document.forms["frmSubscribe"].LastName.value;	document.forms["frmSubscribe"].EmailD.value = document.forms["frmSubscribe"].Email.value;	}else if (document.forms["frmSubscribe"].sbType[1].checked) {	document.forms["frmSubscribe"].sbLevelD.value = document.forms["frmSubscribe"].sbCompanyID.value + "-based Subscription";	document.forms["frmSubscribe"].FirstNameD.value = document.forms["frmSubscribe"].FirstName.value;	document.forms["frmSubscribe"].LastNameD.value = document.forms["frmSubscribe"].LastName.value;	document.forms["frmSubscribe"].EmailD.value = document.forms["frmSubscribe"].Email.value;	document.getElementById('msg').style.display='none';	}}function popWindow(mypage,myname,w,h){var win= null;var winl = (screen.width-w)/2;var wint = (screen.height-h)/2;settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,toolbar=no,location=no,status=yes,menubar=no,resizable=no,dependent=yes'win=window.open(mypage,myname,settings)if(parseInt(navigator.appVersion) >= 4){win.window.focus();}}// I know this part is dirty, yet it is needed to check for the visibility tag in different browsers.var explorer;var netscape4;var netscape6;var theDOM, theSuffix, hiddenKeyword, dhtml;if (document.all) {explorer = true;}else if (document.layers) {netscape4 = true;} else {netscape6 = true;}if(explorer){   theDOM = 'document.all';   theSuffix = '.style';   hiddenKeyword = 'hidden';   dhtml = true;}if(netscape4){   theDOM = 'document';   theSuffix = '';   hiddenKeyword = 'hide';   dhtml = true;}if (netscape6) {  theDOM = "document.getElementsByTagName('*')";  theSuffix = ".style";  hiddenKeyword = "hidden";  dhtml = true;}function CheckRequiredFields(f) {   var sFieldValue = "";   var iIndex = 0;   var iElement = 0;   var iRadio = 0;   var iCheck = 0;      // Retrieve the list of field names and labels   var aFieldList = f.valFieldList.value.split(",");      // Loop through the list of fields   for (iIndex = 0; iIndex < aFieldList.length; iIndex++) {            // Inform the user of what's happening      window.status = "Validating field " + aFieldList[iIndex + 1] + "...";            // Loop through all elements in the form to find the field      for (iElement = 0; iElement < f.elements.length; iElement++) {         // Check whether the selected element is a required field         if (f.elements[iElement].name == aFieldList[iIndex]) {            // Check whether the field contains a value or not            switch (f.elements[iElement].type) {               // Text fields               case "text" :                  sFieldValue = f.elements[iElement].value;                  break;               // Password fields               case "password" :                  sFieldValue = f.elements[iElement].value;                  break;               // Text areas               case "textarea" :                  sFieldValue = f.elements[iElement].value;                  break;               // Listboxes               case "select-one" :                  if (f.elements[iElement].selectedIndex == 0) {                     sFieldValue = "";                  } else {                     sFieldValue = String(f.elements[iElement].selectedIndex);                  }                  break;               // Checkboxes               case "checkbox" :                  for (iCheck = 0; iCheck < f.elements[aFieldList[iIndex]].length; iCheck++) {                     if (f.elements[iElement + iCheck].checked == false) {                        sFieldValue = "";                     } else {                        sFieldValue = String(f.elements[iElement + iCheck].value);                        break;                     }                  }                  break;               // Radiobuttons               case "radio" :                  for (iRadio = 0; iRadio < f.elements[aFieldList[iIndex]].length; iRadio++) {                     if (f.elements[iElement + iRadio].checked == false) {                        sFieldValue = "";                     } else {                        sFieldValue = String(f.elements[iElement + iRadio].value);                        break;                     }                  }                  break;            }            // Warn the user that the selected field is a required field            if (sFieldValue == "") {               alert(aFieldList[iIndex+1] + " is a required field.\nMake sure that " +               aFieldList[iIndex+1] + " and all other required fields are filled out before proceeding.");               f.elements[iElement].focus();               return false;            }            break;         }      }      iIndex++;   }   return true;}function QuerySave(f){return CheckRequiredFields(f);}// function to load an email address, gives basic protecting from spammers. Provided by codestore.netfunction mailto(name, domain) {  location.href = "mailto:" + name + "@" + domain; } function writeSearchResults(){      for(var i=0;i<a.length;i++){       document.write(a[i] + "\n");    }}	function getDisplay(theObject){	var theObjectReference = eval(theDOM + '.' + theObject + theSuffix);	if(theObjectReference.visibility == hiddenKeyword){     	return false;    	} else {		return true;		}	}	function hideObject(theObject){	var theObjectReference = eval(theDOM + '.' + theObject + theSuffix);	theObjectReference.visibility = hiddenKeyword;	}function loadHash() {	// generate random number in our battle to fight comment spam	return ran_number=Math.floor(Math.random()*1000);}function maxArray( arr ) {	// this function calculates the maximum value in the associative array	var max = 0;	for(var i in arr){  	    if (arr[i] > max)  	    		max = arr[i];  	}  	return max;}function minArray( arr ) {	// this function calculates the minimum value in the associative array	var min;	var count = 0;	for(var i in arr){		// initialize minimum value with first value of associative array		if (count==0)			min = arr[i];		if (arr[i] < min)  	    		min = arr[i];  	    	count++;  	}  	return min;}function drawTagCloud(map, maxStyle) {	// this function draws the tag cloud using the associative javascript array generated by the Notes view	// calculate the maximum entries in the cloud. if not found, no tags are found	var maxEntries = maxArray(map);	if (maxEntries==0) {		document.write('No tags found');		return false;	}		//	calculate the minimum entries in the cloud	var minEntries = minArray(map);		// calculate the range	var range = maxEntries - minEntries;	if (range <= 0)		range = 1; 		// get handle on div container to write tag cloud into	var tagcloud = document.getElementById('tagcloud');		// temp variable to store all tags in 	var tagsresult = '';		// loop through the tag map to draw each tag.	for(var tag in map){		tagsresult = tagsresult + calculateTag(tag, map[tag], minEntries, maxEntries, maxStyle);  	}  	  	// finally, write the full tags result to the inner html of the tagcloud div  	tagcloud.innerHTML = tagsresult;	var tagcloud = document.getElementById('tagcloud');  	tagcloud.style.innerHTML = "width:200px;"  	}function calculateTag(tag, count, min, max, maxStyle) {  // this function renders a tag line. first determine  // the size tag to use for this tag count  sizeTag = Math.round((((maxStyle-1)/(max-min))*count) +(1*max-maxStyle*min)/(max-min));    // return link to write to page  return '&nbsp;<a href="categories?open&id=' + tag + '" class="tag' + sizeTag + '">' + tag + ' </a>&nbsp;';}