function NSclick(e) {
	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) {
		if (e.which == 3) {
			return false;
		}
	}
	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) {
    		if (e.button == 2 || e.button == 3) {
      			e.preventDefault();
			return false;
  		}
	}
}

if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) {
	document.onmousedown=NSclick;
	document.captureEvents(Event.MOUSEDOWN);
}
if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) {
	document.onmouseup=NSclick;
}
if (navigator.appName=="Microsoft Internet Explorer") {
	document.oncontextmenu = new Function("return false;")
}

var isIE=document.all?true:false;
var layers = isIE?document.all.tags("DIV"):null;

function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

function Mensaje (Error, Text, Botton, Enlace) {
var code="<div id=index style=\"position:absolute; left:0px; top:15px; width:500px; height:124px; z-index:1\">\n<table border=0 cellpadding=0 cellspacing=0>\n<tr>\n<td width=16 height=15 style=\"background-image: url(http://www.ofertasdia.com/images\/index-top-left.gif);\"><\/td>\n<td height=15 width=450 style=\"background-image: url(http://www.ofertasdia.com/images\/index-top.gif);\"><\/td>\n<td width=16 style=\"background-image: url(http://www.ofertasdia.com/images\/index-top-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td height=63 style=\"background-image: url(http://www.ofertasdia.com/images\/index-left.gif);\"><\/td>\n<td height=34 style=background-color:#FFFFFF;><img src=http://www.ofertasdia.com/images\/banner-msg.gif width=300 height=47><\/td>\n<td width=16 style=\"background-image: url(http://www.ofertasdia.com/images\/index-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td style=\"background-image: url(http://www.ofertasdia.com/images\/index-left.gif);\"><\/td>\n<td height=17 style=background-color:#C4DCF1;><table width=100% border=0 cellpadding=0 cellspacing=0>\n<tr>\n<td height=17 width=10 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-top-left.gif);\"><\/td>\n<td height=13 colspan=2 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-top.gif);\"><\/td>\n<td height=17 width=10 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-top-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-left.gif);\"><\/td>\n<td height=13 colspan=2 style=background-color:#C9D9EB;><img src=http://www.ofertasdia.com/images\/error-"+Error+".gif width=152 height=17><\/td>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-left.gif);\"><\/td>\n<td width=14 height=13 style=background-color:#C9D9EB;>&nbsp;<\/td>\n<td width=416 height=13 style=background-color:#C9D9EB;><font color=#2C445B size=2 face=\"Arial, Helvetica, sans-serif\">"+Text+"<\/font><\/td>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-left.gif);\"><\/td>\n<td height=13 style=background-color:#C9D9EB;>&nbsp;<\/td>\n<td height=13 style=background-color:#C9D9EB;>&nbsp;<\/td>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-left.gif);\"><\/td>\n<td height=13 style=background-color:#C9D9EB;>&nbsp;<\/td>\n<td height=13 style=background-color:#C9D9EB;><div align=center><a href="+Enlace+" onMouseOut=MM_swapImgRestore() onMouseOver=\"MM_swapImage('Boton','','http://www.ofertasdia.com/images\/"+Botton+"-on.jpg',1)\"><img src=http://www.ofertasdia.com/images\/"+Botton+"-off.jpg name=Boton width=72 height=20 border=0><\/a><\/div><\/td>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-bottom-left.gif);\"><\/td>\n<td height=13 colspan=2 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-bottom.gif);\"><\/td>\n<td height=17 style=\"background-image: url(http://www.ofertasdia.com/images\/inicio-bottom-right.gif);\"><\/td>\n<\/tr>\n<\/table><\/td>\n<td style=\"background-image: url(http://www.ofertasdia.com/images\/index-right.gif);\"><\/td>\n<\/tr>\n<tr>\n<td width=16 height=15 style=\"background-image: url(http://www.ofertasdia.com/images\/index-bottom-left.gif);\"><\/td>\n<td height=15 style=\"background-image: url(http://www.ofertasdia.com/images\/index-bottom.gif);\"><\/td>\n<td width=16 height=15 style=\"background-image: url(http://www.ofertasdia.com/images\/index-bottom-right.gif);\"><\/td>\n<\/tr>\n<\/table>\n<br>\n<\/div>";

document.body.style.background='#C9D9EB';
document.body.style.overflow='hidden';
MM_preloadImages('http://www.ofertasdia.com/images/btn-'+Botton+'-on.jpg');
document.write(code);
P7_alignWD2('index',5,0,0);
}

function refresh(){
	var sURL = unescape(window.location.pathname);
    window.location.href = sURL;}
function Mascara()
 {hidden();parent.document.getElementById('Mask').style.visibility='visible';parent.document.getElementById('index').style.visibility='hidden';}
function hidden()
 {parent.document.body.style.background='#C9D9EB';window.status='Descargando Elementos ...';parent.document.body.style.overflow='hidden';}
function unhidden()
 {parent.document.body.style.background="url('http://www.ofertasdia.com/images/bg.gif')";parent.document.body.style.overflow='';}
function Update(altura)
 //{parent.document.getElementById('ContieneInicio').style.height=altura; if(parent.inicio == false){window.onload = parent.document.getElementById('Mask').style.visibility='hidden';parent.document.getElementById('index').style.visibility='visible';window.status='Copyright (c) 2003 Telenium Producciones.';parent.document.tabs.play();}}
 {parent.document.getElementById('ContieneInicio').style.height=altura; if(parent.inicio == false){window.status='Copyright (c) 2003 Telenium Producciones.';}}
function MasContenido (altura)
 {actual = parseInt(parent.document.getElementById('ContieneInicio').style.height);valor = (parseInt(actual) + parseInt(altura));parent.document.getElementById('ContieneInicio').style.height = valor;}
function MenosContenido (altura)
 {actual = parseInt(parent.document.getElementById('ContieneInicio').style.height);valor = (parseInt(actual) - parseInt(altura));parent.document.getElementById('ContieneInicio').style.height = valor;}

function Mask(categoria, color, altura) {
	document.body.style.background=color;
	if (parent.inicio == false) {
		parent.document.wintop.src = 'http://www.ofertasdia.com/images/'+categoria+'-top.gif';
		parent.document.wintopleft.src = 'http://www.ofertasdia.com/images/'+categoria+'-top-left.gif';
		parent.document.wintopright.src = 'http://www.ofertasdia.com/images/'+categoria+'-top-right.gif';
		parent.document.winleft.src = 'http://www.ofertasdia.com/images/'+categoria+'-left.gif';
		parent.document.winright.src = 'http://www.ofertasdia.com/images/'+categoria+'-right.gif';
		parent.document.winbottomleft.src = 'http://www.ofertasdia.com/images/'+categoria+'-bottom-left.gif';
		parent.document.winbottomright.src = 'http://www.ofertasdia.com/images/'+categoria+'-bottom-right.gif';
		parent.document.winbottom.src = 'http://www.ofertasdia.com/images/'+categoria+'-bottom.gif';
		unhidden();	
	}	
	Update(altura);
}

function ExpandCollapseBuscar(bExpand){
 clickedBuscar = bExpand
 if(clickedBuscar){
 clickedBuscar=false;
 clickedMenu=true;
 document.getElementById('avanzado').style.display = 'block';
 document.getElementById('btnbuscar').src='http://www.ofertasdia.com/images/subtitle-busqueda-on.gif';
 document.getElementById('familia').style.visibility='visible';
 document.getElementById('descripcion').style.visibility='visible';
 
 document.getElementById('mnuproductos').style.display = 'none';
 document.getElementById('btnmenu').src='http://www.ofertasdia.com/images/subtitle-menu-off.gif';
 }else{
 clickedBuscar=true;
 document.getElementById('avanzado').style.display = 'none';
 document.getElementById('btnbuscar').src='http://www.ofertasdia.com/images/subtitle-busqueda-off.gif';
 document.getElementById('familia').style.visibility='hidden';
 document.getElementById('descripcion').style.visibility='hidden';
 }
}

function ExpandCollapseMenu(bExpand){
 clickedMenu = bExpand
 if(clickedMenu){
 clickedMenu=false;
 clickedBuscar=true;
 document.getElementById('mnuproductos').style.display = 'block';
 document.getElementById('btnmenu').src='http://www.ofertasdia.com/images/subtitle-menu-on.gif'; 
 document.getElementById('avanzado').style.display = 'none';
 document.getElementById('btnbuscar').src='http://www.ofertasdia.com/images/subtitle-busqueda-off.gif';
 document.getElementById('familia').style.visibility='hidden';
 document.getElementById('descripcion').style.visibility='hidden';

 }else{
 clickedMenu=true;
 document.getElementById('mnuproductos').style.display = 'none';
 document.getElementById('btnmenu').src='http://www.ofertasdia.com/images/subtitle-menu-off.gif';
 }
}

function VerTextos(name){
 if(name=='politica'){
  document.getElementById('condiciones').style.display = 'none';
  document.getElementById('copyright').style.display = 'none';
  document.getElementById('politica').style.display = 'block';
  document.getElementById('ocultar').style.display = 'block';}
 if(name=='condiciones'){
  document.getElementById('politica').style.display = 'none';
  document.getElementById('copyright').style.display = 'none';
  document.getElementById('condiciones').style.display = 'block';
  document.getElementById('ocultar').style.display = 'block';}
 if(name=='copyright'){
  document.getElementById('politica').style.display = 'none';
  document.getElementById('condiciones').style.display = 'none';
  document.getElementById('copyright').style.display = 'block';
  document.getElementById('ocultar').style.display = 'block';}
 if(name=='ocultar'){
  document.getElementById('politica').style.display = 'none';
  document.getElementById('condiciones').style.display = 'none';
  document.getElementById('copyright').style.display = 'none';
  document.getElementById('ocultar').style.display = 'none';}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function P7_getWD(tDim){ //v2.4 by PVII
 var sh=0,sw=0,rt=0;if(window.innerWidth){sh=window.innerHeight;sw=window.innerWidth;
 }else if(document.body){sh=document.body.clientHeight;sw=document.body.clientWidth;
 if(document.body.offsetHeight==sh&&document.documentElement&&document.documentElement.clientHeight){
  sh=document.documentElement.clientHeight;}
 if(document.body.offsetWidth==sw&&document.documentElement&&document.documentElement.clientWidth) {
 sw=document.documentElement.clientWidth;}}rt=(tDim=="width")?sw:sh;return rt;
}

function P7_getLDims(el) { //v2.4 by PVII
 var x,ll=0,tl=0,hh=0,ww=0,wx,g,gg;
 if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;ll=parseInt(gg.left);tt=parseInt(gg.top);
 if(isNaN(ll)){if(g.currentStyle){ll=parseInt(g.currentStyle.left);}else if(document.defaultView){
 ll=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("left"));}if(isNaN(ll)){ll=0;}}
 if(isNaN(tt)){if(g.currentStyle){tt=parseInt(g.currentStyle.top);}else if(document.defaultView){
 tt=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}if(isNaN(ll)){tt=0;}}
 if(document.all||document.getElementById){ww=parseInt(g.offsetWidth);hh=parseInt(g.offsetHeight);
 if(!ww){ww=parseInt(g.style.pixelWidth);if(!ww){ww=parseInt(g.style.width);}}if(!hh){
 hh=parseInt(g.style.pixelHeight);}if(g.hasChildNodes){for(x=0;x<g.childNodes.length;x++){
 wx=parseInt(g.childNodes[x].offsetWidth);if(wx>ww){ww=wx;}}}}else if(document.layers){
 ww=parseInt(g.clip.width);hh=parseInt(g.clip.height);}}var aR=[ll,tt,hh,ww];return aR;
}

function P7_alignRR() { //v2.4 by PVII
 var i;if(!document.p7alignRR) {return;}if(document.layers){
 if(innerWidth!=document.p7RRiw || innerHeight!=document.p7RRih){location.reload();}
 }else{document.p7RR=1;for(i=0;i<p7aRR.length;i++){eval(p7aRR[i]);}document.p7RR=0;}
}

function P7_alignWD2() { //v2.4 by PVII
 var g,gg,lp=0,tp=0,aL,lh,lw,ww,wh,pa='px',args=P7_alignWD2.arguments;if(document.layers||window.opera){pa='';}
 for(var i=0;i<args.length;i+=4){if((g=MM_findObj(args[i]))!=null){gg=(document.layers)?g:g.style;
 mm=parseInt(args[i+1]);mr=parseInt(args[i+2]);ml=parseInt(args[i+3]);ww=parseInt(P7_getWD('width'));
 wh=parseInt(P7_getWD('height'));aL=P7_getLDims(args[i]);lh=aL[2];lw=aL[3];tp=aL[1];lp=aL[0];
 if(mm==1){lp=mr;}if(mm==2){lp=parseInt((ww-lw-mr)/2);if(lp<0){lp=0;}}if(mm==3){lp=ww-lw-mr;if(lp<ml){lp=ml;}}
 if(mm==4){tp=parseInt((wh-lh-mr)/2);if(tp<0){tp=0;}}if(mm==5){tp=parseInt((wh-lh)/2);lp=parseInt((ww-lw)/2);
 if((lp-mr)<=0){lp=mr;}if((tp-ml)<=0){tp=ml;}}if(mm==6){tp=wh-lh-mr;}gg.top=tp+pa;gg.left=lp+pa;
 if(!document.p7alignRR){p7aRR=new Array();document.p7alignRR=true;document.p7RR=0;
 if(document.layers){document.p7RRiw=innerWidth;document.p7RRih=innerHeight;}onresize=P7_alignRR;}
 if(document.p7RR==0){p7aRR[p7aRR.length]="P7_alignWD2('"+args[i]+"',"+mm+","+mr+","+ml+")";}}}
}


ChromelessWindow = function ()
{
	this.URL = null;
	this.title = null;
	this.titleFont = null;
	this.titleSize = 0;
	this.titleColor = null;
	this.titlebarImage = null;
	this.titlebarHeight = 0;
	this.scrollbars = null;
	this.w = 0;
	this.h = 0;
	this.centered = null;
	this.xPos = 0;
	this.yPos = 0;
	this.borderColor = null;
	this.borderSize = 0;
	this.closeBottom = null;
	this.minimizeBottom = null;
	
	this.chromelessCompatible = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4 ? true:false;
	this.titlebarContent = null;
	this.chromelessWW = null;
	
	
}

ChromelessWindow.prototype.openChromeless = function()
{
	this.runCode();
	
}

ChromelessWindow.prototype.closeChromeless = function()
{
	this.chromelessWW.close();
}

ChromelessWindow.prototype.setURL = function(newURL)
{
	this.URL = newURL;
	if(this.chromelessWW)
	{
		this.chromelessWW.execScript("b.all.canvas.URL='"+newURL+"'");
		this.chromelessWW.execScript("showChromeless()");
	}
}

ChromelessWindow.prototype.moveTo = function()
{
	this.xPos = arguments[0];
	this.yPos = arguments[1];
	if(this.chromelessWW)
	{
		this.chromelessWW.execScript('var cx='+this.xPos+';');
		this.chromelessWW.execScript('var cy='+this.yPos+';');
		this.chromelessWW.execScript("showChromeless()");
	}
}

ChromelessWindow.prototype.resizeTo = function()
{
	this.w = arguments[0];
	this.h = arguments[1];
	this.cH = (this.h-this.titlebarHeight)-this.borderSize;
	this.cW = this.w -(this.borderSize*2);
	if(this.chromelessWW)
	{
		this.chromelessWW.execScript('var cw='+this.w+';');
		this.chromelessWW.execScript('var ch='+this.h+';');
		this.chromelessWW.execScript("b.all.canvas.style.width='"+this.cW+"'");
		this.chromelessWW.execScript("b.all.canvas.style.height='"+this.cH+"'");
		this.chromelessWW.execScript("b.all.closeBottom.style.right='"+this.borderSize+"'");
		this.chromelessWW.execScript("b.all.minimizeBottom.style.right='"+(this.borderSize+20)+"'");
		this.chromelessWW.execScript("showChromeless()");
	}
}


ChromelessWindow.prototype.runCode = function()
{
	if(this.centered=="yes")
	{
		var tempX = this.w;
		var tempY = this.h;
		this.xPos = (screen.availWidth/2)-(tempX/2);
		this.yPos = (screen.availHeight/2)-(tempY/2);
	}
	if (this.chromelessCompatible)
	{
		this.chromelessWW = window.open("about:blank","","top=5000,left=5000,width=100,height=100,scrollbars="+this.scrollbars);
	}
	else
	{
		this.chromelessWW = window.open(this.URL, "chromelessWindow", "top="+this.yPos+",left="+this.xPos+",width="+this.w+",height="+this.h+",toolbar=0,scrollbars="+this.scrollbars+",resizable=0");
	}
	this.cH = (this.h-this.titlebarHeight)-this.borderSize;
	this.cW = this.w -(this.borderSize*2);
	this.c = "<object type='text/html' border='0' style='position:absolute;z-index:2;top:"+this.titlebarHeight+"px;left:"+this.borderSize+"px;width:"+this.cW+"px;height:"+this.cH+"px;' data='"+this.URL+"' id='canvas'></object>";

	if((this.titlebarImage==undefined)||(this.titlebarImage==null)||(this.titlebarImage==""))
	{
		this.titlebarContent="";
		this.tb = false;
	}
	else
	{
		this.titlebarContent="<img id='menu' unselectable='on' src='"+this.titlebarImage+"' style='position:absolute; top:0px; left:0px;z-index:2'>";
		this.tb = true;
	}
	this.menu = "\
		<div id='Title' unselectable='on' style='font-family:Arial;font-size:11px;font-weight:bold;position:absolute;top:5px;left:"+this.borderSize+"px;width:70%;height:15px;cursor:default;font-family:"+this.titleFont+";font-size:"+this.titleSize+";color:"+this.titleColor+";z-index:3'>"+this.title+"</div>\
		<img id='closeBottom' unselectable='on' src='"+this.closeBottom+"' width='16' height='10' style='position:absolute; top:5px; right:"+(this.borderSize)+"px;z-index:3'>\
		"+this.titlebarContent+"\
		<img id='minimizeBottom' unselectable='on' src='"+this.minimizeBottom+"' width='16' height='10' style='position:absolute; top:5px; right:"+(this.borderSize+20)+"px;z-index:3'>\
		<div id='fondo' unselectable='on' style='position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:"+this.borderColor+";z-index:1'></div>";

	if (this.chromelessCompatible)
	{
		this.chromelessWW.moveTo(300,-5000);
		this.chromelessWW.resizeTo(800,600);
		this.chromelessWW.document.writeln('<html>');
		this.chromelessWW.document.writeln('<head>');
		this.chromelessWW.document.writeln('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
		this.chromelessWW.document.writeln('<style>');
		this.chromelessWW.document.writeln('BODY{border:0px !important}');
		this.chromelessWW.document.writeln('</style>');
		this.chromelessWW.document.writeln('</head>');
		this.chromelessWW.document.writeln('<body>');
		this.chromelessWW.document.writeln('<script>');
		this.chromelessWW.document.writeln('var c=window.createPopup();');
		this.chromelessWW.document.writeln('var b=c.document.body;');
		this.chromelessWW.document.writeln("var ox=oy=ix=iy=0;");
		this.chromelessWW.document.writeln("var allContent =\""+this.menu+this.c+"\";");
		this.chromelessWW.document.writeln('b.innerHTML=allContent;');
		this.chromelessWW.document.writeln('var cx='+this.xPos+';');
		this.chromelessWW.document.writeln('var cy='+this.yPos+';');
		this.chromelessWW.document.writeln('var cw='+this.w+';');
		this.chromelessWW.document.writeln('var ch='+this.h+';');
		this.chromelessWW.document.writeln('function showChromeless(){');
		this.chromelessWW.document.writeln('c.show(cx,cy,cw,ch);focus()');
		this.chromelessWW.document.writeln('}');
		this.chromelessWW.document.writeln('var mm=false;');
		this.chromelessWW.document.writeln('var cmove=b.all("fondo");');
		this.chromelessWW.document.writeln('var allb=b.all("allborders");');
		this.chromelessWW.document.writeln('var cmove2=(b.all("menu"))?b.all("menu"):"";');
		this.chromelessWW.document.writeln('var ctitle=b.all("Title");');
		this.chromelessWW.document.writeln('ctitle.style.visibility=('+this.tb+')?"hidden":"visible";');
		this.chromelessWW.document.writeln('var cclose=b.all("closeBottom");');
		this.chromelessWW.document.writeln('var cminimize=b.all("minimizeBottom");');
		this.chromelessWW.document.writeln('cclose.onclick=function(){opener=self;self.close()};');
		this.chromelessWW.document.writeln('cminimize.onclick=function(){if(top.opener&&!top.opener.closed){top.opener.window.focus()};top.window.blur()};');
		this.chromelessWW.document.writeln('var ox=oy=ix=iy=0;');
		this.chromelessWW.document.writeln('var m=0;');
		this.chromelessWW.document.writeln('ctitle.onmousedown=function(){m=1};');
		this.chromelessWW.document.writeln('ctitle.onmouseup=function(){m=0};');
		this.chromelessWW.document.writeln('cmove.onmousedown=function(){m=1};');
		this.chromelessWW.document.writeln('cmove.onmouseup=function(){m=0};');
		this.chromelessWW.document.writeln('cmove2.onmousedown=function(){m=1};');
		this.chromelessWW.document.writeln('cmove2.onmouseup=function(){m=0};');
		this.chromelessWW.document.writeln('document.body.onclick=function(){ if (m) { focus();cx=ix+event.screenX-ox;cy=iy+event.screenY-oy;c.show(cx,cy,cw,ch) }else { ix=cx; iy=cy; ox=event.screenX; oy=event.screenY } };');
		this.chromelessWW.document.writeln('setInterval("document.body.click()",20);');
		this.chromelessWW.document.writeln('onfocus=function(){showChromeless();}');
		this.chromelessWW.document.writeln('</script>');
		this.chromelessWW.document.writeln('</body>');
		this.chromelessWW.document.writeln('</html>');
		this.chromelessWW.document.location.reload();
		this.chromelessWW.document.title = this.title;
		this.chromelessWW.execScript("focus();");
	}
	else
	{
		this.chromelessWW.document.title = this.title;
	}
}

