
/*<![CDATA[*/

function abrepopup(){
		ancho=500;
		alto=420;
		posx=((screen.availWidth-ancho)/2);
		posy=((screen.availHeight-alto)/3);
		pop_contacta=window.open('../service/getPage.php?action=get_page&page=36','popup','toolbar=no,location=no,directories=no,status=0,scrollbars=no,resizable=no,width=' + ancho + ',height=' + alto + ',screenx='+posx+',screeny='+posy+',left='+posx+',top='+posy);
	}


function changeStat(parent){
	suboptions=$(parent+'_subapp');
	if (suboptions!=null){
		display=suboptions.style.display;
		if (display=='block') suboptions.style.display='none';
		else suboptions.style.display='block';
	}
}

function formValidation(){
	form=$('contact');
	c1=form.name.value.length;
	c2=form.last_name.value.length;
	c3=form.company.value.length;
	c4=form.address.value.length;
	c5=form.country.value.length;
	c6=form.city.value.length;
	c7=form.province.value.length;
	c8=form.email.value.length;
	c9=form.phone.value.length;
	if (c1*c2*c3*c4*c5*c6*c7*c8*c9 == 0){
		alert("debe rellenar los campos marcados con *");
		return false;
	}
	return true;
}

function alertaBorrado(url){
	if (!confirm("¿Seguro que desea eliminar el registro actual?")){
		return;	
	}else{
		location.href=url;
	}
}


function detectBrowser(){
	var browser=navigator.appName;
	var b_version=navigator.appVersion;
	var version=parseFloat(b_version);
	if ((browser=="Microsoft Internet Explorer")&&(version<7))	{
		$('primary-nav').style.overflow='hidden';
		$('menu1').style.overflow='hidden';
		$('menu2').style.overflow='hidden';
		$('menu3').style.overflow='hidden';
		$('menu4').style.overflow='hidden';
		$('menu5').style.overflow='hidden';
		$('menu6').style.overflow='hidden';
	}
}
function makeResize(){
	window.location.reload();
}
function afterLoad(){
	detectBrowser();
	//makeResize();
}

if (document.getElementsByTagName) window.onload = preInicia;
	function preInicia(){
	try {
	  afterLoad();
	}catch(E){
		 
	}
}

/*]]>*/
