function MM_reloadPage(init){ 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(false);
function popo(theURL,winName,features){window.open(theURL,winName,features);}
function popUp(url) {sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');self.name = "mainWin";}
function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if (restore) selObj.selectedIndex=0;}
function pictimo_onclick(url){popo(url,'zoom','scrollbars=no,width=600,height=560,left=30,top=20');}
function menuchange(thatform){top.location.href = thatform.linkmenu.options[thatform.linkmenu.selectedIndex].value;return true;}
function sobre(src,Color){if (!src.contains(event.fromElement)){src.style.cursor = 'hand';src.bgColor = Color;}}
function fuera(src,Color2){if (!src.contains(event.toElement)) {src.style.cursor = 'default';src.bgColor = Color2;}}
function pulsar(src){if(event.srcElement.tagName=='TD'){src.children.tags('A')[0].click();}}
function showpage(page){	newWindow = window.open(page, "Magnify", "width=403, height=303, status=no, scrollbars=no ");}
function showflap(page){newWindow = window.open(page, "Magnify", "width=310, height=415, status=no, scrollbars=no ");}


function comprar_onclick() 
{
	var s;
	var cuantas;
		
	if (window.document.buy.tope.value!="999")	
	{
	    s = window.document.buy.detalle.value ;
	    cuantas = s.split(" ");	
    	
	    if(cuantas.length > window.document.buy.tope.value )
	    {
		    alert("El número de palabras ingresado " + cuantas.length + " supera el máximo permitido " + window.document.buy.tope.value);
		    return false;
	    }
	}
	
	if (window.document.buy.topeFlap.value!="999")	
	{
	    s = window.document.buy.detalleFlap.value ;
	    cuantas = s.split(" ");	
    	
	    if(cuantas.length > window.document.buy.topeFlap.value )
		{
			alert("El número de palabras ingresado en el Flap " + cuantas.length + " supera el máximo permitido " + window.document.buy.topeFlap.value);
			return false;
		}
	}

    $("#buy").submit();
	return true;
}

function ShowIr(){if($("#info_ir").val() == "novisible"){$("#info_ir").val("visible");$("#inf_ir").show();}else{$("#info_ir").val("novisible");$("#inf_ir").hide();}}

function ShowComp()
{
    if($("#info_env").val()=="novisible"){$("#info_env").val("visible");$("#inf_general").show();}else{$("#info_env").val("novisible");$("#inf_general").hide();}  		
		
	/*
	if(window.document.buy.info_env.value == "novisible" )
	{
		window.document.buy.info_env.value = "visible";
		inf_general.style.display="";	
	}
	else if(window.document.buy.info_env.value == "visible")
	{
		inf_general.style.display="none";	 
		window.document.buy.info_env.value = "novisible";		
	}
	*/
}

