// JavaScript Document
function resizeFlash()
{
	//alert("resizeFlash "+document.limitHeight);
	var limit;
	if(!document.limitHeight || document.limitHeight == "undefined")
	{
		limit = 580;
	}
	else
	{
		limit = document.limitHeight;
	}
	//alert(limit);
	window.status = "document.limitHeight "+document.limitHeight;
	var tare = -10;
	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;
		
	if (ih)
	{
		newH = ih-tare;
		//newW = iw;
	}
	else if (ch)
	{
		newH = ch-tare;
		//newW = cw;
	}
	else if (oh)
	{
		newH = oh-tare;
		//newW = ow;
	}
	else
	{
		newH = 580-tare;
		//newW = 760;
	}
	
	var movie = d.getElementById("movie");
	
	if(newH >= limit)
	{
		movie.height = newH;
	}
	
	
	//movie.width = newW;
	//window.scrollTo(0,0);
};

function mouseWheel(delta)
{
	if(delta > 0) window.scrollBy(0, -50);
	else window.scrollBy(0, 50);
}

function resizeDiv(nHeight)
{
	//alert("resizeDiv "+nHeight);
	var nHeight = parseInt(nHeight);
	document.limitHeight = nHeight;
	var movie = document.getElementById("movie");
	movie.height = (nHeight+5);
	//var div = document.getElementById("flashcontent");
	//div.style.height = (nHeight+5);
}

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)
{
	//alert(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>Miniatures-Collections.com</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";
}
//
function changeFooter(sLangue)
{
	var adresse = document.getElementById("adresse");
	var cgv = document.getElementById("cgv");
	var dbville = document.getElementById("dbville");
	var pds = document.getElementById("pds");
	//
	/*if(sLangue == "es")
	{
		//adresse.innerHTML = "";
		//cgv.innerHTML = "";
		dbville.innerHTML = "Fabricación : ip2f.com - creación páginas Internet ";
		pds.innerHTML = "Plan del sitio";
		document.title = "Lacour-Fruits";
	}
	else if(sLangue == "ang")
	{
		//adresse.innerHTML = "";
		//cgv.innerHTML = "";
		dbville.innerHTML = "Made by : ip2f.com - Web Agency ";
		pds.innerHTML = "Plan of the site";
		document.title = "Lacour-Fruits";
	}
	else
	{
		//adresse.innerHTML = "";
		//cgv.innerHTML = "";
		dbville.innerHTML = "Réalisation : ip2f.com - Création sites Internet ";
		pds.innerHTML = "Plan du site";
		document.title = "Lacour-Fruits";
	}*/
	
}
