function $(e)
{	
	return document.getElementById(e);
}
function GetXmlHttpObject(){
	var xmlHttp=null;
	try{ // Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e){// Internet Explorer
		try{
			// I.E. 5.5
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			// I.E. 6.0
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function load(url,p){
	try{
		var xmlHttp = GetXmlHttpObject();
		//var url=user+".php";
		//var url = "process_online_bookmarks/testing.php";
		$(p).innerHTML =  "<br><br><center><img src='images/loading.gif' /> </center>";
		xmlHttp.onreadystatechange=function(){
			if(xmlHttp.readyState==4){
				response = xmlHttp.responseText;
				if (response != "FALSE"){
					$(p).innerHTML = response;
				}else $(p).innerHTML = "<br><br>ERROR: adding failed";
			}
		}
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);
	}catch(e){
		alert("ERROR: name = "+ e.name + "; message = " + e.massage);
	}
}

function showCity(url,id){
	//alert('Hello world');
    try{
		var xmlHttp = GetXmlHttpObject();       
		xmlHttp.onreadystatechange=function(){
			if(xmlHttp.readyState==4){
				response = xmlHttp.responseText;                
				if (response != "FALSE"){
					$(id).innerHTML = response;
				}else alert("Failed to load");
			}            
		}
		xmlHttp.open("GET", url, true);       
		xmlHttp.send(null);
	}catch(e){
		alert("ERROR: name = "+ e.name + "; message = " + e.massage);
	}
}
function toggleMenu(objID) {if (!document.getElementById) 	return;	var ob = document.getElementById(objID).style;	ob.display = (ob.display == 'block')?'none': 'block';}
/*
function stateChanged()
{
    if (xmlhttp.readyState==4)
    {
        document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
    }
}*/
