
function InfoWindow(Nombre){this.Name=Nombre;this.ImgPath='http://miarroba.st/admin';this.txtAgent=navigator.userAgent.toLowerCase();this.IsIe=((this.txtAgent.indexOf("msie")!==-1)&&(this.txtAgent.indexOf("opera")===-1));if(this.IsIe){this.BrowserVer=parseInt(navigator.appVersion.split("MSIE")[1]);}
this.Window={'Obj':false,'Content':false,'Black':false,'Opened':false}
this.WriteStyle();}
InfoWindow.prototype={Open:function(Obj,BackColor,Anim,doOnLoad){if(typeof(BackColor)=='undefined'){BackColor='#000000';}
if(typeof(Anim)=='undefined'){Anim=false;}
if(typeof(doOnLoad)=='undefined'){this.doOnLoad=false;}else{this.doOnLoad=doOnLoad;}
if(this.Window.Obj==false){this.CreateWindow();}
if(!this.Window.Opened){this.Window.Opened=true;this.Window.Content.innerHTML='';this.Window.Black.style.backgroundColor=BackColor;if(typeof(Obj)=='object'){this.Window.Content.appendChild(Obj);}else{this.Window.Content.innerHTML=Obj;}
if(this.IsIe&&this.BrowserVer<7){var Objs=document.getElementsByTagName('select');for(x=0;x<Objs.length;x++){Objs[x].style.visibility='hidden';}}
document.getElementsByTagName('body')[0].insertBefore(this.Window.Black,document.getElementsByTagName('body')[0].firstChild);if(Anim==false){this.DoAnimation(70);}else{this.DoAnimation(1);}}},DoAnimation:function(x){this.DoTransparent(this.Window.Black,x);if(x==70){document.getElementsByTagName('body')[0].insertBefore(this.Window.Obj,document.getElementsByTagName('body')[0].firstChild);if(this.doOnLoad){if(typeof(this.doOnLoad)=='function'){this.doOnLoad();}else{eval(this.doOnLoad);}}}else{x+=15;if(x>70)x=70;setTimeout(this.Name+'.DoAnimation('+x+')',0);}},Close:function(){if(this.Window.Obj&&this.Window.Opened){this.Window.Obj.parentNode.removeChild(this.Window.Obj);this.Window.Black.parentNode.removeChild(this.Window.Black);if(this.IsIe&&this.BrowserVer<7){var Objs=document.getElementsByTagName('select');for(x=0;x<Objs.length;x++){Objs[x].style.visibility='visible';}}
this.Window.Opened=false;}},CreateWindow:function(){this.Window.Obj=document.createElement('table');this.Window.Black=document.createElement('div');var Tbody=document.createElement('tbody');var Tr=document.createElement('tr');this.Window.Content=document.createElement('td');Tr.appendChild(this.Window.Content);Tbody.appendChild(Tr);this.Window.Obj.appendChild(Tbody);this.Window.Obj.setAttribute('id','InfoWindowCortina');this.Window.Black.setAttribute('id','InfoWindowDivCortina');this.Window.Black.className='InfoWindowTransparent';},DoTransparent:function(Obj,x){Obj.style.opacity=(x/100);Obj.style.MozOpacity=(x/100);Obj.style.KhtmlOpacity=(x/100);Obj.style.filter='alpha(opacity='+(x)+')';},WriteStyle:function(){var CSS='<style type="text/css">';CSS+=' #InfoWindowCortina {\n';CSS+='  z-index:20001;\n';CSS+='  position:fixed;\n';CSS+='  top:0px;\n';CSS+='  left:0px;\n';CSS+='  width:100%;\n';CSS+='  height:100%;\n';CSS+='  border:0px;\n';CSS+='  margin:0px;\n';CSS+='  padding:0px;\n';CSS+=' }\n';CSS+=' #InfoWindowDivCortina {\n';CSS+='  z-index:20000;\n';CSS+='  position:fixed;\n';CSS+='  top:0px;\n';CSS+='  left:0px;\n';CSS+='  width:100%;\n';CSS+='  height:100%;\n';CSS+='  border:0px;\n';CSS+='  margin:0px;\n';CSS+='  padding:0px;\n';CSS+='  background-color:#000000;filter:alpha(opacity=0);opacity: 0;-moz-opacity: 0; -khtml-opacity: 0;\n';CSS+=' }\n';CSS+='\n';CSS+=' #InfoWindowCortina td {vertical-align:middle;text-align:center;}\n';CSS+='</style>\n';CSS+='<!--[if IE]>\n';CSS+='<style type=\"text/css\">\n';CSS+=' #InfoWindowCortina {\n';CSS+='  position:absolute;\n';CSS+='  top:expression(Math.max(document.body.scrollTop,document.documentElement.scrollTop));\n';CSS+='  left:expression(Math.max(document.body.scrollLeft,document.documentElement.scrollLeft));\n';CSS+='  width:expression( parseInt(document.documentElement.clientWidth)>0 ? document.documentElement.clientWidth : document.body.clientWidth );\n';CSS+='  height:expression( parseInt(document.documentElement.clientHeight)>0 ? document.documentElement.clientHeight : document.body.clientHeight );\n';CSS+=' }\n';CSS+=' #InfoWindowDivCortina {\n';CSS+='  position:absolute;\n';CSS+='  top:expression(Math.max(document.body.scrollTop,document.documentElement.scrollTop));\n';CSS+='  left:expression(Math.max(document.body.scrollLeft,document.documentElement.scrollLeft));\n';CSS+='  width:expression( parseInt(document.documentElement.clientWidth)>0 ? document.documentElement.clientWidth : document.body.clientWidth );\n';CSS+='  height:expression( parseInt(document.documentElement.clientHeight)>0 ? document.documentElement.clientHeight : document.body.clientHeight );\n';CSS+=' }\n';CSS+='</style>\n';CSS+='<![endif]-->\n';document.writeln(CSS);}}