// JavaScript Document

function ct_popup(href){
	 var nom = 'ct_popup'; var fenetre = window.open(href, nom, "width=820,height=600,top= 10,left=10, scrollbars=1,location=0,resizable=0,directories=0,menubar=0,status=0,toolbar=0");
	fenetre.focus();
}//fin ct_popup

function ct_mini(href){
	var hauteur = 120;	var largeur = 400;	var haut=(screen.height-hauteur)*0.33;	var gauche=(screen.width-largeur)/2; var nom = 'ct_mini';
	var fenetre = window.open(href, nom, "width="+largeur+",height="+hauteur+",top="+haut+", left="+gauche+",scrollbars=0,location=0,resizable=no,directories=0,menubar=0,status=0,toolbar=0");
	fenetre.focus();
}//fin ct_mini

function ct_newWindow(href){
	var fenetre = window.open(href);
	fenetre.focus();
}//fin ct_neWindow

function ct_isIframe(){
	if (top.location != self.document.location) return true; else return false;
}//fin ct_isIframe

function ct_ouvrir(url){
	if (ct_isIframe()) ct_popup(url); else document.location.replace(url);
}//fin ct_ouvrir

function ct_framelink(url){
	if (ct_isIframe()) {
		var width = document.body.offsetWidth;
		if (width<600)
			ct_popup(url);
		else
			document.location.replace(url);
	}
	else
		document.location.replace(url);
}//fin ct_framelink

function access(){
	var oSelect = document.getElementById('INFO').value;
	var reg1=new RegExp("[ong]","g");
	
	if (oSelect.match(reg1) &&  oSelect.length == 4) 
		afficherOnglets(5,oSelect)
	
	if (oSelect !="" && oSelect.length>4)
		document.getElementById('frmAccesRapide').submit();		
}//fin acces

function ct_width(is_frame){
	if(1 == is_frame) 
		ct_debut();
	if (ct_isIframe()) { var width = document.body.offsetWidth;	if ( width<= 784 && width >= 400) document.getElementById('CT_container_ss_menu').style.width = '98%'; 
	else if (width < 400 ) document.getElementById('contenu').style.width = '400px;' 	
	}
}//fin ct_width

function ct_debut() {
	//window.scrollTo(0,0); 
	window.location.href ='#top';
}//fin ct_debut


function ct_montre(id1, id2) {
	//affiche le premier element
	if (document.getElementById) {
	document.getElementById(id1).style.display="block";
	} else if (document.all) {
	document.all[id1].style.display="block";
	} else if (document.layers) {
	document.layers[id1].display="block";
	}
	//cache le 2e element
	if (document.getElementById) {
	document.getElementById(id2).style.display="none";
	} else if (document.all) {
	document.all[id2].style.display="none";
	} else if (document.layers) {
	document.layers[id2].display="none";
	}
}// fin ct_montre

