function OpenNewWindow(url, x, y) {
	var options = "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=" + x + ",height=" + y;
		msgWindow=window.open(url,"", options);
}

function OpenNewWindowNoScroll(url, x, y) {
	var options = "toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=" + x + ",height=" + y;
		msgWindow=window.open(url,"", options);
}

// ----------------------------------------------------------------------------------------------

function forgottenpass(){
    //window.alert(id+ "  " +quant);
    var url = BASEURL+"forgotten.php";
    xmlHttp=GetXmlHttpObject(forg_responsed);
    xmlHttp.open("GET", url , true);
    xmlHttp.send(null);
}
if (!hidePopup){
    function hidePopup(){
        //window.alert(id+ "  " +quant);
        document.getElementById('popup').style.display='none';
    }
}
function send_forgotten(email){
    //window.alert(id+ " _ " +quant);
    xmlHttp=GetXmlHttpObject(forg_responsed);
    //xmlHttp.setRequestHeader('Content-Type','multipart/form-data');
    xmlHttp.open("GET", BASEURL+"forgotten.php?email="+email , false);
    xmlHttp.send(null);
}

function forg_responsed() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
        res=xmlHttp.responseText;
        if (res.indexOf('1') == 0) {
            res=res.substr(1);
            setTimeout('hidePopup()', 3000);
        }
        document.getElementById('popup_content').innerHTML = res;
        document.getElementById('popup').style.display='block';
		//window.location.reload();
	} 
} 

/*function GetXmlHttpObject(handler)
{

	var objXmlHttp=null

	if (navigator.userAgent.indexOf("Opera")>=0)
	{
		alert("This feature doesn't work in Opera") 
		return 
	}
	if (navigator.userAgent.indexOf("MSIE")>=0)
	{ 
		var strName="Msxml2.XMLHTTP"
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
		{
			strName="Microsoft.XMLHTTP"
		} 
		try
		{ 
			objXmlHttp=new ActiveXObject(strName)
			objXmlHttp.onreadystatechange=handler
			return objXmlHttp
		} 
		catch(e)
			{ 
				alert("Error. Scripting for ActiveX might be disabled") 
				return 
			} 
	} 
	if (navigator.userAgent.indexOf("Mozilla")>=0)
	{
		objXmlHttp=new XMLHttpRequest()
		objXmlHttp.onload=handler
		objXmlHttp.onerror=handler 
		return objXmlHttp
	}
}*/