var popUpWin=0;
function popUpWindow(URLStr, strName, left, top, width, height) {
	if(popUpWin) {
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(URLStr, strName, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// Function for create and object from ID
function createObject(strID) {
	var obj1 = (document.getElementById) ? document.getElementById(strID) : eval("document.all[strID]");
	return obj1
}

function rollOver(strID,strSection) {
	var strExt = "gif";
	if (arguments.length > 2) {
		strExt = arguments[2];
	}
	MM_swapImage(strID,'','/images/nav/over/' + strSection + '.' + strExt,1);
}

function getQueryStringVar(strVar,strDefault) {
	//returns value of specified query string var
	var strVal = strDefault;
	var arrTmp1 = document.location.search.toLowerCase().split("?");
	arrTmp1 = arrTmp1[1].split("&");
	for (i=0;i < arrTmp1.length;i++) {
		arrTmp2 = arrTmp1[i].split("=");
		if (strVar.toLowerCase() == arrTmp2[0]) {
			strVal = arrTmp2[1];
		}
	}
	return(strVal);
}

function getAnchorLink() {
	//returns value of specified query string var
	var strVal = "";
	var arr = new Array;
	arr = document.location.toString().split("#");
	if (arr.length > 1) strVal = arr[1];
	return(strVal);
}


function getScriptName() {
	var strVal = "";
	var arrTmp = document.location.toString().split("?");
	strVal = arrTmp[0];
	return(strVal);
}

function sendCallMeBackEmail() {
	var strTelephone = $('strTelephone').value;
	if (strTelephone == 'Enter your number here') {
		alert('Please enter your phone number');
	} else {
		$('callMe').innerHTML = "";
		DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'sendCallMeBackEmail', strTelephone, updateDateCallBackForm);
	}
	return false;
}

function updateDateCallBackForm(r) {
	$('callMe').innerHTML = r;
	if ($('callMeMessage')) new Effect.Opacity("callMeMessage", { from: 0, to: 1, duration: 1 });
}