/** 
* resetStyle - Apply a diffrent style like a border, a Color or a Weight to all the element from the class selected
* 
* @param  string  maClass    Obligatoire - The CSS class name
* @param  string  value    	 Obligatoire - the CSS propriety for the element : "1px solid #FFFFFF" 
* @param  string  style    	 Obligatoire - the CSS style for the element : [border, color, Weight]
* @return result      		 Nothing
**/ 
function resetStyle(maClass,value,style){
	var tabRetour = new Array();
	var tabTmp = new Array();
	tabTmp = document.getElementsByTagName("*");
	j=0;
	for (i=0; i<tabTmp.length; i++) { 
	    if (tabTmp[i].className==maClass){  
			if(style=="border"){
			        tabTmp[i].style.border=value;		
			}else if(style=="color"){
			        tabTmp[i].style.color=value;						
			}else if(style=="fontweight"){
			        tabTmp[i].style.fontWeight=value;						
			}
	    }  
	}
}



/** 
* changeChap - Change the value of hidden input to load the videoplayer frame
* 
* @param  string  IdChapPassed    Obligatoire - the id of the chapter (Mainmovie) 
* @return result      		      Nothing
**/
function changeChap(IdChapPassed){
	document.forms.chapselector.chapter.value=IdChapPassed;
}
	
/** 
* changeLang - Change the value of hidden input to load the videoplayer frame and change the css border of the flag (to make it selected)
* 
* @param  string  IdLangPassed    Obligatoire - the id of the language (it, ee, fi ....) 
* @param  string  IdlangPassedId  Obligatoire - the id of the html element : img (it1, it2, se5) 
* @return result      		      Nothing
**/	
function changeLang(IdLangPassed, IdlangPassedId){
	document.forms.chapselector.lan.value=IdLangPassed;
	resetStyle('flag','1px solid #363636', 'border');
	document.getElementById(IdlangPassedId).style.border='1px solid #FFFFFF';
}

/** 
* changeMenuSelected - Change the css style of the menu item (to make it selected)
* 
* @param  string  IdPagePassed    Obligatoire - the id of the Page (term, credits ....) 
* @param  string  style    	 	  Obligatoire - the CSS class of the element 
* @return result      		      Nothing
**/	
function changeMenuSelected(IdPagePassed, style){
	resetStyle(style,'normal', 'fontweight');
	document.getElementById(IdPagePassed).style.fontWeight='bold';
}

