	//----------------------------------------------------------
	// Name		: ltrim
	// Purpose	: Removes leading spaces from start of string
	//----------------------------------------------------------
	//
	function ltrim(strText)
	{
		while (strText.charAt(0)==" ")
		{
			strText = strText.substring(1);
		}
		return strText;
	}

	//----------------------------------------------------------
	// Name		: rtrim
	// Purpose	: Remove trailing spaces from end of string
	//----------------------------------------------------------
	//
	function rtrim(strText)
	{
		while (strText.charAt( strText.length-1 )==" ")
		{
			strText = strText.substring(0, strText.length-1);
		}
		return strText;
	}

	//----------------------------------------------------------
	// Name		: trim
	// Purpose	: Removes any leading or trailing spaces from a string.
	//----------------------------------------------------------
	//
	function trim(strText)
	{
		strText = ltrim(strText);
		strText = rtrim(strText);
		return strText;
	}

	//----------------------------------------------------------
	// Validation for to check a string includes @ and looks like it takes the form of an email address
	//---------------------------------------------------------

	function isEmailAddr(email)
	{
		var result = false;
		var theStr = new String(email)
		var index = theStr.indexOf("@");

		if (index > 0)
		{
			var pindex = theStr.indexOf(".",index);
			if ((pindex > index+1) && (theStr.length > pindex+1))
			result = true;
		}
		return result;
	}

	//----------------------------------------------------------
	// Purpose	: Domain Name Redirect
	//----------------------------------------------------------
	//
	var sHost = location.hostname
	var sReferrer = document.referrer
	
	if (sHost == "www.getpaidin4days.com") {
		location.href = 'http://www.streamline.co.uk/Get_paid_in_4_days/default.htm'
	}



	//----------------------------------------------------------
	// Name		: popwin
	// Purpose	: Create Popup Window
	//----------------------------------------------------------
	//

	function popwin(url, name, width, height, location, menubar, status, toolbar)
	{
		if (name == null)
		{
			name = "stdWin";
		}
		if (width == null)
		{
			width = 550;
		}
		if (height == null)
		{
			height = 500;
		}
		if (location == null)
		{
			location = "no"
		}
		if (menubar == null)
		{
			menubar = "yes"
		}
		if (status == null)
		{
			status = "yes"
		}
		if (toolbar == null)
		{
			toolbar = "yes"
		}

		popup = window.open(url, name, 'width=' + width + ',height=' + height + ',location=' + location + ',menubar=' + menubar + ',status=' + status + ',toolbar=' + toolbar +',scrollbars=yes,resizable=yes,screenx=0,screeny=0,left=0,top=0');
		if (window.focus) setTimeout("popup.focus()",100);
	}

	//----------------------------------------------------------
	// Name		: fValidate
	// Purpose	: Validate member's number for gaining entry to member's area
	//----------------------------------------------------------
	//


		function fValidate(strline){
		var str=strline;
		if (str.length==8){
		if (str.substring(str.length-1,str.length)=="2"){
		top.nav.location="/menu/navigation.htm?menu4";
		top.content.location="/members/main.htm";
		}else{
		alert("The ID you have entered is incorrect, please try again");
		}
		} else {
		alert("The ID you have entered is incorrect, please try again");
		}
		}
	//----------------------------------------------------------
	// Name		: validateForm5
	// Purpose	: Form Validation
	//----------------------------------------------------------
	//
	function validateForm5(theForm)
	{
		var strUserID = new String(trim(theForm.txtUserID.value));
		
		if (strUserID.length == "")
		{
			alert("Please enter a valid User ID.");
			theForm.txtUserID.focus();
			return false;
		}
	}


	//----------------------------------------------------------
	// Name		: createLink
	// Purpose	: Create Popup Window
	//----------------------------------------------------------
	//
	function createLink(url)
	{
		if (url == null)	
		{
			location.href="#";
		} else {
			location.href=url;
		}
	}