var tab = -1;

function getCookie(name){
	var ToExec = new RegExp(name + "=([^;]+)");
	var valeur = ToExec.exec(document.cookie);
	return (valeur != null) ? valeur[1] : null;
}

function setCookie(name, value) {
	document.cookie=  name + "=" + value + "; path=/";
}

function delCookie(name){
	setCookie(name,"");
}


function refreshPage(){
/*
	if(getCookie('refreshPage')==null || getCookie('refreshPage')=='yes') {
		document.location = document.location;
		setCookie('refreshPage',"no");
	}
	else {
		setCookie('refreshPage',"yes");
	}
*/
}

function mvNav(id){
	if(top.frames.nav.document.tab>=0)
     	document.getElementById("sm"+top.frames.nav.document.tab).style.display='none';

	document.getElementById("sm"+id).style.display='';
	top.frames.nav.document.tab = id;
}

function mvNavh(id){
	if(tab>=0)
     	document.getElementById("sm"+tab).style.display='none';

	document.getElementById("sm"+id).style.display='';
	tab=id;
}

var tID,t;

function vuMenu(){
	top.frames.main.document.getElementById("see").style.visibility="visible";
}

function eteint(){
	top.frames.main.document.getElementById("see").style.visibility="hidden";
}

function initNav(id,sid){
	if(top.frames.nav.document.getElementById("finav")){
		for(i=0;i<15;i++){
			if(i==sid){
				top.frames.nav.document.getElementById("sm"+id+"_"+sid).style.background="#F9C432";
				top.frames.nav.document.getElementById("st"+id+"_"+sid).style.fontWeight = 'bold';
			}

			else{
				top.frames.nav.document.getElementById("sm"+id+"_"+i).style.background="#FFFFFF";
				top.frames.nav.document.getElementById("st"+id+"_"+i).style.fontWeight = 'normal';
			}
		}

		top.frames.nav.document.getElementById("sm"+id).style.display='';
	}
	else
		setTimeout('initNav('+id+','+sid+');',300);

	top.frames.nav.document.stsid =sid;
	top.frames.nav.document.tab = id;
}

function rollOn(id,sid){
	if(top.frames.nav.document.stsid!=sid)
		top.frames.nav.document.getElementById("sm"+id+"_"+sid).style.background="#F9C432";
}

function rollOut(id,sid){
	if(top.frames.nav.document.stsid!=sid)
		top.frames.nav.document.getElementById("sm"+id+"_"+sid).style.background="#FFFFFF";
}

function rollOnh(id,sid){
	document.getElementById("sm"+id+"_"+sid).style.background="#F9C432";
}

function rollOuth(id,sid){
	document.getElementById("sm"+id+"_"+sid).style.background="#FFFFFF";
}

function playWMPClip(playerId) {
	document.all[playerId].play();
}

function playRealClip(playerId) {
	document.all[playerId].doPLay();
}

function playQtClip(playerId) {
	document.all[playerId].play();
}

function submitTo(uri) {
	document.userForm.action=uri;
	document.userForm.submit();
}

function submitToTarget(uri, main) {
	document.userForm.action=uri;
	document.userForm.target=main;
	document.userForm.submit();
}

function popupcentree(url,w,h) {
	var top=(screen.height-h)/2;
	var left=(screen.width-w)/2;
	window.open(url,"","top="+top+",left="+left+",width="+w+",height="+h+",status=0,scrollbars=1");
}

function flashWriter(file,width,height) {
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + width + '" HEIGHT="' + height + '" id="anim2005" ALIGN="">');
	document.write('<PARAM NAME=movie VALUE="' + file + '">');
	document.write('<PARAM NAME=quality VALUE=high>');
	document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF>');
	document.write('<EMBED src="' + file + '" quality=high bgcolor=#FFFFFF WIDTH="' + width + '" HEIGHT="' + height + '" NAME="anim2005" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">  </EMBED>');
	document.write('</OBJECT>');
}
