<!--
/*function isEmail(str)
{
	for (j=1; j<str.length; j++) 
		if ((str.charAt(j)==',') || (str.charAt(j)=='"') || (str.charAt(j)=="'")) return false;

	return ((str != "") && (str.indexOf("@") != -1) && (str.indexOf(".") != -1) && 1 < (str.indexOf(".") - str.indexOf("@")));
}*/

String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

function trimStr(InString) {
	return InString.trim();
}

function isEmpty(obj) {
	obj.value = trimStr(obj.value);
	if ((obj.value=='')||(obj.value==null)) { return true } else { return false;	}
}

function EmptyAlert(obj, objName) {
	if (isEmpty(obj)) {
		alert('"' + objName+ '" is required');
		obj.focus();
		return false;
	}
	else return true
}

function isEmail(s) {
	var regEx = /^([A-Za-z0-9_\.]+)@([A-Za-z0-9_\.]+)\.(\w+)$/;
	return regEx.test(s);
}

function isInteger(str) {
	var sNumbers = '0123456789';
	for (var i = 0; i < str.length; i++) {
		if (sNumbers.search(str.substr(i, 1)) < 0) {return false;}
	}
	return true;
}

function MM_swapImgRestore() { //v3.0
	var a = document.MM_sr;
	for (var i = 0; a && i < a.length && a[i].oSrc; i++)
		a[i].src = a[i].oSrc;
}

function MM_preloadImages() { //v3.0
	var d = document;
	if (d.images) {
		if (!d.MM_p) d.MM_p=new Array();
		var i,j = d.MM_p.length, a = MM_preloadImages.arguments; 
		for (i = 0; i < a.length; i++) {
			if (a[i].indexOf("#") != 0) {
				d.MM_p[j] = new Image;
				d.MM_p[j++].src = a[i];
			}
		}
	}
}

function MM_findObj(n, d) { //v4.01
	var p,i,x;
	if (!d) d = document;
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p + 1)].document;
		n = n.substring(0, p);
	}
	if (!(x = d[n]) && d.all) x = d.all[n];
	for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
	for (i = 0; !x && d.layers && i < d.layers.length; i++) 
		x = MM_findObj(n, d.layers[i].document);
	if(!x && d.getElementById) x = d.getElementById(n);
	return x;
}

function MM_swapImage() { //v3.0
	var j = 0, x, a = MM_swapImage.arguments;
	document.MM_sr = new Array;
	for (var i = 0; i < (a.length - 1); i += 2) {
		if ((x = MM_findObj(a[i])) != null) {
			document.MM_sr[j++] = x;
			if (!x.oSrc) x.oSrc = x.src;
			x.src = a[i + 1];
		}
	}
}

// Compability with old version
if (window.screen) {
	screenwidth=screen.width;
	screenheight=screen.height;
} else {
	screenwidth=800;
	screenheight=600;
}

// Initialize Popup script values
// Ver 1.03
// Last updated: 2003-04-02

var shown='';
var defWinCaption='Popup';
var windowwidth,windowheight,windowleft,windowtop;
var _toolbar,_location,_directories,_directories,_status,_scrollbars,_resizable,_copyhistory;

// Param functions        
function setPopUpSize(w,h,l,t) {
	var a = setPopUpSize.arguments;
	if (w) windowwidth=w;
	if (h) windowheight=h;
	if (a.length>=3) {windowleft=l} else if (window.screen) windowleft=(screen.width-windowwidth)/2;
	if (a.length>=4) {windowtop=t;} else if (window.screen) windowtop=(screen.height-windowheight)/2;
}

function setPopUpParamDef() {
	setPopUpSize(500,400);
	_toolbar='no';_location='no';_directories='no';_directories='no';
	_status='yes';_scrollbars='yes';_resizable='yes';_copyhistory='no';
}

// Popup functions
function PopUpEx(url,wName) {
	//KillPopup();
	if (!wName || wName.length==0) wName = defWinCaption;
	shown=window.open(url, wName, 'left='+windowleft+',top='+windowtop+
		',toolbar='+_toolbar+',location='+_location+',directories='+_directories+
		',status='+_status+',scrollbars='+_scrollbars+',resizable='+_resizable+
		',copyhistory='+_copyhistory+',width='+windowwidth+',height='+windowheight);
	shown.focus();
	return false;
}

function PopUp(url) { return PopUpEx(url, defWinCaption); }

function KillPopup() { if (!(shown=='' || shown.closed)) {shown.close();} }

function ClosePopup() {
	if (window.opener) {
		window.opener.focus();
		window.close();
	}
}

// Initialization
window.onunload=KillPopup;
setPopUpParamDef();

// popup end 

function recommendSite() {
	windowwidth=540;
	windowheight=540;
	windowleft=(screen.width-540)/2;
	windowtop=(screen.height-540)/2;

	PopUp('http://www.iforum.com/benefits/recommendation.asp?SiteID=sdhjdsdjf493423jk&SiteTitle=www.geolytics.com');
}

function LeaveMessage() {
	windowwidth = 550;
	windowheight = 350;
	PopUp('go.asp');
}
//-->

