function getBaseURL(){
	urlPath=window.location.pathname;
	urlWWW=location.href;
	
	urlWWW = urlWWW.split('/');
	urlWWW1=urlWWW[2];
	//this splits your url in pieces using the / as a separator
	urlPathArray = urlPath.split('/');
	urlPath1="";
	for (var x = 1; x < (urlPathArray.length-1); x++){
		urlPath1 += urlPathArray[x] + "/";
	}

	//write the URL (to combine with lotus formula language)
	//document.write(urlPath1);
	return "http://"+urlWWW1+"/"+urlPath1;
}
//Returns specific segment of the URL
function getURLsegment(seg){
	urlPath=window.location.pathname;
	
	//this splits your url in pieces using the / as a separator
	urlPathArray = urlPath.split('/');
	alert(urlPathArray[seg]);
	document.write(urlPathArray[seg]);
}
function gup( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
function isValidEmail(str){return (str.indexOf(".") > 0)&&(str.indexOf("@") > 0);
}

