// JavaScript Document
function afficheMeteo()
{
	var div = document.getElementById('meteo');
	if(div.style.visibility ==  'visible')
	{
		div.style.visibility = 'hidden';
	}
	else
	{
		div.style.visibility = 'visible';
	}
}

function afficheLinkForPopup(url,width,height)
{
	var div = document.getElementById('popup');
	div.innerHTML = "Vous pouvez autoriser les Popups pour le site Claron-immobilier.com pour imprimer cette image";
	div.innerHTML += "<br>Aucune publicité ne vous sera imposée sur ce site.";
	div.innerHTML += "<br>Vous pouvez aussi cliquer <a href='#' onclick='Open_windows(\""+url+"\",\""+width+"\",\""+height+"\");'>ici pour afficher l'image à imprimer</a>";
	div.innerHTML += " ,ou <a href='#' onclick='masqueLinkForPopup();'>ici pour masquer ce lien</a>";
	div.style.visibility = 'visible';
}
function masqueLinkForPopup()
{
	var div = document.getElementById('popup');
	div.innerHTML = "";
	div.style.visibility = 'hidden';
}

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 scan(cible)
{
	var temp="";
	for (var x in cible)
	{
		temp += x + " : " + cible[x] +"<br>";
	}
	openWindow(temp);
}

function Open_windows(url,width,height)
{
	Fwidth = parseInt(width) + 100;
	Fheight =  parseInt(height) + 100;
	Window2=window.open('','','width="+Fwidth+",height="+Fheight+","directories=yes,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes');
	if(Window2)
	{
		Window2.document.open();
		Window2.document.write("<HEAD><META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
		Window2.document.write("<TITLE>Claron-immobilier.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 - Claron-immobilier.com";
	}
	else
	{
		afficheLinkForPopup(url,width,height);		
	}
}
/////////////////////////////////////////////////// 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 changeFooter(sLangue)
{
	var adresse = document.getElementById("adresse");
	var dbville = document.getElementById("dbville");
	//
	//adresse.innerHTML = "";
	//cgv.innerHTML = "";
	switch(sLangue)
	{
		case "fr" :
			dbville.innerHTML = "Réalisation : ip2f.com - Création sites Internet ";
			document.title = "Claron Immobilier : Gestion, Transaction, Promotion et Location Immobilière";
		break;	
		case "es" :
			dbville.innerHTML = "Realización : ip2f.com - creación de sitio web ";
			document.title = "Inmobiliaria Claron: Gestión de las transacciones, Promoción y Inmobiliarias Alquileres";
		break;
		case "cat" :
			dbville.innerHTML = "Realització : ip2f.com - creació web ";
			document.title = "mmobiliària Claron: Gestió de les transaccions, Promoció i Immobiliàries Lloguers";
		break;
		case "ang" :
			dbville.innerHTML = "Realisation : ip2f.com - web agency ";
			document.title = "CReal Estate Claron : Management, Transaction, Promotion and Real Estate Rentals";
		break;
	}
}
