var paginaCargada = false

function initPage() {
	paginaCargada=true;
	//alert(paginaCargada)	
}

function cambiaimg(dir,f)
{
	txtf = "<img src='../../../images/bordados/"+dir+"/"+f+"'>";
											document.all['divfoto'].innerHTML=txtf;
}

function abreimg(dir,f)
{
	ventana = window.open("../../../images/bordados/"+dir+"/"+f,"ve","scrollbars=0,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=320,height=320,screenX=coorx,screenY=coory");
}

function muestra_tarifas(t)
{
  
	if (paginaCargada) {
		var x= Math.floor(document.body.clientWidth / 2) -380; 
		if(x<0){x=0;} 
		var y= Math.floor(document.body.clientHeight / 2) -200; 
		if(y<0){y=0;} 
	
	
		document.getElementById("tarifa").style.left=x;
		document.getElementById("tarifa").style.top=y+115;
		document.getElementById("tarifa").style.visibility="visible";
	}

}


function tarifa(t)
{
	var x= Math.floor(document.body.clientWidth / 2) -380; 
	if(x<0){x=0;} 
	var y= Math.floor(document.body.clientHeight / 2) -200; 
	if(y<0){y=0;} 


	document.getElementById("tarifa"+t).style.left=x;

	document.getElementById("tarifa"+t).style.top=y-60;




	document.getElementById("tarifa"+t).style.visibility="visible";
}




function muestra_precio(elmId)
{
    
	  obj = document.getElementById(elmId);
		
		if ((obj.style.display=="none") || (obj.style.display=="")) {		    
		  obj.style.display="block";
		} else {
		  obj.style.display="none";
		}
		
}

function mouseOut(aId) {
  obj = document.getElementById(aId); 
  obj.style.display="none";
  }
  
function mouseOver(aId) {
  obj = document.getElementById(aId); 
  obj.style.display="block";
  }

function muestra_detalle(div)
{
	if (paginaCargada) {
		var x= Math.floor(document.body.clientWidth / 2) -375; 
		if(x<0){x=0;} 
		var y= Math.floor(document.body.clientHeight / 2) -210; 
		if(y<0){y=0;} 
	
		document.getElementById(div).style.left=x;
		document.getElementById(div).style.top=y-55;
		document.getElementById(div).style.visibility="visible";
	}
}

function oculta_tarifa()
{
	document.getElementById("tarifa").style.visibility="hidden";
}


function oculta_tarifax(t)
{
	document.getElementById("tarifa"+t).style.visibility="hidden";
}
function oculta_detalle(div)
{
	document.getElementById(div).style.visibility="hidden";
}


function tarifas(n)
{
  if (n==1) {

	url = "medidas_tarifas_dormitorio.htm";
	w = 780;
	h = 400;
  }
  else if (n==2) {
	url = "medidas_tarifas_mesa.htm";
	w = 780;
	h = 400;
  }
  else
  {
	url = "medidas_tarifas_bano.htm";
	w = 780;
	h = 400;
  }

	ventana = window.open(url,"ve","scrollbars=0,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width="+w+",height="+h+",screenX=coorx,screenY=coory");

		ventana.focus();
}



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_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_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_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_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();
}

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;
}
MM_reloadPage(true);

