
function Right(str, n){
	if (n <= 0)
		return "";
	else if (n > String(str).length)
		return str;
	else {
		var iLen = String(str).length;
		return String(str).substring(iLen, iLen - n);
	}
}
function isEmpty(value2check){
	if (value2check == "" || value2check == null){
		return true;
	}
	//nice bit of regexp!
	var nonSpaceCharacters = /\w/;
	hasCharacters = nonSpaceCharacters.exec(value2check);
	
	if (hasCharacters == null){
		return( true );
	}
	
	return( false );
}
function integerInRange(checkValue){
	if (checkValue < -2147483648 || checkValue > 2147483647){
		return( false );
	}
	return( true );
}
function isInteger(checkValue){
	
	alerted = false;
	
	if (isNaN(checkValue)){
		return( false );
	}
	if (parseInt(checkValue) != checkValue){
		return( false );
	}
	if (!integerInRange(checkValue)){
		alert("The value is out of acceptable range (-2,147,483,648 to 2,147,483,647)");
		alerted = true;
		return( false );
	}	
	return( true );
}
function isFloat(checkValue){
	if (isNaN(checkValue)){
		return( false );
	}
	if (parseFloat(checkValue) != checkValue){
		return( false );
	}
	return( true );
}
function isPositive(checkValue, integer){
	if (isNaN(checkValue)){
		return( false );
	} 
	if (checkValue < 0){
		return( false );
	}
	if (checkValue.length < 1){
		return( false );
	}
	if (integer){
		if(parseInt(checkValue) != checkValue){
			return( false );
		}
	}
	if (!integerInRange(checkValue)){
		alert("The value is out of acceptable range (-2,147,483,648 to 2,147,483,647)")
		alerted = true;
		return( false );
	}
	return( true );
}
function MM_findObj(n, d){
  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); return x;
}
function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}
function MM_showHideLayers(){
  var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }}
}
function objectFinder(n, d){
  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); return x;
}
function coords(){
	this.x;
	this.y;
	this.width;
	this.heigth;
	this.calculate = function(){
		var intWidth = this.width;	
		var intHeight = this.height;
		if (navigator.appName=="Netscape"){
			intTopDiff=(screen.height/10);
			intXPos=(screen.width/2)-(intWidth/2);
			intYPos=((screen.height/2)-(intHeight/2))-intTopDiff;
	
		}else{
			intXPos=(screen.availWidth/2)-(intWidth/2);
			intYPos=(screen.availHeight/2)-(intHeight/2);
		}
		this.x=intXPos>0?intXPos:0;
		this.y=intYPos>0?intYPos:0;
	}
}

function closeWindow(reload){
	if(reload == false){
		//do nothing
	}else{
		if(top.opener && !top.opener.closed){
			top.opener.location.reload();
		}
	}
	top.window.close();
}

function openWindow(url,height,width,winObj,blnReturn){
	var objCoords = new coords();
	objCoords.width = width;
	objCoords.height = height;
	objCoords.calculate();
	var intXPos = objCoords.x;
	var intYPos = objCoords.y;
	strProperties="location=no,menubar=no,resizable=yes,status=no,toolbar=no,titlebar=no,";
	strProperties+="directories=no,scrollbars=yes,toolbar=0,screenX="+intXPos+",left="+intXPos;
	strProperties+=",screenY="+intYPos+",top="+intYPos+",width="+width+",height="+height;
	winObj=window.open(url,"" + winObj + "",strProperties);
	winObj.focus();
	if(blnReturn) return winObj;
}
function openWindow800(url,winObj){
	openWindow(url,500,795,winObj)
}
function openWindowWithMenu(url,height,width,winObj){
	var objCoords = new coords();
	objCoords.width = width;
	objCoords.height = height;
	objCoords.calculate();
	var intXPos = objCoords.x;
	var intYPos = objCoords.y;
	strProperties="location=no,menubar=yes,resizable=yes,status=no,toolbar=no,titlebar=no,";
	strProperties+="directories=no,scrollbars=yes,toolbar=0,screenX="+intXPos+",left="+intXPos;
	strProperties+=",screenY="+intYPos+",top="+intYPos+",width="+width+",height="+height;
	winObj=window.open(url,"" + winObj + "",strProperties);
	winObj.focus();
}
function openWindowWithMenu800(url,winObj){
	openWindowWithMenu(url,500,795,winObj)
}
function openWindow800_Return(url,winObj){
	var windowObj = openWindow(url,500,795,winObj,true);
	return windowObj;
}
function openWindow_Return(url,height,width,winObj){
	var objCoords = new coords();
	objCoords.width = width;
	objCoords.height = height;
	objCoords.calculate();
	var intXPos = objCoords.x;
	var intYPos = objCoords.y;
	strProperties="location=no,menubar=no,resizable=yes,status=no,toolbar=no,titlebar=no,";
	strProperties+="directories=no,scrollbars=yes,toolbar=0,screenX="+intXPos+",left="+intXPos;
	strProperties+=",screenY="+intYPos+",top="+intYPos+",width="+width+",height="+height;
	winObj=window.open(url,"" + winObj + "",strProperties);
	winObj.focus();
	return winObj;
}
function openWindowWithMenu_Return(url,height,width,winObj){
	var objCoords = new coords();
	objCoords.width = width;
	objCoords.height = height;
	objCoords.calculate();
	var intXPos = objCoords.x;
	var intYPos = objCoords.y;
	strProperties="location=no,menubar=yes,resizable=yes,status=no,toolbar=no,titlebar=no,";
	strProperties+="directories=no,scrollbars=yes,toolbar=0,screenX="+intXPos+",left="+intXPos;
	strProperties+=",screenY="+intYPos+",top="+intYPos+",width="+width+",height="+height;
	winObj=window.open(url,"" + winObj + "",strProperties);
	winObj.focus();
	return winObj;		
}
function setStatus(msg){
	status=msg;
	return true;
}
function isLeapYear(year){ 
    return (year % 4 == 0 && (year % 100 !=0 || year % 400 ==0 )); 
} 
function validateDate(dateIn,monthIn,yearIn, strName){
	var bValid = true
	if (parseInt(yearIn, 10)  < 1753){
		alert("You've entered a year earlier than 1753. Unfortunately we can only support dates after 1753, because this is when the Gregorian and Julian calendars were synchronized! Please re-enter a more recent date.")
		return false;
	}
	if( isNaN(dateIn) || isNaN(monthIn) || isNaN(yearIn)){
		alert("Part of your date " + strName + " is not in the right format (dd/mm/yyyy)");
		return false;
	}
	if (dateIn.length==1){
		dateIn = "0" + dateIn;
	}
	if (monthIn.length==1){
		monthIn = "0" + monthIn;
	}
	var textStr = dateIn+"/"+monthIn+"/"+yearIn;
	var chkDate=new Date();
	if(dateIn.indexOf("0") == 0){
		dateIn = dateIn.substring(1);
	}
	if(monthIn.indexOf("0") == 0){
		monthIn = monthIn.substring(1);
	}
	chkDate.setMonth((parseInt(monthIn)-1),(parseInt(dateIn)));
	chkDate.setFullYear(parseInt(yearIn));
	var chkMonthInt  = chkDate.getMonth()+1;
	var chkMonthStr = chkMonthInt+"/";
	if (chkMonthStr.length == 2){
		chkMonthStr = "0"+chkMonthStr;
	} 
	var chkDateInt = chkDate.getDate();
	var chkDateStr = chkDateInt+"/";
	if (chkDateStr.length == 2){
		chkDateStr = "0"+chkDateStr;
	}
	var cmpDate=chkDateStr+chkMonthStr+(chkDate.getFullYear());
	if (cmpDate.length != 10) bValid = false;
	else{
		if (textStr!=cmpDate) bValid = false;
		else if (cmpDate=="NaN/NaN/NaN") bValid = false;
	}
	//handle 29th feb in a leap year
	if( (dateIn == 29) && (monthIn == 2) && (isLeapYear(yearIn)) ) bValid = true;
	if(!bValid){
		alert("You've entered a " + strName + " that does not exist or used an invalid date format.\n\nPlease use the dd/mm/yyyy format.");
		return false;
	}
	else return true;
}
function setValue(formName, formItem, value){
	objField = eval('document.forms["' + formName + '"].elements["' + formItem +'"]');
	if (objField){
		for (i=0; i < objField.options.length; i++){
			if (objField.options[i].value == value){
				objField.options[i].selected = true;	
			}
		}
	}
}
function setDefaultValue(formName, formItem, value){
	objField = eval('document.forms["' + formName + '"].elements["' + formItem +'"]');
	if (objField){
		for (i=0; i < objField.options.length; i++){
			if (objField.options[i].value == value){
				objField.options[i].selected = true;
				objField.options[i].defaultSelected = true;
			}
		}
	}
}
function createSnapShot(formName, ignoreMe){
//
}
function confirmClose(formName, ignoreMe){
//
}
function formatCurrency(num){
	num = num.toString().replace(/\$|\,/g, "");
	if (isNaN(num)){
		alert(num + " : This is not a valid number");
		return( "0" );
	}
	if (num.length < 1){
		return( "" );
	}
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if (cents < 10){
		cents = "0" + cents;
	}
	return( num + "." + cents );
}

function formatCurrency2(num){
	num = num.toString().replace(/\$|\,/g, "");
	if (isNaN(num)){
		return false;
	}
	if (num.length < 1){
		false;
	}
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if (cents < 10){
		cents = "0" + cents;
	}
	return( num + "." + cents );
}

function cartCurrency(num)
{	
	if (isNaN(num)){
		alert(num + " : This is not a valid number");
		return false;
	}
	if (num.length < 1){
		return true;
	}
	
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if (cents < 10){
		cents = "0" + cents;
	}
	return num + "." + cents;
}

function showCurrency(field){
	num = field.value
	//num = num.toString().replace(/\$|\,/g, "");
	if (isNaN(num)){
		alert(num + " : This is not a valid number");
		field.value = "";
		return false;
	}
	if (num.length < 1){
		field.value = "";
		return true;
	}
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if (cents < 10){
		cents = "0" + cents;
	}
	field.value = num + "." + cents
	return true;
}

function createImage( s ){
	var objImage = new Image();
		objImage.src = s;
	return( objImage );
}

function strReplace(originalString, searchText, replaceText){
	return originalString.replace(eval("/" + searchText + "/gi"), replaceText);
}
function performAction(inStr){
	if (inStr != "null"){
		eval(inStr);
	}
}
function hideme(){
//
}
function showme(){
//
}
function isValidFileType( strFileName, arrExt ){
	if (!strFileName.length)	{
		return( false );
	}
	strFileName = strFileName.toLowerCase();
	for ( var j=0; j<arrExt.length; j++ )	{
		if ( strFileName.substring( strFileName.length, strFileName.indexOf( arrExt[j].toLowerCase() ) ) == arrExt[j].toLowerCase() )		{
			return( true );
		}
	}
	return( false );
}
function setFocus( strFormName, strFieldName ){
	var objForm = document.forms[strFormName];
	objForm.elements[strFieldName].focus();
}
function setPointer(targetDoc){ 
//if (targetDoc.all) for (var i=0;i < targetDoc.all.length; i++) targetDoc.all(i).style.cursor = 'wait'; 
} 
function resetPointer(targetDoc) {
//if (targetDoc.all) for (var i=0;i < targetDoc.all.length; i++) targetDoc.all(i).style.cursor = 'default'; 
} 
function selectAction( field ){
	performAction(field.options[field.selectedIndex].value)
	field.selectedIndex = 0
}
function textCounter(objField, intMaxChars){
	if (objField.value.length > intMaxChars){ 
		objField.value = objField.value.substring(0, intMaxChars);
		alert("The maximum character limit (" + intMaxChars + " chars) for this field has been reached.");
		return false;
	}else{
		return true;
	}
	
}
function toggleHelp(){
	var objID = document.getElementById("help");
	objID.style.display = (objID.style.display == "none")?"":"none";
	var now = new Date();
	now.setTime(now.getTime() + 1000 * 60 * 60 * 24 * 365 * 5) 
	setCookie("helpdisplay",objID.style.display, now, "/");
	if(getText("HelpLink")=="Hide Help"){
		changeText("Show Help","HelpLink")
	} else {
		changeText("Hide Help","HelpLink")
	}
}
function changeText(inText, inTarget) {
	  inText = unescape(inText);
	  if (document.getElementById) {
		document.getElementById(inTarget).innerHTML = inText;
	  }
	  else if (document.all) {
		document.all[inTarget].innerHTML = inText;
	  }
}
function getText(inTarget) {
	  if (document.getElementById) {
		return document.getElementById(inTarget).innerHTML;
	  }
	  else if (document.all) {
		return document.all[inTarget].innerHTML
	  }
}
function setCookie(name, value, expires, path, domain, secure){
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "")
        //((domain) ? "; domain=" + domain : "") +
        //((secure) ? "; secure" : "");
}
function toggle(obj){
	var objID = document.getElementById(obj);
	objID.style.display = (objID.style.display == "none")?"":"none";
	var now = new Date();
	now.setTime(now.getTime() + 1000 * 60 * 60 * 24 * 365 * 5) 
	setCookie("helpdisplay",objID.style.display, now, "/");
	
	//if we are using resize() need to change table size after expanding help
	if ( typeof(objWin) != "undefined" )
	{
		resize(objWin);
	}	
}		
function selectAction( field ){
	performAction(field.options[field.selectedIndex].value)
	field.selectedIndex = 0
}
function Trim(sString){
	while (sString.substring(0,1) == ' '){
		sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' '){
		sString = sString.substring(0,sString.length-1);
	}
	return sString;
}
function toggleNoCookie(obj){
	var objID = document.getElementById(obj);
	objID.style.display = (objID.style.display == "none")?"":"none";
}	
function getWindowWidth(){
	var myWidth = 0;
	var myHeight = 0;
	
	if ( typeof( window.innerWidth ) == "number" ){
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}else{
		if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ){
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}else{
			if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ){
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
		}
	}
	return( myWidth );
}
function getWindowHeight(){
	var myWidth = 0;
	var myHeight = 0;
	
	if ( typeof( window.innerWidth ) == "number" ){
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}else{
		if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ){
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}else{
			if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ){
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
		}
	}
	return( myHeight );
}
function singleChoice(selection){
	var checked = selection.checked
	var objField = selection.form.elements[selection.name];
	if(objField){
		if (typeof objField != 'undefined') {
			for (i = 0; i < objField.length; i++) {
				objField[i].checked = false;
			}
		}else{
			objField.checked = false;
		}
	}
	selection.checked = checked;
}
function _disableButtons(disable,myDoc){
	var objForm
	for(i=0;i<myDoc.forms.length;i++){
		objForm = myDoc.forms[i];
		for(j=0;j<objForm.elements.length;j++){
			if(objForm.elements[j].type == "button"){objForm.elements[j].disabled = disable}
			if(objForm.elements[j].type == "submit"){objForm.elements[j].disabled = disable}
		}
	}
}
function openWindowWithPolling(popup,winname){
	var winObj = openWindow800_Return(popup,winname);
	
	startPolling=function(){ 
		timer=setTimeout('startPolling()',1000) 
		if ((winObj == null ) || (winObj.closed)){
			clearTimeout(timer);
			window.location.reload(false);			
		}
	}
}
function clearForm(varForm){	
	for(var i=0;i<varForm.elements.length;i++){
		switch(varForm.elements[i].type){
			case "text":
				varForm.elements[i].value = "";
				break;
			case "select-one":
				varForm.elements[i].selectedIndex = 0;
				break;
		}
	}
}

function showLayer(layerName)
{
	var what="none";
	
	if (document.layers) 
	{
		styleSwitch=".style";
		layerRef="document.layers";
		what ="ns4";
	}
	else if(document.all)
	{
		styleSwitch=".style";
		layerRef="document.all";
		what ="ie";		
	}
	else if(document.getElementById)
	{
		styleSwitch=".style";
		layerRef="document.getElementByID";
		what="moz";
	}
	
	// ---
	
	if (document.getElementById)
	{
		if (what =="none"){
			return;
		}else if (what == "moz"){
			document.getElementById(layerName).style.visibility="visible";
		}else{
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
		}

	}
} 
function hideLayer(layerName)
{	
	var what="none";
	
	if (document.layers) 
	{
		styleSwitch=".style";
		layerRef="document.layers";
		what ="ns4";
	}
	else if(document.all)
	{
		styleSwitch=".style";
		layerRef="document.all";
		what ="ie";		
	}
	else if(document.getElementById)
	{
		styleSwitch=".style";
		layerRef="document.getElementByID";
		what="moz";
	}
	
	// ---
	
	if (document.getElementById)
	{
		if (what =="none"){
			return;
		}else if (what == "moz"){
			document.getElementById(layerName).style.visibility="hidden";
		}else{
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		}	
	}
	
}
function parseDecimal(d, zeros, trunc) 
{
	d=d.replace(/[^\d\.]/g,"");
	while (d.indexOf(".") != d.lastIndexOf("."))
		d=d.replace(/\./,"");
	if (typeof zeros == 'undefined' || zeros == "") {
		return parseFloat(d);
		}
	else {
		var mult = Math.pow(10,zeros);
		if (typeof trunc == 'undefined' || (trunc) == false)
			return parseFloat(Math.round(d*mult)/mult);
		else
			return parseFloat(Math.floor(d*mult)/mult);
		}
}

function resizeTarget() 
{
	this.div_width = 0;
	this.div_height = 0;
	this.win_width = 0;
	this.win_height = 0;
	this.tab_height = 0;
	this.tab_name = 'tblBody';
	this.div_name = 'divBody';
	this.help_name = 'help';
}

function resize(div_width,div_height,win_width,win_height,tab_height)
{
}

function resize(obj)
{
	var size_me_w = getWindowWidth() - obj.win_width;
	var size_me_h = getWindowHeight() - obj.win_height;
	
	var div_width = obj.div_width + size_me_w;
	var div_height = obj.div_height + size_me_h;
	
	//table
	if(document.getElementById(obj.tab_name))
	{
		var table_height = obj.tab_height + size_me_h;
		if(table_height > 0) {document.getElementById(obj.tab_name).style.height = table_height + "px";}
	}
	
	//help
	if(document.getElementById(obj.help_name))
	{
		var help_height = document.getElementById(obj.help_name).offsetHeight;
		div_height -= help_height;
	}
	
	//div
	if(document.getElementById(obj.div_name))
	{
		if(div_width > 0 ){document.getElementById(obj.div_name).style.width = div_width + "px";}
		if(div_height > 0){document.getElementById(obj.div_name).style.height = div_height + "px";}
	}
}

//--

function emailCheck (emailStr) 
{
	var checkTLD=1;
	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);

	if (matchArray==null) 
	{
		alert("Your e-mail address seems to be incorrect!\n\nPlease check that you have included the correct @ and . symbols.");
		return false;
	}

	var user=matchArray[1];
	var domain=matchArray[2];

	for (i=0; i<user.length; i++) 
	{
		if (user.charCodeAt(i)>127) 
		{
			alert("Your e-mail address contains invalid characters.");
			return false;
		}
	}

	for (i=0; i<domain.length; i++) 
	{
		if (domain.charCodeAt(i)>127) 
		{
			alert("The domain name part of your e-mail address\n (after the @ sign) contains invalid characters.");
			return false;
		}
	}
	
	if (user.match(userPat)==null) 
	{
		alert("Your e-mail address does not seem to be valid.");
		return false;
	}

	var IPArray=domain.match(ipDomainPat);

	if (IPArray!=null) 
	{
		for (var i=1;i<=4;i++) 
		{
			if (IPArray[i]>255) 
			{
				alert("The IP address you have entered after the @ sign in your e-mail\naddress is invalid!");
				return false;
			}
		}
		return true;
	}

	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	for (i=0;i<len;i++) 
	{
		if (domArr[i].search(atomPat)==-1) 
		{
			alert("The domain name part of your e-mail address (after the @ sign)\ndoes not seem to be valid.");
			return false;
		}
	}
	
	if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) 
	{
		alert("Your e-mail address must end in a well-known domain\ne.g. domain.com, domain.net, domain.org etc.\nor two letter " + "country code e.g. domain.co.uk,\ndomain.org.uk etc.");
		return false;
	}
	
	if (len<2) 
	{
		alert("Your e-mail address does not have a valid domain name!");
		return false;
	}
	return true;
}

//--

function ShowNote(s,blnDisplay)
{
	var objID = document.getElementById(s);
	objID.style.display = (blnDisplay)?"":"none";
}

//--

function getWidth(){
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return myWidth;
	//window.alert( 'Height = ' + myHeight );
}