// <?

//-- FUNCION DE INTERCAMBIO DE ESTILOS --//
	function StyleChanger (PARAM1, PARAM2){
		document.getElementById(PARAM1).className = PARAM2;
	}
//-- FUNCION CAMBIO DE IMAGENES --//
	function ImageChanger (PARAM1,PARAM2){
		ImagenA = new Image();
		ImagenA.src = PARAM1;
		document.getElementById(PARAM2).src=ImagenA.src;
	}
//-- FUNCION SHOW HIDE --//
	function ObjectSH (PARAM1,PARAM2,showtype){
		if(showtype){
			var objectS = document.getElementById(PARAM1);
			var BTpos = document.getElementById('main');
			docMy = BTpos.offsetTop;
			docMx = BTpos.offsetLeft;
			objectS.style.top = docMy+document.docMoy+"px";
			objectS.style['left'] = docMx+document.docMox+"px";
			objectS.style['display'] = PARAM2;
		}else{
			var objectS = document.getElementById(PARAM1);
			objectS.style['display'] = PARAM2;
		}
	}
////////////////////////////////////////////////////////////////////////////////
//-- FUNCION ON OVER OUT --//
	function OOO(elementID,Style){
		if(document.Bclickeado!=elementID){
			StyleChanger(elementID,Style);
		}
	}
//-- FUNCION ON OVER OUT SUB --//
	function OOOS(elementID,Style){
		if(document.SBclickeado!=elementID){
			StyleChanger(elementID,Style);
		}
	}
//-- FUNCION QUE HACE EL SHOW HIDE --//
	function SH(elementID,STAT,showtype){
		if(STAT=='1'){
			ObjectSH (elementID,'block',showtype);
			if(document.Mclickeado && document.Mclickeado!=elementID){
				ObjectSH (document.Mclickeado,'none',showtype);
			}
		}else if(STAT=='0'){
			ObjectSH (elementID,'none',showtype);
			if(document.Mclickeado){
				ObjectSH (document.Mclickeado,'block',showtype);
			}
		}
	}
//-- FUNCION ON CLIK --//
	function CLK(elementID,SubMID,Style){
		OOO(elementID,Style);
		if(document.Bclickeado){
			StyleChanger(elementID,Style);
			//StyleChanger(document.IMD+document.Bclickeado+"0.jpg",document.Bclickeado);
		}
		document.Bclickeado=elementID;
		document.Mclickeado=SubMID;
	}
//-- FUNCION ON CLIK SUB MENU --//
	function SMCLK(elementSBID,elementID,SubMID,PStyle,Style){
		if(document.Bclickeado!=elementID){
			CLK(elementID,SubMID,PStyle);
		}
		OOOS(elementSBID,Style);
		if(document.SBclickeado){
			StyleChanger(elementID,Style);
		}
		document.SBclickeado=elementSBID;
	}
//-- FUNCION IR A --//
	function Goto(URL,Target) {
		if(Target=='blank'){
			window.open(URL);
		}else if(Target=='self'){
			window.location.href = URL;
		}
	}



function novedadesSH (ELEMENTID){
		var objectS = document.getElementById(ELEMENTID);
	if(objectS.style['display']=='block'){
		objectS.style['display'] = 'none';
	}else{
		objectS.style['display'] = 'block';
	}
}


////////////////////////////////////////////////////////////////////////////////

// ARMADO DE LAS NOTICIAS PTCM (Peor es Tener que Cambiarlas a Mano) //

function news_ABS (){
	for($reg in $aNews){
		for($x=0;$x<$aNews[$reg].length-4;$x++){
			document.getElementById($reg+"ABS"+$x).innerHTML = $aNews[$reg][$x];
		}
	}
}
function news_FUL (){
	for($reg in $aNews){
		for($x=2;$x<$aNews[$reg].length;$x++){
			document.getElementById($reg+"FUL"+$x).innerHTML = $aNews[$reg][$x];
		}
	}
}



