<!--
function popupWindow(theURL, theWidth, theHeight) { 
	popupwindow=window.open(theURL,'popupwindow','status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + theWidth + ',height=' + theHeight);
	popupwindow.focus();
}

function ClearSearchField() {
	document.searchform.srchString.value = "";
}

function DoSearch() {
	document.searchform.submit();
}

function setCookie(cookieName,cookieValue,cookiePath,cookieExpires,cookieDomain) {
	cookieValue = escape(cookieValue);
	if (cookieExpires == "") {
		var nowDate = new Date();
		nowDate.setMonth(nowDate.getMonth() + 6);
		cookieExpires = nowDate.toGMTString();
	}
	
	if (cookiePath != "") {
		cookiePath = ";Path=" + cookiePath;
	}

	if (cookieDomain != "") {
		cookieDomain = ";Domain=" + cookieDomain;
	}
	
	document.cookie = cookieName + "=" + cookieValue + ";expires=" + cookieExpires + cookieDomain + cookiePath;
} 

function setCountry(countryURL) {
	
	if (countryURL == '0') {
		alert("Please select a valid country");
	}
	else {
		setCookie('defaultsite',countryURL,"","",'camfilfarr.com');
		document.location = countryURL;
	}
	
}

function ValidateFields()
{
		if (document.dlgform.UserID.value.length == 0)
		{
			alert ("You must enter a user name.")
			return false;
		}
		if (document.dlgform.Password.value.length == 0)
		{
			alert ("You must enter a password.")
			return false;
		}

		return true;
}

function DoLogin () {
	var str1 = document.referrer;
	var str2 = "#request.baseurl#";
	
	if (ValidateFields() == true) {
		if (document.dlgform.rememberid.checked == true) {
			setCookie("aaouserid",document.dlgform.UserID.value,"","");
			setCookie("aaouserpwd",document.dlgform.Password.value,"","");
		}

		if (str1.indexOf(str2) == -1) {
			document.dlgform.WindowType.value = "/index.cfm";
		} else {
			document.dlgform.WindowType.value = document.referrer;
		}
		document.dlgform.submit();
	} 
}



//-->

