/**
* @description Script that sends the left frame the order to rebuild itself.
* @author Manuela Valois
* @version GN1.2
*/

/**
* The unique method that gives the left frame the order to rebuild itself.
* @param rootSection (Required) The number giving the root section (level0 in the tree) to which the central file belongs to
* Its value is 0 when we are dealign with the homepage
* @param subSection1 (Optional) The number giving the subsection level1 (in the tree) to which the  central file belongs to
* @param subSection2 (Optional) The number giving the subsection level2 (in the tree) to which the  central file belongs to
*/

var rep=0

function loadincontent(url,rootSection,subSection1,subSection2)
{
	if (isNaN(rootSection)) {
		rootSection = -1;	
	}else{if(rootSection > 0) rootSection = rootSection - 1;}
	if (isNaN(subSection1)) {
		subSection1 = -1;	
	}else{if(subSection1 > 0) subSection1 = subSection1 - 1;}
	if (isNaN(subSection2)) {
		subSection2 = -1;	
	}else{if(subSection2 > 0) subSection2 = subSection2 - 1;}

	var ppal = parent.frames["content"]; //Frame principal
	var nav = parent.frames["leftnav"];  //Frame izquierdo de navegación
	ppal.location = url;
	nav.cierramenus();
	if (rootSection != -1) nav.foldmenu(rootSection);
	if (subSection1 != -1) nav.cierrafoldmenu(rootSection,subSection1);
	if (subSection2 != -1) nav.subfoldmenu(rootSection, subSection1);
}


function initNavigationConstruction(rootSection,subSection1,subSection2) {
/*	if (parent.parent.frames[0]?true:false) {
		if (parent.parent.frames[0].document.forms[0].open.value == "no") {
			abrir('../microsite/tarjetawebaxa.htm', 600, 400, 'no');
			parent.parent.frames[0].document.forms[0].open.value = "si";
		}
	}	*/
}



function initNavigationWithLogin() {
	if (parent.isLeftFrameLoaded == true) {
		// Pas besoin de recharger si on est déjà sur la bonne section !
		if ( parent.section1Load1=="-1" && parent.section2Load1=="-1" && parent.section3Load1=="-1" ) {
			// Reconstruction de la frame
			rep = 1;
			
			// On indique où on se trouve !
			parent.section1Load1 = -1;
			parent.section2Load1 = -1;
			parent.section3Load1 = -1;
		}
		if (rep){
			repub = parent.refserver + "log_nav.asp" + "?fmn=" + parent.section1Load1 + "&fsmn1=" + parent.section2Load1 + "&fsmn2=" + parent.section3Load1
			if (parent.ns6){
				parent.leftnav.location.href=repub
			}else{
				document.frames.parent.leftnav.location.href = repub}
		}
	}
}

