
	var request = null;
	function createRequest() {
		try { request = new XMLHttpRequest(); }
		catch(trymicrosoft) {
			try { request = new ActiveXObject("Msxml2.XMLHTTP"); }
			catch (othermicrosoft) {
				try { request = new ActiveXObject("Microsoft.XMLHTTP"); }
				catch (failed) { request = null; }
			}
		}
	}
/**************************/
/**************************/
	function get_dropdown_value(id) {
		var droplist = document.getElementById(id) ;
		var fValue = droplist.options[droplist.selectedIndex].value ;
		return fValue ;
	}
/**************************/
/**************************/	
	// Function find position of object	
	function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
	}  
// End Function find position of object	
/**************************/
/**************************/
	function showMe(objFind, objShow, pLeft, pTop){
		var position = findPos(objFind);
		var obj = document.getElementById(objShow).style;
		obj.left = (position[0] + pLeft) + "px";
		obj.top = (position[1] + pTop) + "px";
		obj.display = "block";
	}
/*********************************/		
	function post_edit_link(url, id) {
		createRequest();
		var getdate = new Date();  //Used to prevent caching during ajax call
		if(request) { 
			var catname	= document.getElementById("ajaxcatname").value;
			var linkid	= document.getElementById("ajaxlinkid").value;
			var title	= document.getElementById("ajaxtitle").value;
			var linkurl	= document.getElementById("ajaxurl").value;
			var str_request = "";
			str_request		+= "catname=" + encodeURIComponent( catname ) ;
			str_request 	+= "&linkid=" + encodeURIComponent( linkid ) ;
			str_request 	+= "&title=" + encodeURIComponent( title ) ;
			str_request 	+= "&url=" + encodeURIComponent( linkurl ) ;
			//alert(str_request)
			//return
			request.onreadystatechange  = function handleServerResponse(){
				if (request.readyState == 4) {
					if(request.status == 200) {
						//if ( request.responseText == 0 ) {
							//alert("Wrong username and password ...");
							document.getElementById(id).innerHTML = request.responseText ;
							get_infos_paging('get_list_music_website.php?cat=' + catname, 'show_infos')
							//return;
						//} else {
							//window.location.reload();
						//}
					} else {
						alert("Error during process. Please try again");
					}
				}	
			}
			request.open("POST",url,true); 
			request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			request.send(str_request); 
		}
	}	
	
/**************************/
	function get_form(url, id, objFind, objShow, pLeft, pTop){
		get_infos(url, id);
		showMe(objFind, objShow, pLeft, pTop);
	}
/**************************/	
	function hideMe(id){
		document.getElementById(id).style.display = "none"
	}
/**************************/
/**************************/	
	function openPopup(url){
		popupWin = window.open(url,'popup','width=500,height=400,scrollbars=yes,resizable=yes,menubar=no');
		if (window.focus) {popupWin.focus()}
	}	
/**************************/
/**************************/	
	function openPopupDB(url){
		popupWin = window.open(url,'popupdb','width=auto,height=400,scrollbars=yes,resizable=yes,menubar=no');
		if (window.focus) {popupWin.focus()}
	}		
/**************************/	
	function openTool(url, dimw, dimh){
		popupWin = window.open(url,'tool','width=' + dimw + ',height=' + dimh + ',scrollbars=no,resizable=yes,menubar=no');
		if (window.focus) {popupWin.focus()}
	}
