// JavaScript Document
/*function resizeFlash()
{
	var newH,newW;
	var d = document;
	var ih = window.innerHeight;
	var iw = window.innerWidth;
	var ch = d.documentElement.clientHeight;
	var cw = d.documentElement.clientWidth;
	var oh = d.body.offsetHeight;
	var ow = d.body.offsetWidth;
	var objNav = new ClassNav();
	
	if (objNav.implementation == "activeX")
	{
		var movie = d.movie;
	}
	else
	{
		movie = d.movieN;
	}
	
	if (ih)
	{
		newH = ih;
		newW = iw;
	}
	else if (ch)
	{
		newH = ch;
		newW = cw;
	}
	else if (oh)
	{
		newH = oh;
		newW = ow;
	}
	else
	{
		newH = 650;
		newW = 760;
	}
	newH <= 650 ? movie.height = 650: movie.height = newH;
	newW <= 760 ? movie.width = 760: movie.width = newW;
	window.scrollTo(0,0);
};
function getObjNav()
{
	var objNav,t,movie,d;
	d = document;
	objNav = new ClassNav();
	t = objNav.toUrl();
	if (objNav.implementation == "activeX") movie = d.movie;
	else movie = d.movieN;
	movie.SetVariable("/_level0:objNav", t);
	resizeFlash(); 
}
function openWindow(temp)
{
	var Window2=open("","","scrollbars=1,width=800,height=600");
	Window2.document.open();
	Window2.document.write("<HE"+""+"AD><TI"+""+"TLE>fenêtre secondaire !</TI"+""+"TLE></H"+""+"EAD>");
	Window2.document.write("<bo"+""+"dy>"+temp+"</bo"+""+"dy>");
	Window2.document.close();
}
function openFile(id)
{
	var Window2=open("","","scrollbars=1,width=800,height=600");
	Window2.document.open();
	Window2.document.write("<HE"+""+"AD><TI"+""+"TLE>Sélection Fichier !</TI"+""+"TLE></H"+""+"EAD>");
	texte = "<h3><cen"+""+"ter>Cliquez sur Parcourir pour sélectionner sur votre ordinateur votre photo au format jpg (120ko Max, fond clair)</cen"+""+"ter></h3>";
	temp = "<fo"+""+"rm action='php/savePhotoToImpression.php' enctype='multipart/form-data' method='post' target = '_self'>";
	temp += "<in"+""+"put type='hidden' name='MAX_FILE_SIZE' value=122800 >";
	temp += "<cen"+""+"ter><in"+""+"put name='ch_file' type='file' size='40' ><in"+""+"put type='hidden' name='id' value='"+id+"'>";
	temp += "<br><in"+""+"put type='submit' value='Envoyer'> </cen"+""+"ter></fo"+""+"rm>";
	Window2.document.write("<bo"+""+"dy bgcolor='#FF0099'>"+texte+""+temp+"</bo"+""+"dy>");
	Window2.document.close();
}
function scan(cible)
{
	var temp="";
	for (var x in cible)
	{
		temp += x + " : " + cible[x] +"<br>";
	}
	openWindow(temp);
}
//
function affichePreloadMovie()
{
	var PercentLoaded = window.movie.PercentLoaded();
	window.status = "Chargement en cours... "+PercentLoaded+"%";
	if(PercentLoaded == 100)
	{
		clearInterval(window.preloadInterval);
		window.status = "Chargement terminé.";
	}
}
function preloadMovie()
{
	var objNav = new ClassNav();
	var d = document;
	//scan(objNav);
	if (objNav.implementation == "activeX")
	{
		window.movie = d.movie;
	}
	else
	{
		window.movie = d.movieN;
	}
	//scan(window.movie);
	window.preloadInterval = setInterval("affichePreloadMovie()",50);
}*/
/////////////////////////////////////////////////// cookies
function EcrireCookie(nom, valeur)
{
	var argv=EcrireCookie.arguments;
	var argc=EcrireCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=nom+"="+escape(valeur)+
	((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
	((path==null) ? "" : ("; path="+path))+
	((domain==null) ? "" : ("; domain="+domain))+
	((secure==true) ? "; secure" : "");
}
function setCookie(idUtil,pseudo,langue,visite)
{
	<!--
	date=new Date;
	date.setFullYear(date.getFullYear()+1);
	EcrireCookie("utilisateur", idUtil, date, "/");
	EcrireCookie("pseudo", pseudo, date, "/");
	EcrireCookie("langue", langue, date, "/");
	EcrireCookie("visite", visite, date, "/");
	//-->
}
//
function Open_windows(url,width,height)
{
	//fen = window.open(url,'','width=500,height=390');
	Fwidth = parseInt(width) + 30;
	Fheight =  parseInt(height) + 30;
	Window2=open("","","width="+Fwidth+",height="+Fheight);
	Window2.document.open();
	Window2.document.write("<HEAD><META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
	Window2.document.write("<TITLE>Okni Origin</TITLE></HEAD>");
	Window2.document.write("<body bgcolor='#FFFFFF' ><table width='100%'><tr><td align='center'><img src="+url+"></td></tr>");
	Window2.document.write("</table></body>");
	Window2.document.close();
	Window2.document.title = "Zoom";
}
