/*function createCookie(name,value,days) {
if (days) {
	var date = new Date();
	date.setTime(date.getTime()+(days*24*60*60*1000));
	var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name) {
createCookie(name,"",-1);
}

var flashvars = 
{
videoRideauSrc:"http://vw.sh05.net/operations/lancement_vw4_0/IntroVW_rideau.flv",
videoEchelleSrc:"http://vw.sh05.net/operations/lancement_vw4_0/IntroVW_echelle.flv"
};
var params =
{
wmode:"transparent",
allowscriptaccess:"always"
};
var attributes = {};
function expand(source, w, h, bg){	
	var flaContnr = '<div id="expand" style="display:none;position:absolute;width:'+w+'px;height:'+h+'px;top:0;right:50%;margin-right:-480px;z-index:999;"><div id="altContent" style="position:relative;width:'+w+'px;height:'+h+'px;" ></div></div>';
	$('body').append(flaContnr);
	var background = '<div id="expandBg" style="position:absolute;width:100%;height:100%;top:0;right:0;z-index:9;background-color:black;opacity:0.8;"></div>';
	if(bg==true){
		$('body').append(background);
	}
	swfobject.embedSWF(source, "altContent", w, h, "9.0.0", "http://vw.sh05.net/operations/lancement_vw4_0/expressInstall.swf') ?>", flashvars, params);
	$('body').find('#expand').show();
	
}


function removeFlashVideo(){
var flashVideo = $("#expand, #expandBg");
flashVideo.remove();
}

window.onload=function(){
var testCookie1 = readCookie('introVW1');
var testCookie2 = readCookie('introVW2');
if (!testCookie1 && !testCookie2) {
	createCookie('introVW1','1',7);
	expand("http://vw.sh05.net/operations/lancement_vw4_0/demenage.swf", "960", "600", true);
}else if(testCookie1 && !testCookie2){
	createCookie('introVW2','1',7);
	expand("http://vw.sh05.net/operations/lancement_vw4_0/VolkswagenVideoIntro.swf", "1308", "658", false);
}
}*/

function createCookie(name,value,days) {
if (days) {
	var date = new Date();
	date.setTime(date.getTime()+(days*24*60*60*1000));
	var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name) {
createCookie(name,"",-1);
}

function setWeatherForecast (){
		//alert('setWeatherForecast');
		var swf = document.getElementById('golfCabrioletWeatherContainer');
		swf.style.width = 960+'px';
		swf.style.height = 485+'px';
		swf.style.marginLeft = -480+'px';
		swf.style.top = 112+'px';
	}
function setWeatherDay (){
		//alert('setWeatherDay');
		var swf = document.getElementById('golfCabrioletWeatherContainer');
		swf.style.width = 172+'px';
		swf.style.height = 270+'px';
		swf.style.marginLeft = 288+'px';
		swf.style.top = 139+'px';
}

function expand(){
	var visitorIP;
 	$.getJSON("http://jsonip.appspot.com?callback=?",
	function(data){
		 visitorIP =  data.ip;
		 
			var flashvars = {ipAdress:visitorIP, proxy:'http://vw.sh05.net/operations/widget_meteo/proxy.php', gateway:'http://vw.sh05.net/operations/widget_meteo/amfphp/gateway.php'};
			var params = {wmode:"transparent", allowScriptAccess:"always"};
			var attributes = {id:"golfCabrioletWeather"};
			
			var flaContnr = '<div id="golfCabrioletWeatherContainer" style="width:172px; height:270px; position:absolute; top:139px; left:50%; margin-left:288px;"><div id="golfCabrioletWeather"></div></div>';
			$('body').append(flaContnr);
			
			swfobject.embedSWF("http://vw.sh05.net/operations/widget_meteo/mainRechercheAutreVille.swf", "golfCabrioletWeather", "100%", "100%", "9.0.0", "http://vw.sh05.net/operations/widget_meteo/library/js/expressInstall.swf'", flashvars, params, attributes);
	});
}

/*window.onload=function(){
		expand();
	}*/

var axel = Math.random()+"";
var a = axel * 10000000000000;
document.write('<IFRAME SRC="http://fls.doubleclick.net/activityi;src=2145865;type=landi088;cat=homep879;ord=1;num='+ a + '?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');
