	function setValue(obj, dftValue, flag){
		if (flag){
			if (obj.value == ""){
				obj.value = dftValue;
				//obj.style.color = '#cccccc';
			}
		}
		else{
			if (obj.value == dftValue && (obj.style.color == '#cccccc' || obj.style.color == '')){
				obj.value = '';
				//obj.style.color = '#5d5d5d';
			}
			
		}
	}
	function addbookmark(){
		var bookmarkurl = document.location;
		var bookmarktitle = document.title;
		if (document.all){
			window.external.AddFavorite(bookmarkurl, bookmarktitle);
		}
	}
	function setHome(ob){ 
		ob.style.behavior='url(#default#homepage)'; 
		ob.setHomePage(document.location); 
	}

function loadData(url, data){
	myxmlhttp = CreateXmlHttpReq (doLoadData);
	XmlHttpPOST (myxmlhttp, url, data);
}

function doLoadData(){
	if (myxmlhttp.readyState != 4 || myxmlhttp.status != 200){
		return;
	}

	//return myxmlhttp.responseText;
	var xmlDoc = myxmlhttp.responseXML;
	var scripts = xmlDoc.getElementsByTagName("script");	
	if (scripts.length != 0){
		for (var i=0; i< scripts.length; i++){
			eval(scripts[i].childNodes[0].nodeValue);
		}
	}
}

if (window.addEventListener){
	window.addEventListener('load', execAtLoad, false);
}
else if (window.attachEvent){
	window.attachEvent('onload', execAtLoad);
	}
else{
	window.onload = execAtLoad;
}
function execAtLoad(){
	setCounriesSize();
}
function setCounriesSize(){
	var obj = document.getElementById('countries-container');
	var obj_ = document.getElementById('countries-scroll');
	if (obj && obj_){ obj_.style.height = (obj.clientHeight >= 170)? (obj.clientHeight - 22) + 'px' : '150px'; }
}
function rc(A,B){
	var C=A.href;
	A.href=B;
	setTimeout(function(){A.href=C},500);
}

function setCookie (name, value, expires, path, domain, secure) {
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}
function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}

