	function fncChangeContentSite(vIDMENU, vIDOPCION, vIDSUBOPCION, vIDCONTENIDO){
		document.frmPortal.IDMENU.value = vIDMENU;
		document.frmPortal.IDOPCION.value = vIDOPCION;
		document.frmPortal.IDSUBOPCION.value = vIDSUBOPCION;
		document.frmPortal.IDCONTENIDO.value = vIDCONTENIDO;
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.IDPIE.value = '';
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.submit();
	}
	function fncChangeContentSitePublicity(vIDCONTENIDO){
		document.frmPortal.IDMENU.value = '';
		document.frmPortal.IDOPCION.value = '';
		document.frmPortal.IDSUBOPCION.value = '';
		document.frmPortal.IDCONTENIDO.value = vIDCONTENIDO;
		document.frmPortal.IDPRINCIPAL.value = '';
		document.frmPortal.IDPIE.value = '';
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.submit();
	}
	function fncChangeContent(vIDMENU){
		document.frmPortal.IDMENU.value = vIDMENU;
		document.frmPortal.IDOPCION.value = '';
		document.frmPortal.IDSUBOPCION.value = '';
		document.frmPortal.IDPIE.value = '';
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.submit();
	}
	function fncChangeContentOpc(vIDMENU, vIDOPCION){
		document.frmPortal.IDMENU.value = vIDMENU;
		document.frmPortal.IDOPCION.value = vIDOPCION;
		document.frmPortal.IDSUBOPCION.value = '';
		document.frmPortal.IDPIE.value = '';
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.submit();
	}
	function fncChangeContentSubOpc(vIDMENU, vIDOPCION, vIDSUBOPCION){
		document.frmPortal.IDMENU.value = vIDMENU;
		document.frmPortal.IDOPCION.value = vIDOPCION;
		document.frmPortal.IDSUBOPCION.value = vIDSUBOPCION;
		document.frmPortal.IDPIE.value = '';
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.submit();
	}
	function fncChangeContentPolicy(vIDPIE){
		document.frmPortal.IDMENU.value = '';
		document.frmPortal.IDOPCION.value = '';
		document.frmPortal.IDSUBOPCION.value = '';
		document.frmPortal.IDPIE.value = vIDPIE;
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.submit();
	}
	function fncChangeLanguage(vIDIDIOMA){
		document.frmPortal.IDIDIOMA.value = vIDIDIOMA;
		document.frmPortal.IDMENU.value = '';
		document.frmPortal.IDOPCION.value = '';
		document.frmPortal.IDSUBOPCION.value = '';
		document.frmPortal.IDPIE.value = '';
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.submit();
	}
	function fncSearch(){
		if (document.frmPortal.DSSEARCH.value!='...'){
			document.frmPortal.IDMENU.value = '';
			document.frmPortal.IDOPCION.value = '';
			document.frmPortal.IDSUBOPCION.value = '';
			document.frmPortal.IDPIE.value = '';
			document.frmPortal.IDPRINCIPAL.value = 1;
			document.frmPortal.submit();
		}else{
			document.frmPortal.DSSEARCH.value = '';
		}
	}
	function setMenu(vIDMENU, vIDOPCION, vIDSUBOPCION){
		if(vIDMENU!=''){
			document.frmPortal.IDMENU.value = vIDMENU;
		}else{
			document.frmPortal.IDMENU.value = '';
		}
		if(vIDOPCION!=''){
			document.frmPortal.IDOPCION.value = vIDOPCION;
		}else{
			document.frmPortal.IDOPCION.value = '';
		}
		if(vIDSUBOPCION!=''){
			document.frmPortal.IDSUBOPCION.value = vIDSUBOPCION;
		}else{
			document.frmPortal.IDSUBOPCION.value = '';
		}
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.IDPIE.value = '';
	}
	function fncSecundary(vSECUNDARY){
		document.frmPortal.IDMENU.value = '';
		document.frmPortal.IDOPCION.value = '';
		document.frmPortal.IDSUBOPCION.value = '';
		document.frmPortal.IDPIE.value = '';
		document.frmPortal.SECUNDARY.value = vSECUNDARY;
		document.frmPortal.DSSEARCH.value = '';
		document.frmPortal.IDPRINCIPAL.value = 1;
		document.frmPortal.submit();
	}
	
	function functMail(string){
		if (typeof(string)!='object'){
			valor = string;
		}
		else{
				var X = new String;
				X = string.value;			
				valor = X;
		}
		if (string == ""){
				return(false);
		}
		else{
			
			if (valor.search(/[A-Za-z0-9ñ\-\.\_]+@[A-Za-z0-9\-]+\.[A-Za-z0-9]+(\.[A-Za-z0-9]*)?/g) != 0)
				return (false);
			else
				return(true);	
		}
	}
	
	function validarMailContacto(){
		if(document.frmPortal.txMailNombre.value==''){
			alert(scpGLO_TXVALIDNAME);
			document.frmPortal.txMailNombre.focus();
			return false;
		}
		if(document.frmPortal.txMailFrom.value==''){
			alert(scpGLO_TXENTERMAIL);
			document.frmPortal.txMailFrom.focus();
			return false;
		}else{
			if(!functMail(document.frmPortal.txMailFrom.value)){
				alert(scpGLO_TXVALIDMAIL);
				document.frmPortal.txMailFrom.focus();
				return false;
			}
		}
		if(document.frmPortal.txMailSubject.value==''){
			alert(scpGLO_TXVALIDSUBJECT);
			document.frmPortal.txMailSubject.focus();
			return false;
		}
		if(document.frmPortal.txMailMessage.value==''){
			alert(scpGLO_TXVALIDMESSAGE);
			document.frmPortal.txMailMessage.focus();
			return false;
		}
		
		document.frmPortal.action = 'components/sendmail.inc.php';
		document.frmPortal.submit();
	}
	
	function openPopup(stimagen, stepigrafe, stancho, stalto, txportal){
		var stanchoventana = stancho + 130;
		if(stanchoventana<350){
			stanchoventana = 350;
		}
		var staltoventana = stalto + 160;
		if(staltoventana<350){
			staltoventana = 350;
		}
		window.showModalDialog('components/pop.ampliacion.php?tximagen=' + stimagen + '&txepigrafe=' + stepigrafe + '&txancho=' + stancho + '&txalto=' + stalto + '&txportal=' + txportal,'VentanaSecundaria','dialogHeight: ' + staltoventana + 'px;dialogWidth: ' + stanchoventana + 'px; edge: Raised; center: yes; Status:No; help: No; resizable: no;scroll: no;');
		//window.open('components/pop.ampliacion.php?tximagen=' + stimagen + '&txepigrafe=' + stepigrafe + '&txancho=' + stancho + '&txalto=' + stalto + '&txportal=<?=$PORTAL_DSTITULO?>','VentanaSecundaria');
	}
	
	function printNote(idContenido){
		var stanchoventana = 550;
		var staltoventana = 600;
		window.showModalDialog('components/pop.impresion.php?idContenido=' + idContenido ,'VentanaSecundariaImpresion','dialogHeight: ' + staltoventana + 'px;dialogWidth: ' + stanchoventana + 'px; edge: Raised; center: yes; Status:No; help: No; resizable: no;scrollbars: no;');
		//window.open('components/pop.impresion.php?idContenido=' + idContenido ,'VentanaSecundariaImpresion');
	}
	
	function limpiarSearch(){
		document.frmPortal.DSSEARCH.value = '';
		return false
	}
	
	
	var fuente = 12;
	var minimo = 8;
	var maximo = 20;
	var fz_minimo = 1;
	var fz_maximo = 2.5;
	var fz = 1.25;
	
	function aumentarTexto(copete,texto){
		fuente = (fuente >= maximo) ? maximo : fuente + 1;
	        fz = (fz >= fz_maximo) ? fz_maximo : fz + 0.25;
		
		var layCopete = document.getElementById(copete);
		var layTexto = document.getElementById(texto);
		layCopete.style.fontSize = fz+ "em";
		layTexto.style.fontSize = fz+ "em";
	}
	
	function achicarTexto(copete,texto){
		fuente = (fuente <= minimo) ? minimo : fuente - 1;
	        fz = (fz <= fz_minimo) ? fz_minimo : fz - 0.25;
		
		var layCopete = document.getElementById(copete);
		var layTexto = document.getElementById(texto);
		layCopete.style.fontSize = fz+ "em";
		layTexto.style.fontSize = fz+ "em";
	}
	
	function fnNewsletter(Oper, idPortal, idIdioma){
		var email = document.frmPortal.dscorreoNews;
		
		if(email.value==''){
			alert(scpGLO_TXENTERMAIL);
			email.focus();
			return false;
		}else{
			if(!functMail(email.value)){
				alert(scpGLO_TXVALIDMAIL);
				email.focus();
				return false;
			}
		}
		
		window.frames.saveNews.location.href = 'components/svnewsletter.inc.php?iOper='+Oper+'&strMail='+email.value+'&idPortal='+idPortal+'&idIdioma='+idIdioma;

		email.value='';
	}
	
function backward(){ 
	if (which>0){ 
		which--;
	}else{
		which=whichMax;
	}
	document.images.photoslider.src=strPath + photos[which];
	document.getElementById("lnkAmpliarImagen").innerHTML = linksAr[which] + strAmpliar + '</a>';
} 

function forward(){ 
	if (which<photos.length-1){ 
		which++;
	}else{
		which=0;
	}
	document.images.photoslider.src=strPath + photos[which]; 
	document.getElementById("lnkAmpliarImagen").innerHTML = linksAr[which] + strAmpliar + '</a>';
} 

function setIniImage(){
	if(document.images.photoslider){
		document.images.photoslider.src=strPath + photos[which];
	}
	if(document.getElementById("lnkAmpliarImagen")){
		document.getElementById("lnkAmpliarImagen").innerHTML = linksAr[which] + strAmpliar + '</a>';
	}
}
