///////////////////////////////////
//      Script general v2.0      //
///////////////////////////////////
function BrowserCheck()
{
    this.ver = navigator.appVersion;
    this.agent = navigator.userAgent;
    this.dom = document.getElementById?1:0;
    this.opera6 = this.agent.indexOf("Opera 6")>-1;
    this.opera5 = this.agent.indexOf("Opera 5")>-1;
    this.opera = (this.opera6 || this.opera5);
    this.ie5 = ((this.ver.indexOf("MSIE 5")>-1 || this.ver.indexOf("Internet Explorer 5")>-1) && this.dom && !this.opera)?1:0;
    this.ie6 = ((this.ver.indexOf("MSIE 6")>-1 || this.ver.indexOf("Internet Explorer 6")>-1) && this.dom && !this.opera)?1:0;
    this.ie4 = (document.all && !this.dom && !this.opera5)?1:0;
    this.ie = this.ie4 || this.ie5 || this.ie6;
    this.mac = this.agent.indexOf("Mac")>-1;
    this.ns6 = (this.dom && parseInt(this.ver) >= 5)?1:0;
    this.ns4 = (document.layers && !this.dom)?1:0;
    this.supp = (this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.opera6);

    return this;
}
var objBrowser = new BrowserCheck();
function LimpiaArray(aLista) {}

///////////////////////////////////
//    Control de Capas v2.0      //
///////////////////////////////////
function GetLayerRef(cLayer, lWithDoc){}
function MoveLayer (cLayer, nPosx, nPosy){}
function ResizeLayer (cLayer, nWidth, nHeight){}
function SetzIndex (cLayer, nPos){}
function SetTop (cLayer, nPos){}
function SetLeft (cLayer, nPos){}
function SetWidth (cLayer, nPos){}
function SetHeight (cLayer, nPos){}
function GetWidth(cLayer){}
function GetHeight(cLayer){}
function GetLeft(cLayer){}
function GetzIndex(cLayer){}
function GetTop(cLayer){}
function ChangeLayerContent(cLayer, cContent){}
function ClipLayer(){}
function ChangeVisibility(cLayer, nEstado){}
function GetVisibility(cLayer){}
function getRealLeft(objeto){}
function getRealTop(objeto){}
function MouseX(){}
function MouseY(){}

/////////////// FUNCIONES ESPECIFICAS DE LA APLICACION REGAR
function abreEmergentes(URL)
{    var iheight = 462;
    if ( (objBrowser.mac) && (objBrowser.ns4) )
    {    iheight = 481; }
    var propierties = "width=560,height="+ iheight +",toolbar=no,scrollbars=no,resizable=no";
    window.open(URL,"Emergentes",propierties);
}

function imprimir()
{    var URL = "imprimir.html";
    var iWidth = 577;
    if ( (objBrowser.mac) && (objBrowser.ie) )
    {    iWidth = 560; }
    var propierties = "width="+ iWidth +",height=450,toolbar=no,scrollbars=yes,resizable=no";
    window.open(URL,"Imprimir",propierties);
}

function abreEnvio()
{    var URL = "enviarN.html";
    var iWidth = 391;
    if ( (objBrowser.mac) && (objBrowser.ie) )
    {    iWidth = 361; }
    var propierties = "width="+ iWidth +",height=504,toolbar=no,scrollbars=yes,resizable=no";
    window.open(URL,"EnviarNoticia",propierties);
}

function abreRecomienda()
{    var URL = "recomendar.html";
    var iWidth = 391;
    if ( (objBrowser.mac) && (objBrowser.ie) )
    {    iWidth = 361; }
    var propierties = "width="+ iWidth +",height=504,toolbar=no,scrollbars=yes,resizable=no";
    window.open(URL,"EnviarNoticia",propierties);
}

/////////////// FUNCIONES ESPECIFICAS DE LA APLICACION REGAR - de sergio
var editado=false;
var imgoff=new Array(12);
var imgon=new Array(12);
var enlaces=new Array("/presentacion.asp","/usuario_mapa.asp","/busquedas.asp","/boletines.asp",
	"/suscripciones.asp","/foro/envios.asp?method=Topic&FORUM_ID=5","/publicaciones.asp","/enlaces.asp","/foro/registro.asp",
	"/foro/login.asp","/foro/pop_profile.asp?mode=Edit","/foro/usuarios_foro.asp",
	"/foro/busquedaforo.asp")
if (document.images) {
	for (var i=0;i<13;i++) {
		if ((i==11)|(i==12)) {j=i-10} else {j=i}
		imgon[i] = new Image();
		imgon[i].src = "/imagenes/menu/op"+j+"on.gif";
		imgoff[i] = new Image();
		imgoff[i].src = "/imagenes/menu/op"+j+"off.gif";
		}
	}

function overIt(x) {if (document.images) {var imgName = "document.opc" + x; eval(imgName).src = imgon[x].src;}}
function outOfIt(x) {if (document.images) {var imgName = "document.opc" + x;eval(imgName).src = imgoff[x].src;}}

function ir_a(url) {if (confirmaperdercambios()) {location=url}}

function confirmaperdercambios() 
{if (editado==true) {x=window.confirm('¿Desea descartar los cambios?',3,1,2);return x;}
else {return true}}

function abrirventana(url)
{window.open(url,'ventanaemergente','width=510,height=640,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=no');}

function abrirventana2(url)
{window.open(url,'ventanaemergente','width=335,height=270,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=no');}

TE1="Enviando la imagen. Espera a que termine el proceso."; 
TE2="Enviando la imagen. Espera a que termine el proceso.."; 
TE3="Enviando la imagen. Espera a que termine el proceso..."; 
M=TE1; cnt=0;

function SH(){
texto.color="green";
texto.innerText=M;
cnt++;
if(cnt==1 && M==TE1){M=TE2;}
if(cnt==2 && M==TE2){M=TE3;}
if(cnt==3 && M==TE3){cnt=0;M=TE1;} 
setTimeout("SH()",200); }


function editarimagen(imagen, usuario, articulo) {
	var url = "/editor_imagenes.asp?popup=si&idimagen="+imagen+"&idusuario="+usuario+"&idarticulo="+articulo; 
	x2 = window.open(url, "imagen","toolbar=no,width=640,status=no,menubar=no,resize=yes");
	x2.focus();
}

function editararchivo(archivo, usuario, articulo) {
	var url = "/editor_archivos.asp?popup=si&idarchivo="+archivo+"&idusuario="+usuario+"&idarticulo="+articulo; 
	x3 = window.open(url, "archivo","toolbar=no,width=640,height=300,status=no,menubar=no,resize=yes");
	x3.focus();
}







// java foro
<!-- hide from JavaScript-challenged browsers
function openWindow(url) {popupWin = window.open(url,'new_page','width=400,height=400')}
function openWindow2(url) {popupWin = window.open(url,'new_page','width=400,height=450')}
function openWindow3(url) {popupWin = window.open(url,'new_page','width=400,height=450,scrollbars=yes')}
function openWindow4(url) {popupWin = window.open(url,'new_page','width=400,height=525')}
function openWindow5(url) {popupWin = window.open(url,'new_page','width=450,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes')}
function openWindow6(url) {popupWin = window.open(url,'new_page','width=500,height=450,scrollbars=yes')}
function openWindowHelp(url) {popupWin = window.open(url,'new_page','width=470,height=200,scrollbars=yes')}
// done hiding -->

function ChangeVisibility(cLayer, nEstado){
    var  nLyBucle;
    if (objBrowser.opera) { if (nEstado == 1) { document.getElementById(cLayer).style.visibility = "visible"; } else { document.getElementById(cLayer).style.visibility = "hidden"; } }
    else if (objBrowser.ie) { if (nEstado == 1) { document.all.item(cLayer).style.visibility = "visible"; } else { document.all.item(cLayer).style.visibility = "hidden"; } }
    else if (objBrowser.ns4) { templayer = GetLayerRef(cLayer, 0); if (nEstado == 1) { templayer.visibility = "show"; } else { templayer.visibility = "hidden"; } }
    else if (objBrowser.ns6) { if (nEstado == 1) { document.getElementById(cLayer).style.visibility = "visible"; } else { document.getElementById(cLayer).style.visibility = "hidden";} }
}

function GetVisibility(cLayer){
    var  nLyBucle;
    var lEstado;         // Estado de la capa 1 visible - 0 invisible - 3 ni se sabe

    if (objBrowser.ie) { if (document.all.item(cLayer).style.visibility == "visible") {    lEstado = 1;} else if (document.all.item(cLayer).style.visibility == "hidden") {    lEstado = 0; } else { lEstado = 3; } }
    else if (objBrowser.ns4) { templayer = GetLayerRef(cLayer, 0); if (templayer.visibility == "show") { lEstado = 1; } else if (templayer.visibility == "hidden") { lEstado = 0; } else { lEstado = 3; } }
    else if (objBrowser.ns6) { if (document.getElementById(cLayer).style.visibility == "visible") { lEstado = 1;} else if (document.getElementById(cLayer).style.visibility == "hidden") { lEstado = 0;} else    {lEstado = 3} }
    return lEstado;
}

PositionX = 100;
PositionY = 100;
defaultWidth  = 640;
defaultHeight = 300;
var AutoClose = true;
// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');
writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');
writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}