document.write("<div id='begin'></div>");
var fsdiv = document.createElement("div");

function processRequest() {
    if (req.readyState == 4) {
        if (req.status == 200) {
          respuesta();
		  req.abort();
        } else {
  			alert ("Not able to retrieve description");
        }
    } else {
	
	}
}

function showPopUp(txtPop, btn) {
	var pageWidth,pageHeight;
	if (document.body.scrollHeight > document.body.offsetHeight) {
		pageWidth = document.body.scrollWidth;
		pageHeight = document.body.scrollHeight;
	} else {
		pageWidth = document.body.offsetWidth;
		pageHeight = document.body.offsetHeight;
	}
	document.getElementById('condivmsg').innerHTML = txtPop;
	document.getElementById('btnCondiv').href = btn;
	//document.getElementById('btnCondiv2').href = btn;
	document.getElementById('condiv').style.left = ((pageWidth/2)-170)+"px";
	fsdiv.id = "fsdiv";
	fsdiv.style.backgroundColor = "#000000";
	fsdiv.style.padding = "0px";
	fsdiv.style.textAlign = "center";
	fsdiv.style.verticalAlign = "middle";
	fsdiv.style.color = "#ffffff";
	fsdiv.style.fontWeight = 'bold';
	fsdiv.style.width = pageWidth+"px";
	fsdiv.style.height = pageHeight+"px";
	fsdiv.style.position = "absolute";
	fsdiv.style.top = "0px";
	fsdiv.style.left = "0px";
	fsdiv.opacity = (0.8);
	fsdiv.style.MozOpacity = "0.8";
	fsdiv.style.filter = "alpha(opacity=80)";
	fsdiv.style.zIndex = "90";
	document.getElementById('begin').appendChild(fsdiv);
	document.getElementById('condiv').style.visibility = "visible";

}



function showPopUp2(txtPop, btn) {
	var pageWidth,pageHeight;
	if (document.body.scrollHeight > document.body.offsetHeight) {
		pageWidth = document.body.scrollWidth;
		pageHeight = document.body.scrollHeight;
	} else {
		pageWidth = document.body.offsetWidth;
		pageHeight = document.body.offsetHeight;
	}
	document.getElementById('condivmsg').innerHTML = txtPop;
	document.getElementById('btnCondiv').href = btn;
	document.getElementById('btnCondiv').onclick = function(){ redir(); cerrar();}
	
	document.getElementById('condiv').style.left = ((pageWidth/2)-170)+"px";
	fsdiv.id = "fsdiv";
	fsdiv.style.backgroundColor = "#000000";
	fsdiv.style.padding = "0px";
	fsdiv.style.textAlign = "center";
	fsdiv.style.verticalAlign = "middle";
	fsdiv.style.color = "#ffffff";
	fsdiv.style.fontWeight = 'bold';
	fsdiv.style.width = pageWidth+"px";
	fsdiv.style.height = pageHeight+"px";
	fsdiv.style.position = "absolute";
	fsdiv.style.top = "0px";
	fsdiv.style.left = "0px";
	fsdiv.opacity = (0.8);
	fsdiv.style.MozOpacity = "0.8";
	fsdiv.style.filter = "alpha(opacity=80)";
	fsdiv.style.zIndex = "90";
	document.getElementById('begin').appendChild(fsdiv);
	document.getElementById('condiv').style.visibility = "visible";

}
lapso = 0; 
function redir(){

	lapso = lapso + 1;	
			
		if(lapso >5){
		window.location.href="audiotel.php";  

		}	
		else{

    	setTimeout("redir()",1000) ;
		}
	
}

function cerrar()
{
//location.href='compte.php';
	document.getElementById("condiv").style.visibility = "hidden";
	document.getElementById("begin").removeChild(fsdiv);
}

function addslashes(str) 
{
	str = str.replace(/\'/g,'\\\'');
	str = str.replace(/\"/g,'\\"');
	str = str.replace(/\\/g,'\\\\');
	str = str.replace(/\0/g,'\\0');
	return str;
}

function stripslashes(str) 
{
	str = str.replace(/\\'/g,'\'');
	str = str.replace(/\\"/g,'"');
	str = str.replace(/\\\\/g,'\\');
	str = str.replace(/\\0/g,'\0');
	return str;
}