function popup(path,width,height){

	window.status = "Cargando popup...";
	windowx = window.open(path,'htmlname','top='+((screen.height - height) / 2)+',left='+((screen.width - width) / 2)+',width ='+ width +',height ='+ height +',resizable=0,location=no,directories=no,menubar=no,personalbar=no,status=false,toolbar=no');
	windowx.resizeTo(width, height + 60);
	//windowx.moveTo(((screen.width - width) / 2), ((screen.height - height - 60) / 2));
	windowx.focus();
	window.status = "Listo";
	
	
}

function popupImage(path,width,height,title){
	
	window.status = "Cargando popup...";
	windowx = window.open('','htmlname','top='+((screen.height - height) / 2)+',left='+((screen.width - width) / 2)+',width ='+ width +',height ='+ height +',resizable=0,location=no,directories=no,menubar=no,personalbar=no,status=false,toolbar=no');
	//windowx.resizeTo(width, height + 60);
	//windowx.moveTo(((screen.width - width) / 2), ((screen.height - height - 60) / 2));
	windowx.document.clear();
	windowx.focus();
	windowx.document.writeln('<html><head><style>img.foto{background:url(images/load2.gif) no-repeat center center;}</style><title>' + title + '<\/title> <\/head> <body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <center>');
	windowx.document.writeln('<img src="'+path+'" class="foto">');
	windowx.document.writeln('</center></body></html>');
	
	windowx.document.close();
	windowx.focus();
	
	window.status = "Listo";
}




function selectFeatures(category,brand,totalAttributes,tipo){
		
	var features = "";
	
	
	if(totalAttributes > 0){
		for(i=1;i<=totalAttributes;i++){
			
			if(document.getElementById("f"+i).value != ""){
				features+=document.getElementById("f"+i).value+",";
				
			}
		}
	}
	if(features!="") features = "_f_"+features;
	category = "cat_"+category;
	if(brand!="") brand = "_mar_"+brand;
/*alert("#navbar="+category+brand+features)*/
	location.href = "#navbar="+category+brand+features+tipo;
}


