// Agregar a favoritos
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}
// --------------------------------------------------------------------------------------------------------------------
// Desactivar seleccion de textos
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}
// --------------------------------------------------------------------------------------------------------------------
// Pop IMG
var defaultPopWide = 650;
var defaultPopHigh = 400;
var defaultPopTitle = "Charmed Forever"; //do not use (" or ') in titles

function Img( sImage , iWide , iHigh , sTitle ){
	if(sImage == null){ 
		alert("No se especifico una imagen!");
	} else {
		imgTitle = sTitle == null ? "&title=" + escape(defaultPopTitle)  : "&title=" + escape(sTitle) ;
		imgQuery = "?image=" + sImage + imgTitle;
		
		winWide = iWide == null ? defaultPopWide  : iWide ;
		winHigh = iWide == null ? defaultPopHigh  : iHigh ;
		
		imgWindow = window.open("../pops/visor.htm" + imgQuery, "popWindow" , "width="+winWide.toString()+",height="+winHigh.toString()+",status=0,toolbar=0,scrollbars=1,menubar=0,screenX=0,screenY=0");
	}
}

function ImgHome( sImage , iWide , iHigh , sTitle ){
	if(sImage == null){ 
		alert("No se especifico una imagen!");
	} else {
		imgTitle = sTitle == null ? "&title=" + escape(defaultPopTitle)  : "&title=" + escape(sTitle) ;
		imgQuery = "?image=" + sImage + imgTitle;
		
		winWide = iWide == null ? defaultPopWide  : iWide ;
		winHigh = iWide == null ? defaultPopHigh  : iHigh ;
		
		imgWindow = window.open("pops/visor.htm" + imgQuery, "popWindow" , "width="+winWide.toString()+",height="+winHigh.toString()+",status=0,toolbar=0,scrollbars=1,menubar=0,screenX=0,screenY=0");
	}
}
// --------------------------------------------------------------------------------------------------------------------
// Pop ENCUESTAS
function Encuesta( sImage , iWide , iHigh , sTitle ){
	if(sImage == null){ 
		alert("no image specified.");
	} else {
		imgTitle = sTitle == null ? "&title=" + escape(defaultPopTitle)  : "&title=" + escape(sTitle) ;
		imgQuery = "?image=" + sImage + imgTitle;
		
		winWide = iWide == null ? defaultPopWide  : iWide ;
		winHigh = iWide == null ? defaultPopHigh  : iHigh ;
		
		imgWindow = window.open("../pops/visor.htm" + imgQuery, "popWindow" , "width="+winWide.toString()+",height="+winHigh.toString()+",status=0,toolbar=0,scrollbars=1,menubar=0,screenX=0,screenY=0");
	}
}
// --------------------------------------------------------------------------------------------------------------------
// Pop FORM
function popForm(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=400,left = 362,top = 184');");
}
// --------------------------------------------------------------------------------------------------------------------
// Pop Minis
function popMini(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,left = 400,top = 184');");
}
// --------------------------------------------------------------------------------------------------------------------
// Div Aleatorio
var DivIMG=new Array()
DivIMG[0] = "alyssa";
DivIMG[1] = "holly";
DivIMG[2] = "rose";
DivIMG[3] = "shannen";
DivIMG[4] = "brian";
DivIMG[5] = "julian";
DivIMG[6] = "hermanasPaige";
DivIMG[7] = "hermanasPrue";

var I = DivIMG.length;
var cualDiv=Math.round(Math.random()*(I-1));

	function mostrarNavBarHome() {
	document.write("<div id=\"" + DivIMG[cualDiv] + "\"><img src=\"graficos/diseno/general/blank.gif\" alt=\"\" width=\"250\" height=\"600\" usemap=\"#Menu\" border=\"0\"></div>");
	}
	function mostrarNavBar() {
	document.write("<div id=\"" + DivIMG[cualDiv] + "\"><img src=\"../graficos/diseno/general/blank.gif\" alt=\"\" width=\"250\" height=\"600\" usemap=\"#Menu\" border=\"0\"></div>");
}
// --------------------------------------------------------------------------------------------------------------------
// Div Aleatorio Prue
var DivPRUE=new Array()
DivPRUE[0] = "alyssa";
DivPRUE[1] = "holly";
DivPRUE[2] = "shannen";
DivPRUE[3] = "brian";
DivPRUE[4] = "julian";
DivPRUE[5] = "hermanasPrue";

var IPRUE = DivPRUE.length;
var cualDivPRUE=Math.round(Math.random()*(IPRUE-1));

	function mostrarNavBarPrue() {
	document.write("<div id=\"" + DivPRUE[cualDivPRUE] + "\"><img src=\"../graficos/diseno/general/blank.gif\" alt=\"\" width=\"250\" height=\"600\" usemap=\"#Menu\" border=\"0\"></div>");
}
// --------------------------------------------------------------------------------------------------------------------
// Div Aleatorio Paige
var DivPAIGE=new Array()
DivPAIGE[0] = "alyssa";
DivPAIGE[1] = "holly";
DivPAIGE[2] = "rose";
DivPAIGE[3] = "brian";
DivPAIGE[4] = "julian";
DivPAIGE[5] = "hermanasPaige";

var IPAIGE = DivPAIGE.length;
var cualDivPAIGE=Math.round(Math.random()*(IPAIGE-1));

	function mostrarNavBarPaige() {
	document.write("<div id=\"" + DivPAIGE[cualDivPAIGE] + "\"><img src=\"../graficos/diseno/general/blank.gif\" alt=\"\" width=\"250\" height=\"600\" usemap=\"#Menu\" border=\"0\"></div>");
}
