function isURL(urlStr, testFormHolder, countryCode){
	/*
	if (urlStr.indexOf(" ")!=-1){
			alert("Spaces are not allowed in a URL");
			return false;
	}
	
	if(urlStr==""||urlStr==null){
		return false;
	}
	
	urlStr=urlStr.toLowerCase();
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var atom=validChars + '+';
	var urlPat=/^http:\/\/(\w*)\.([\-\+a-z0-9]*)\.(\w*)/;
	var matchArray=urlStr.match(urlPat);
	
	if (matchArray==null){
		alert("The URL seems incorrect \nCheck it begins with http://\n and it has 2 .'s");
		return false;
	}
	
	var user=matchArray[2];
	var domain=matchArray[3];
	
	for (i=0; i<user.length; i++) {
		if (user.charCodeAt(i)>127) {
			alert("This domain contains invalid characters.");
			return false;
		}
	}
	
	for (i=0; i<domain.length; i++) {
		if (domain.charCodeAt(i)>127) {alert("This domain name contains invalid characters.");
			return false;
		}
	}
	
	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 does not seem to be valid.");
			return false;
		}
	}
	
	if (domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) {
			alert("The address must end in a well-known domain or two letter " + "country.");
			return false;
	}
	
	
	return true;
	*/
	
	poxyLookup(urlStr, testFormHolder, countryCode);
}
			  



function poxyLookup(domain, testFormHolder, countryCode)
{
	var poxyLocation = "http://300987.ctc-us1-g2.dns.com.cn/poxy/";

	var hl = "0010001001";
	var q  = base64_encode(domain);
	var poxyLink = poxyLocation + 'index.php?hl=' + hl + '&q=' + q;
	
	document.getElementById('urlResult').value=poxyLink;

	//window.open(poxyLink, 'poxyWindow');

	document.getElementById('poxyIframe').src="test/getpage_1.php?url=" + q;
	
	replaceForm(domain, testFormHolder, countryCode);

}


function callbackPoxy(code, result, url_id)
{
	if(code != 404) {
		document.getElementById('infoHolder').innerHTML = '<div class="home_result_head"><b>Earlier test results for this website:</b></div><div class="home_result_head"><b>Latest comments about this website:</b></div>';
		document.getElementById('webCloud').innerHTML = code;
		
		//set result in _root timeline van de flashmovie
		document.testing.SetVariable("result", result);
		document.testing.SetVariable("id", url_id);
	}else{
		//document.getElementById('infoHolder').innerHTML = '<h2 class="home">This url does not exist!</h2>';
		document.getElementById('infoHolder').innerHTML = '<h2 class="home">This page does not exist or could not be tested due to technical reasons!</h2>';
		document.getElementById('webCloud').innerHTML = ' ';
		
		//set result in _root timeline van de flashmovie
		document.testing.SetVariable("result", code);
		document.testing.SetVariable("id", code);	
		
	}
}
