// JavaScript Document
document.oncontextmenu = function() {
	return false
}

function right(e) {
	if (navigator.appName == 'Netscape' && e.which == 3) {
		locationHref();
		return false;
	}
	else if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
		locationHref();
		return false;
	}
	return true;
}

function locationHref(){
	location.href = "http://www.actricesdelporno.com/acceso.php?contenido=pornstars&foto=6027";
}
document.onmousedown = right;




var element;

function showHorarios(id,lang,e){
	element = e;
	var strUrl = "ajax_horarios.php";
	var oQuery = "id=" + id + "&lang=" + lang;
	xmlHttpPost(strUrl,oQuery);
}

function updateResults(str){
//alert(str);
	var selector = str.substr(0,9);
	str = str.substr(9);
	if (selector == "horarios_"){
		eliminarElementos("h");
		crearElementos("div","h");
		document.getElementById("h").innerHTML = str;
	}
}

function crearElementos(e,i){
	var x = getX(element);
	var y = getY(element);
	x = x - 297;
	y = y - 152;
	var s = "z-index:2000;top:" + y + "px;left:" + x + "px;position:absolute";
	if (document.all) {
		str = "<" + e + " id=\"" + i + "\" style=\"" + s + "\" />";
		n = document.createElement(str);
	}
	else {
		n = document.createElement(e);
		n.setAttribute("id", i);
		n.setAttribute("style", s);
	}
	t = document.createTextNode("");
	n.appendChild(t);
	f = document.getElementById("body");
	f.appendChild(n);
	element = "";
}

function eliminarElementos(i){
	t = document.getElementById(i);
	f = document.getElementById("body");
	if (t)	f.removeChild(t);
}

function getX(e){
	var w = e.offsetWidth + 5;
	var curleft = 0;
    if (e.offsetParent){
		while (1){
			curleft += e.offsetLeft;
			if (!e.offsetParent) break;
			e = e.offsetParent;
		}
	}
	else if (e.x){
		curleft += e.x;
	}
    return curleft + w;
}

function getY(e){
	var curtop = 0;
    if (e.offsetParent){
        while (1){
			curtop += e.offsetTop;
			if (!e.offsetParent) break;
			e = e.offsetParent;
        }
	}
    else if (e.y){
		curtop += e.y;
	}
    return curtop;
}

