function checkTerms(tform)
{
	if(tform.termsagree.checked == false)
	{
		alert("Please read and accept our Terms and Conditions to continue.");
		return false;
	}
	else
		return true;
}
function validateDomain(strDom)
{
	if(strDom.value == "")
	{
		alert("Please enter a value in the domain name box");
		strDom.focus();
		return false;
	}
	if(strDom.value.length < 3)
	{
		alert("Please enter at least 3 characters in the domain name box.");
		strDom.focus();
		return false;
	}
	if(strDom.value.length > 63)
	{
		alert("Please enter at most 63 characters in the domain name box.");
		strDom.focus();
		return false;
	}

	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--";
	var checkStr = strDom.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
			if(ch == checkOK.charAt(j))
				break;
		
		if(j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}
  	if(checkStr.charAt(0)=="-"||checkStr.charAt(checkStr.length-1)=="-")
  	{
    		allValid = false;
  	}
  	if(!allValid)
  	{
    		alert("Please enter only letters, digits and \"-\" characters in the domain name box.\n\nRemembering that domains cannot begin or end with \"-\"");
    		strDom.focus();
    		return false;
  	}
  	return true;
}
function toggleDiv(divId)
{
	el = document.getElementById(divId);
	if(el.style.display == "block")
		el.style.display = "none";
	else
		el.style.display = "block";
}
function toggleTextGlossary(divId)
{
	el = document.getElementById(divId);
	if(el.innerHTML == "Open")
		el.innerHTML = "Close";
	else
		el.innerHTML = "Open";
}
var win=null;
function popUpFAQ(mypage,myname,w,h)
{
	var topPos = (screen.availHeight - h)/2;
	var leftPos = (screen.availwidth - w)/2;
	settings='width='+w+',height='+h+',top='+topPos+',left='+leftPos+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	win=window.open(mypage,myname,settings);
}

function boxClick(obj)
{
	obj.style.border='1px solid #C0C0C0';
	obj.style.backgroundColor='#FFFFFF';
	if(document.getElementById('email') && document.getElementById('password'))
	{
		document.getElementById('email').style.color = "#456FB4";	
		document.getElementById('password').style.color = "#456FB4";
		document.getElementById('submitbut').style.backgroundColor = "#FFFFFF";
	}
	clicked = true;
	
}
function boxOver(obj)
{
	if(!clicked)
	{
		obj.style.border='1px solid #DBE4F2';
		obj.style.backgroundColor='#F4F7FB';
	}
}
function boxOut(obj)
{
	if(!clicked)
	{
		obj.style.border='1px solid #FFD5D5';
		obj.style.backgroundColor='#FFFBFB';
	}
}

function showDiv(divId)
{
	obj = document.getElementById(divId);
	if(obj)
		obj.style.display = 'block';	
	
}

function hideDiv(divId)
{
	obj = document.getElementById(divId);
	if(obj)
		obj.style.display = 'none';
}

var win=null;
function whoisDetails(mypage,myname,w,h,scroll,pos)
{
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}

function checkPP(obj)
{
	sObj = document.getElementById('nochexoption');
	if(obj.options[obj.selectedIndex].text != "United Kingdom")
	{
		document.details.paymentmethod[1].checked = true;
		sObj.style.display = "none";	
	}	
	else
	{
		sObj.style.display = "block";	
	}
}