String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g,'');}
var imgs_lang="/artworks/es";
var lang="/artworks/es";
var DIR="";
var imgs="/artworks";
var url_tobookmark="Security Advisor";
var id_idioma=1
function abrirVentana(url, width, height, name) {
if (name==null) {name='nueva_ventana';}
var str = "height=" + height + ",innerHeight=" + height;
str += ",width=" + width + ",innerWidth=" + width;
if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
var xc = (aw - width) / 2;
var yc = (ah - height) / 2;
str += ",left=" + xc + ",screenX=" + xc;
str += ",top=" + yc + ",screenY=" + yc;
}
str += ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no";
objwin=window.open(url, name, str);
if (objwin)
objwin.focus();
}
function getObj(id) {if (document.getElementById) {return document.getElementById(id)} else if (document.all) {return document.all[id]} else {return document.all[id]}}
function setget_attr(obj, prop, val)
{
if (!val)
return obj.getAttribute(prop);
else
{
if (prop=="onload" || prop=="onmouseover" || prop=="onmouseout" || prop=="onclick" || typeof val=="function")
{
if (obj.id=="fotogal")
{
}
if (BrowserDetect.browser=="Explorer")
val = Function(val);
}
obj.setAttribute(prop,val);
}
}
function rnd(max) {
var x = Math.random() * max;
x = x + 1;
return parseInt(x);
}
function validar_buscador(form) {
var o=form.buscar.value;
if (o.length<3) {
DHTMLALERT("Por favor, Ingrese un texto válido a buscar");
return false;
}
return true;
}
function limpiar_buscador (obj) {
if (obj.value=="Buscar")
obj.value="";
}
function clear_input(o,l) {
if (o.value==l) {o.value='';}
}
function check_form_registro_home(form) {
var aux="Dirección de correo incorrecta o email no válido.|Los emails no coinciden.".split("|");
if (form.tiny_email.value.indexOf('@') < 0 || form.tiny_email.value.indexOf('.') < 0 || form.tiny_email.value.indexOf(',') > 0) { DHTMLALERT(aux[0]); form.tiny_email.focus();return false;}
return true;
}
function validar_olvidemiclave(form) {
var aux="Dirección de correo incorrecta o email no válido.|Los emails no coinciden.".split("|");
if (form.olvideemail.value.indexOf('@') < 0 || form.olvideemail.value.indexOf('.') < 0 || form.email.value.indexOf(',') > 0) { DHTMLALERT(aux[0]); form.olvideemail.focus(); return false; }
return true;
}
function mostrarcargando() {
var o = getObj("ly_cargando_dinamico");
showAndCenter("ly_cargando_dinamico");
o=getObj("ly_transparente");
o.style.display="";
o.style.width=getPageSize()[0];
o.style.height=getPageSize()[1];
}
function cerrarcargando() {
var o = getObj("ly_cargando_dinamico");
if (o==null) {return;}
o.style.display="none";
o=getObj("ly_transparente");
o.style.display="none";
}
function cambiar_estilos(ID_STYLE,seccion) {
var file="/scripts/set_styles.php?id_style="+ID_STYLE;
if (seccion!=undefined) {file+="&seccion="+seccion;}
crear_script_tag(file);
}
function crear_script_tag(file,tagname) {
var head_html = document.getElementsByTagName('head');
if (head_html==null)
head_html=document;
else
head_html=head_html[0];
if (tagname==undefined) tagname="jscript_gen";
scriptTag = getObj(tagname);
if(scriptTag!=null)
{
head_html.removeChild(scriptTag);
delete(scriptTag);
scriptTag=null;
}
var script = document.createElement('script');
var vch="?";
if (file.indexOf("?")!=-1) vch="&";
script.src = file+vch+Math.random()*1000000;
script.type = "text/javascript";
script.id = tagname;
head_html.appendChild(script);
}
function validar_login(formulario,msg) {
if (formulario.usuario.value == '' || formulario.clave.value == '') {
DHTMLALERT(msg); formulario.usuario.focus(); return false;
return true;
}
}
function unc_datos(id_obj) {
obj=getObj("olvidemisdatos");
if(obj==null) {return;}
if (obj.style.display=="") {
obj.style.display="none";
} else {
obj.style.display="";
obj=getObj("olvideemail");
if (obj!=null) {obj.focus();}
}
}
function validar_recomendar(form) {
if (form.minombre.value == '') {DHTMLALERT('Ingrese su nombre'); form.minombre.focus(); return false;}
if (form.tunombre.value == '') {DHTMLALERT('Ingrese el Nombre de su amigo'); form.tunombre.focus(); return false;}
if (form.miemail.value.indexOf('@') < 0 || form.miemail.value.indexOf('.') < 0 || form.miemail.value.indexOf(',') > 0) {DHTMLALERT('Ingrese su email'); form.miemail.focus(); return false;}
if (form.tuemail.value.indexOf('@') < 0 || form.tuemail.value.indexOf('.') < 0 || form.tuemail.value.indexOf(',') > 0) {DHTMLALERT('Ingrese el email de su amigo'); form.tuemail.focus(); return false;}
return true;
}
var last_video=0;
function video(id,t) {
var url="/videos/get_video.php?id="+id+"&t="+t;
close_player(last_video);
last_video=id;
crear_script_tag(url);
force_undisplay('col_izquierda_td');
force_undisplay('col_derecha_td');
}
function set_player(flv,id) {
var o=getObj("ly_player"+id);
if (o==null) {return;}
o.innerHTML=flv;
force_display("ly_player_container"+id);
}
function close_player(id) {
var o=getObj("ly_player"+id);
if (o!=null) {o.innerHTML="";} else {return;}
force_undisplay("ly_player_container"+id);
force_display('col_izquierda_td');
force_display('col_derecha_td');
}
function writeflash(o,m,w,h,p,oid) {
var p=unescape(p);
var obj = document.getElementById(o);
if (obj==null){
alert(o+' MISSING');
return;
}
if (oid!=null && oid!=undefined) {tag_name="NAME='"+oid+"'";} else {tag_name="";}
if (oid!=null && oid!=undefined) {oid="id='"+oid+"'";} else {oid="";}
f="";
obj.innerHTML=f
}
function writeflash2(o,m,w,h,p,oid) {
p=unescape(p);
obj = document.getElementById(o);
if (obj==null){alert(o+' MISSING');return;}
if (oid!=null && oid!=undefined) {tag_name="NAME='"+oid+"'";} else {tag_name="";}
if (oid!=null && oid!=undefined) {oid="id='"+oid+"'";} else {oid="";}
f="";
obj.innerHTML=f
}var imgs=DIR+"/artworks";
//CAMBIAR COLOR TR
function mOvr(src,clrOver) {
if(clrOver=='') {clrOver = '#B9D7EA'};
defaultColor = src.bgColor;
src.bgColor = clrOver;
}
function mOut(src) {
src.bgColor = defaultColor;
}
//BOOKMARK
function SetBookMark() {
var title=url_tobookmark;
if( window.sidebar && window.sidebar.addPanel ) {
window.sidebar.addPanel(title,location.href,'');
} else {
window.external.AddFavorite(location.href,title);
}
}
//AGREGAR CLASE
function MO2(ly,clases) {
//alert(ly+"-->"+clases+"->"+ly.innerHTML);
/*
if (!ly) ly=getObj(ly);
if (ly==null) {return}
class_def = "class";
//if (BrowserDetect.browser=="Explorer")
class_def = "className";
var cn = setget_attr(ly,class_def);
var oc = setget_attr(ly,'oldclass');
if (clases==undefined)
{
if (oc!=undefined)
setget_attr(ly,class_def,oc);
return;
}
setget_attr(ly,'oldclass', cn);
setget_attr(ly,class_def,cn+" "+clases);
*/
// ly.className=cn+" "+clases;
}
//OCULTAR LAYERS
function force_hide(ly) {
veclayers=ly.split(",");
for (var i=0;i document.body.offsetHeight){
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) {
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
function recomendar_web() {
var ly_transparente=getObj("ly_transparente");
var obj=getObj("recomendar");
if (obj.style.display=="") {
obj.style.display="none";
ly_transparente.style.display="none";
} else {
obj.style.display="";
ly_transparente.style.display="";
showAndCenter('recomendar');
getObj("form_recomendar").minombre.focus();
}
}
function forzar_mostrar_layer_transparente() {
obj=getObj("ly_transparente");
obj.style.display="";
obj.style.width=getPageSize()[0];
obj.style.height=getPageSize()[1];
}
function forzar_ocultar_layer_transparente() {
obj=getObj("ly_transparente");
if (obj==null)
{
alert("layer_transparente no encontrado"); return;
}
obj.style.display="none";
}
function set_tab_new(obj)
{
var obj_id = obj.id;
var prefijo="container_";
var obj_class = obj.className;
var vec_tab_names = obj_id.split("_");
if (vec_tab_names.length<=1)
{
alert("Nombre Tag Inválido falta prefijo _#");
return;
}
vec_tab_names.pop();
var tab_name = vec_tab_names.join("_");
obj_class = obj_class.split("_off").join("");
obj_class = obj_class.split("_on").join("");
var i=1;
var tab_actual=null;
var no_flag=false;
while ( tab_actual != null || !no_flag)
{
tab_actual=getObj(tab_name+"_"+i);
container_actual=getObj(prefijo+tab_name+"_"+i);
if (tab_actual==null || container_actual==null)
break;
tab_actual.className="off";
container_actual.style.display="none";
i++;
no_flag = true;
}
tab_actual=getObj(obj_id);
container_actual=getObj(prefijo+obj_id);
tab_actual.className="active";
container_actual.style.display="";
}