/* FUNCIONES PRINCIPALES XCURSOR */
/* (c) Copyright XCURSOR PROPIEDAD DIGITAL 2004. All rights reserved */

//alert('cargo js de xcursor net clientes funprincipales');



function popparaflash(theURL,winName,features) { 
  window.open(theURL,winName,features);
}




function popfoto_old(srcori) {

var popventana;
popventana=open("","popven","height=5 width=5 top=20 left=20");
popventana.document.close();
popventana.document.write("<html>");
popventana.document.write("<head>");
popventana.document.write("<title>"+ l_cerrarpop +"</title>");
popventana.document.write("</head>");
popventana.document.write("<body leftmargin='0' topmargin='0'>");
popventana.document.write("<img src='"+srcori+"' style='cursor:pointer' title='"+ l_cerrarpop +"' onLoad='var alto = this.height + 28; top.resizeTo(this.width, alto)' onclick='top.close()'></div>");
popventana.document.write("</body>");
popventana.document.write("</html>");

}

function popfoto(srcori) {
	var tds 

	if (self.pageYOffset) // all except Explorer
	{
		tds = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		tds = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		tds = document.body.scrollTop;
	}


	document.getElementById('popdefoto').style.width = '100%'
	//document.getElementById('popdefoto').style.height = '100%'
	document.getElementById('popdefoto').style.top = "0"
	document.getElementById('popdefototd').innerHTML = "<table style='border:1px solid #999999;' bgcolor='444444' cellpadding=0 border=0 cellpadding=0><tr><td style='padding:5 5 5 5;'><img id='pop_foto' src='"+srcori+"' style='cursor:pointer;' onclick='popfotoclose()' title='"+ l_cerrarpop +"'></td></tr><tr><td align=right style='padding:5 5 5 5;font-size:11px;color:FFCC00; font-family:arial;' >"+ l_cerrarpop +" &nbsp;<b>X</b></td><tr></table>"
	var altoimg = document.getElementById('pop_foto').height
	
	var tcs = document.body.offsetHeight
	document.getElementById('popdefoto').style.height = (tcs + 600)
	document.getElementById('popdefototd').style.paddingTop = (tds + 50)
	document.getElementById('popdefototd').style.paddingBottom = (tcs)
	
}

function popfotoclose() {
document.getElementById('popdefoto').style.width = '1px'
document.getElementById('popdefoto').style.height = '1px'
document.getElementById('popdefototd').innerHTML = ""
}


function popaudio(srcori) {
	var tds 
	if (self.pageYOffset) // all except Explorer
	{
	tds = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
	// Explorer 6 Strict
	{
	tds = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
	tds = document.body.scrollTop;
	}
	document.getElementById('popdefoto').style.width = '100%'
	//document.getElementById('popdefoto').style.height = '100%'
	document.getElementById('popdefoto').style.top = "0"
	document.getElementById('popdefototd').innerHTML = "<table style='border:1px solid #333333;cursor:pointer;' bgcolor='#333333' cellpadding=0 border=0 cellpadding=0><tr><td style='padding:5 5 5 5;'> <object classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' type='application/x-oleobject' width=250 height=150 align='middle' standby='Loading Microsoft Windows Media Player components...' id='MMPlayer1'> <param name='filename' value='" + srcori + "'> <param name='ShowControls' value='1'> <param name='ShowStatusBar' value='1'> <param name='ShowDisplay' value='0'> <param name='DisplaySize' value='1'> <param name='Autostart' value='1'> <param name='Loop' value='1'> <embed src='" + srcori + "' autostart=1 loop=1 align='middle' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/download/default.asp' showcontrols=1 showdisplay=0 showstatusbar=1 filename='" + srcori + "' displaysize='1' > </embed> </object></td></tr><tr><td align=right style='padding:5 5 5 5;font-size:11px;color:FFCC00; font-family:arial;' onclick='popfotoclose()'>CERRAR AUDIO &nbsp;<b>X</b></td><tr></table>"
	var altoimg = "285px"
	var tcs = document.body.offsetHeight
	document.getElementById('popdefoto').style.height = (tcs + 600)
	document.getElementById('popdefototd').style.paddingTop = (tds + 50)
	document.getElementById('popdefototd').style.paddingBottom = (tcs)
	
}

function popaudioclose() {
document.getElementById('popdefoto').style.width = '1px'
document.getElementById('popdefoto').style.height = '1px'
document.getElementById('popdefototd').innerHTML = ""
}



function poplink(enlace) {

var detector = enlace.slice(0,4)
//alert(detector)
	if(detector == "http"){
	eval('window.open("'+ enlace +'","popven","toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");')
	}
	if(detector == "entr"){
	eval('document.location.href="'+ enlace +'"')
	}
}

function masinfo(){
//Window.open("masinfo.asp","masinfo",2HEIGHT=440 WIDTH=310 top=5px left=5px");
window.open('masinfo.asp','mi','width=320,height=460,top=0,left=0,menubar=0,toolbar=0,directories=0,location=0,status=1,scrollbars=0,resizable=true');
}



/* Funcion de precarga de imagenes del surf */

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



function resize_foto_noticia(ww,hh,ff){
	if(ww >= 360 ){
	eval('document.all.'+ ff +'.width = 360')
	}
	if(ww >= 360 ){
	eval("document.getElementById('"+ ff +"').width = 360")
	}
	
}


function resize_foto_votacion(ww,hh,ff){
	if(ww >= 170 ){
	eval('document.all.'+ ff +'.width = 170')
	}
	if(ww >= 170 ){
	eval("document.getElementById('"+ ff +"').width = 170")
	}

}


function resize_foto_publicacion(ww,hh,ff){
	if(ww >= 550 ){
	eval('document.all.'+ ff +'.width = 550')
	}
	if(ww >= 550 ){
	eval("document.getElementById('"+ ff +"').width = 550")
	}

}



function fullscreenflash(pel,ancho,alto,estilo){
	var tds 

	if (self.pageYOffset) // all except Explorer
	{
		tds = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		tds = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		tds = document.body.scrollTop;
	}


	document.getElementById('popdeflash').style.width = '100%'
	document.getElementById('popdeflash').style.top = "0"
	document.getElementById('popdeflashtd').innerHTML = "<table style='border:1px solid #999999;' bgcolor='444444' cellpadding=0 border=0 cellpadding=0><tr><td style='padding:5 5 5 5;'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'  width='"+ ancho +"' height='"+ alto +"'><param name='movie' value='"+ pel +"'><param name='menu' value='false'><param name='quality' value='high'><embed src='"+ pel +"' quality='high'  pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'  width='"+ ancho +"' height='"+ alto +"' ></embed></object></td></tr><tr><td align=right style='padding:5 5 5 5;font-size:11px;color:FFCC00; font-family:arial; cursor:pointer;' onclick='popflashclose()' >"+ l_cerrarpop +" &nbsp;<b>X</b></td><tr></table>"
	var altoimg = alto
	
	var tcs = document.body.offsetHeight
	document.getElementById('popdeflash').style.height = (tcs + 600)
	document.getElementById('popdeflashtd').style.paddingTop = (tds + 30)
	document.getElementById('popdeflashtd').style.paddingBottom = (tcs)
	
}

function popflashclose() {
document.getElementById('popdeflash').style.width = '1px'
document.getElementById('popdeflash').style.height = '1px'
document.getElementById('popdeflashtd').innerHTML = ""
}


/* FUNCIONES MAY MIN DE BOTONES MENU */



function botonUpper(nombre, valor){
eval('document.all.'+ nombre +'.style.letterSpacing = "0.1em"');
}

function botonLower(nombre, valor){
eval('document.all.'+ nombre +'.style.letterSpacing = "normal"');
}


function wpubflash(ruta, ancho, alto){
var pubflash
pubflash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ancho+'" height="'+alto+'"><param name="movie" value="'+ruta+'"><param name="menu" value="false"><param name="quality" value="high"><embed src="'+ruta+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ancho+'" height="'+alto+'"></embed></object>'
document.write(pubflash)	
}