﻿/*// SCRIPT PSYMA //
if(navigator.appName != "Microsoft Internet Explorer")
	{

	var rndNumber    = Math.round( 1 + 100 * (Math.random()) );   // Zufallzahl zwischen 0 und 100
	<!--//--><![CDATA[//><!--

	// Kontaktraten-Steuerung
	
	var samplingRate = psyma_contact_rate;
    var psyma_contact_rate = 3; // Hier wird die Kontaktrate eingestellt
	var psyma_random_num = Math.random();
	
	// Umfrage-URL
	var survey_window_attributes = "http://www.psyma-surveys.com/uc/abfr_volkswagen/"; // URL der Umfrage

	// Grafiken und Farben für die Layer-Darstellung
    var psyma_dot = "http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/psyma/2009.Par.0002.Image.gif";
    var psyma_schatten = "http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/psyma/2009.Par.0005.Image.gif";
    var psyma_logo = "http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/psyma/2009.Par.0007.Image.gif";
	var psyma_kunden_logo ="http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/psyma/2009.Par.0008.Image.gif";
	var top_color = "E6E6EB";				// HG-Farbe fuer Background1 
	var bottom_color = "9999A3";			// HG-Farbe fuer Background2 
	var psyma_link_color = "#3C5F8C";		// Aendert Farbe f. Links im Layer
	var psyma_title_color = "000";			// Aendert Textfarbe + Buttonbeschriftung 
	var psyma_text_color = "000";			// Aendert Textfarbe + Buttonbeschriftung Mouseover
	var psyma_text_margin_top = "50px";		// Aendert Abstand zwischen Layer-Text und Kundenlogo

	var psyma_client_name = "Volkswagen"; 

	// Cookie-Steuerung
	var psyma_use_cookies = true;
	var psyma_participation = 0;
	var psyma_participation_cookie = "psyma_participation";

	// Diverse Variablen
	var psyma_entry_page = location.href;

	var psyma_index = psyma_entry_page.indexOf('?');
	if (psyma_index >= 0)
	{
		psyma_entry_page = psyma_entry_page.substr(0, psyma_index);
	}

	var connectionSpeed = 0;
	var screen_width = screen.width;
	var screen_height = screen.height;

	var horizontal_alignment = "center";
// ERSETZEN DER URSPRUENGLICHEN FUNCTION "showPopup()"
		function showPopup() {
				if ( rndNumber <= samplingRate ) {
            psyma_init_layer();
				}
		}
		
// NEU BESCHREIBEN DER BUEHNE MIT WMODE=TRANSPARENT
		function chgFlash() {
		    flashDiv = document.getElementsByTagName("object")[0].parentNode;
		    flashDivHTML = flashDiv.innerHTML;
		    // REPLACEN DER VERSCHIEDEN JAVASCRIPT-INTERPRETATIONEN DIV. BROWSER
		    flashDivHTMLRewritten = flashDivHTML.replace(/<PARAM NAME="LOOP" VALUE="false">/gi,'<PARAM NAME="LOOP" VALUE="false"><PARAM NAME="WMODE" VALUE="transparent">'); //IE
		    flashDivHTMLRewritten = flashDivHTMLRewritten.replace(/NAME="WMode" VALUE="Window"/gi,'NAME="WMode" VALUE="transparent"'); //IE
			flashDivHTMLRewritten = flashDivHTMLRewritten.replace(/NAME="Play" VALUE="0"/gi,'NAME="Play" VALUE="1"'); //IE
			//alert(flashDivHTMLRewritten);
        
// XML PATH AUSLESEN 
		if(flashDivHTMLRewritten.indexOf('xmldata=') > -1) {
	        xmlPath = flashDivHTMLRewritten.split('xmldata=');
	        xmlPathTemp = xmlPath[1].split('.xml');
	        xmlPathComplete = xmlPathTemp[0] + ".xml"
	        flashDivHTMLRewritten = flashDivHTMLRewritten.replace(/.swf"/gi,'.swf?xmldata='+xmlPathComplete+'"');
        }
		    flashDivHTMLRewritten = flashDivHTMLRewritten.replace(/loop="false"/gi,'loop="false" WMODE="transparent" '); // MOZ
			  flashDivHTMLRewritten = flashDivHTMLRewritten.replace(/LOOP="0"/gi,'loop="0" WMODE="transparent" '); // OPERA

        //showContent(flashDivHTMLRewritten);

			  flashDiv.innerHTML = flashDivHTMLRewritten;
		}

// HILFSFUNCTION!!!  
    function showContent(cont) {
       var fenster = window.open("", "neu")
       if (fenster != null){
          with (fenster.document){
             open()
             write("<"+"HTML"+">")
             write("<"+"HEAD"+">")
             write("<"+"TITLE"+">Popup Maker"+"<"+"/TITLE"+">")
             write("<"+"/HEAD"+">")
             write("<"+"BODY BGCOLOR=#ffffff"+">")
             write("<"+"font style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; color: #000000;'"+">")
             write("<"+"textarea"+" cols=80 rows=30>"+cont+"<"+"/textarea"+">")
             write("<"+"br"+">")
             write("<"+"br"+">"+"<"+"br"+">")
             write("<"+"/BODY"+">"+"<"+"/HTML"+">")
             close()
          }
       }
    }


	// ------------------------------------------ Cookie-Steuerung -------------------------------------------------

	function get_psyma_cookie(a)
	{
		if ( psyma_use_cookies )
		{
			var c=document.cookie.split(a+"=");
			return (c.length>1)?unescape(c[1].split(";")[0]):"";
		}
		else
		return null;
	}

	// ###### set cookie ######
	function set_psyma_cookie(name, value, path, domain, secure, expires)
	{
		if ( psyma_use_cookies ) 
		{
			document.cookie =
			  name + "="
			  + escape(value)
			  + ((path) ? "; path=" + path : "")
			  + ((expires) ? "; expires=" + expires.toGMTString() : "")
			  + ((domain) ? "; domain=" + domain : "")
			  + ((secure) ? "; secure" : "");
		}
	} // Ende Set Coookie

	psyma_participation = get_psyma_cookie(psyma_participation_cookie);

	// ----------------------------------------- Ende der Cookie-Steuerung -----------------------------------------
	if (psyma_random_num < (psyma_contact_rate/100) && psyma_participation != 1)
	{


		// ###### PSYMA INIT LAYER ######
		function psyma_init_layer()
		{
			var myWidth = 0, myHeight = 0;

			if( typeof( window.innerWidth ) == 'number' )
			{
				//Non-IE
				myWidth = window.innerWidth;
				myHeight = window.innerHeight;
			} 
			else if ( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight) )
			{
				//IE 6+ in 'standards compliant mode'
				myWidth = document.documentElement.clientWidth;
				myHeight = document.documentElement.clientHeight;
			}
			else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
			{
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
			
			if (horizontal_alignment == "center") // a) Fr dynamische Positionierung (horizontal):
			{
				poswidth = (myWidth - 550) / 2;
			}
			else // b) Fr feste Positionierung (horizontal):
			{
				poswidth = (horizontal_alignment - 550) / 2;
			}

			psymaTop = -300;
				
			psyma_posLayer("psyma_layer", poswidth, psymaTop);
			psyma_showLayer("psyma_layer");

			set_psyma_cookie(psyma_participation_cookie, 1, "/", "", "", "")
		}
			function psyma_findLayer(name, doc) 
	{
		var i, layer;
		var length = doc.layers.length;
		for (i = 0; i < length; i++)
		{
			layer = doc.layers[i];
			
			if (layer.name == name)
			{
				return layer;
			}
			
			if (layer.document.layers.length > 0)
			{
				if ((layer = psyma_findLayer(name, layer.document)) != null)
				{
					return layer;
				}
			}
		}
		return null;
	}

	function psyma_showLayer(id)
	{
		// if (document.layers) document.layers[''+id+''].visibility = "show"
		if (document.layers)
		{
			id = psyma_findLayer(id, document);
			id.visibility = "show";
		} 
		else if (document.all)
		{
			document.all[''+id+''].style.visibility = "visible";
		} 
		else if (document.getElementById)
		{
			document.getElementById(''+id+'').style.visibility = "visible";
		}				
	}

	function psyma_hideLayer(id)
	{
		// if (document.layers) document.layers[''+id+''].visibility = "hide"
		if (document.layers)
		{
			id = psyma_findLayer(id, document);
			id.visibility = "hide";
		} 
		else if (document.all)
		{
			document.all[''+id+''].style.visibility = "hidden";
		}
		else if (document.getElementById)
		{
			document.getElementById(''+id+'').style.visibility = "hidden";
		}				
	}

	function psyma_posLayer(id,lax,lay)
	{
		if (lax)
		{
			if (document.layers) { document.layers[''+id+''].left = lax }
			else if (document.all) { document.all[''+id+''].style.left = lax }
			else if (document.getElementById) { document.getElementById(''+id+'').style.left = lax + "px" }
		}
		if (lay)
		{
			if (document.layers) { document.layers[''+id+''].top = lay }
			else if (document.all) { document.all[''+id+''].style.top = lay }
			else if (document.getElementById) { document.getElementById(''+id+'').style.top = lay + "px"}
		}
	}

	function psyma_button1()
	{
		psyma_hideLayer('psyma_layer');
		var psyma_width = window.screen.width;
		var psyma_height = window.screen.height - 100;
		if (psyma_width >= 1000)
			psyma_width = 1000;
		if (psyma_height >= 700)
			psyma_height = 700;

		var survey_window = window.open(survey_window_attributes, 'psyma_survey',  'toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width='+psyma_width+',height='+psyma_height+',top=0,left=0');
		if (survey_window)
			survey_window.opener.focus();
		return false;
	}

	function psyma_button2()
	{
		psyma_hideLayer('psyma_layer');
		return false;
	}

	function psyma_write_layer()
	{
		document.write('<style type="text/css">');
		document.write('#psyma_layer');

		document.write('{');
		document.write('display: block;');
		document.write('visibility: hidden;');
		document.write('z-index: 100000;');
		document.write('position: absolute;');
		document.write('top: 120px;');
		document.write('left: 0px;');
		document.write('width: 550px;');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('font-size: 13px; background-color: #fff;');
		document.write('color: #'+psyma_text_color+';');
		document.write('border: 3px solid #'+bottom_color+';');
		document.write('padding: 0;}');

		document.write('#psyma_layer p {');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('font-size: 13px;');
		document.write('padding: 0;');
		document.write('margin: 0 0 10px 0;');
		document.write('line-height: 105%;}');

		document.write('#psyma_layer #header-background {');
		document.write('width: 100%;');
		document.write('height: 50px;');
		document.write('z-index: 0;');
		document.write('background-color: #'+top_color+';}');

		document.write('#psyma_layer #header-background2 {');
		document.write('width: 100%;');
		document.write('height: 20px;');
		document.write('z-index: 0;');
		document.write('background: #'+bottom_color+' url("'+psyma_schatten+'") repeat-x 0 15px;}');

		document.write('#psyma_layer #titel {');
		document.write('line-height: 18px;');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('position: absolute;');
		document.write('top: 28px;');
		document.write('right: 20px;');
		document.write('color: #'+psyma_title_color+';');
		document.write('font-size: 18px;');
		document.write('font-weight: bold;');
		document.write('z-index: 1;}');

		document.write('#psyma_layer #client-logo-li {');
		document.write('position: absolute;');
		document.write('top: 11px;');
		document.write('left: 20px;');
		document.write('padding: 0;');
		document.write('margin: 0;');
		document.write('text-align: center;');
		document.write('width: auto;');
		document.write('background: #fff url("http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/psyma/2009.Par.0003.Image.gif") no-repeat top left; }');

		document.write('#psyma_layer #client-logo-re {');
		document.write('padding: 10px;');
		document.write('background: url("http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/psyma/2009.Par.0004.Image.gif") no-repeat top right; }');

		document.write('#psyma_layer a:link, #psyma_layer a:active, #psyma_layer a:visited, #psyma_layer a:hover {');
		document.write('font-size: 13px;');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('color: #5E5E5E;');
		document.write('text-decoration: underline; }');

		document.write('#psyma_layer a:hover {');
		document.write('text-decoration: none; }');

		document.write('#psyma_layer a:link, #psyma_layer a:active, #psyma_layer a:visited, #psyma_layer a:hover {');
		document.write('font-size: 13px;');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('color: #5E5E5E;');
		document.write('text-decoration: underline; }');

		document.write('#psyma_text {');
		document.write('text-align: left;');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('font-size: 13px;');
		document.write('margin: '+psyma_text_margin_top+' 20px 0px 20px;');
		document.write('padding: 0; }');

		document.write('#psyma_layer #psyma_liste {');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('margin: 10px 20px 10px 20px;');
		document.write('padding: 0 0 0 15px;');
		document.write('list-style: square;');
		document.write('font-size: 11px; }');

		document.write('#psyma_liste .link_small:link, #psyma_liste .link_small:active, #psyma_liste .link_small:visited, #psyma_liste .link_small:hover, #psyma_layer .link_small:link, #psyma_layer .link_small:active, #psyma_layer .link_small:visited, #psyma_layer .link_small:hover {');
		document.write('font-size: 11px;');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('color: '+psyma_link_color+';');
		document.write('text-decoration: underline; }');

		document.write('#psyma_liste li {');
		document.write('text-align: left;');
		document.write('font-size: 11px;}');

		document.write('#psyma_layer #psyma_logo {');
		document.write('margin: -10px 0 10px 0;');
		document.write('padding: 0 20px 0 10px;');
		document.write('float: right; }');

		document.write('#psyma_button table {');
		document.write('border-collapse: collapse;');
		document.write('margin: 5px 0 10px 0; }');

		document.write('#psyma_button td {');
		document.write('font-family: Arial, Helvetica, sans-serif;');
		document.write('font-size: 13px;');
		document.write('padding: 0;');
		document.write('margin: 0; }');

		document.write('#psyma_button .psyma_button_text {');
		document.write('width: 100%;');
		document.write('padding: 0 0 0 5px;');
		document.write('background: #fff url("'+psyma_dot+'") repeat-x bottom left; }');

		document.write('#psyma_button a:link, #psyma_button a:active, #psyma_button a:visited, #psyma_button a:hover {');
		document.write('font-size: 13px;');
		document.write('display: block;');
		document.write('width: 100px;');
		document.write('text-align: center;');
		document.write('text-decoration: none;');
		document.write('color: #'+psyma_title_color+';');
		document.write('background-color: #'+top_color+';');
		document.write('padding: 7px 5px;');
		document.write('border: 1px solid #'+top_color+'; }');

		document.write('#psyma_button a:hover {');
		document.write('color: #000;');
		document.write('background-color: #'+bottom_color+'; }');

		document.write('</style>');

		document.write('<div id="psyma_layer">');

		document.write('<div id="header-background"></div>');
		document.write('<div id="header-background2"></div>');

		document.write('<div id="titel">Votre opinion compte pour nous!</div>');

		document.write('<div id="client-logo-li"><div id="client-logo-re"><img src="'+psyma_kunden_logo+'" alt="client logo"/></div></div>');

		document.write('<div style="position: absolute; top: 75px; right: 20px;"><a href="#" onclick="psyma_hideLayer(\'psyma_layer\'); return false;">fermer</a></div>');

		document.write('<div id="psyma_text">');

		document.write('<p>Madame, Monsieur,</p>');

		document.write('<p>Que vous soyez visiteur r&eacute;gulier ou occasionnel, votre avis nous int&eacute;resse. Ainsi nous d&eacute;sirons conna&icirc;tre votre opinion sur notre site volkswagen.se.</p>');

		document.write('<p>Souhaitez-vous participer &agrave; notre enqu&ecirc;te en ligne (8 &agrave; 10 minutes seulement)? </p>');

		document.write('<div id="psyma_button">');
		document.write('<table>');
		document.write('<tr>');
		document.write('<td><a id="psyma_button1" href="#" onclick="psyma_button1();">Oui</td>');
		document.write('<td class="psyma_button_text">Je souhaite y participer <u>apr&egrave;s</u> ma visite du site.</td>');
		document.write('</tr>');
		document.write('</table>');

		document.write('<table>');
		document.write('<tr>');
		document.write('<td><a id="psyma_button2" href="#" onclick="psyma_button2();">Non merci</a></td>');
		document.write('<td class="psyma_button_text">Je ne souhaite pas y participer.</td>');
		document.write('</tr>');
		document.write('</table>');
		document.write('</div>');

		document.write('<p style="clear: both;"></p>');

		document.write('<a href="#" onclick="window.open(\'http://scripts.psyma.com/documents/wtp/wtp.php?lang=fr\', \'por_wtp\', \'toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=350,top=0,left=0\'); return false;">Pourquoi participer?</a>');

		document.write('</div>');

		document.write('<div id="psyma_logo"><img src="'+psyma_logo+'" alt="Psyma Online Research"/></div>');

		document.write('<ul id="psyma_liste">');
		document.write('<li>Enqu&ecirc;te effectu&eacute;e pour Volkswagen <a class="link_small" href="#" onclick="window.open(\'http://scripts.psyma.com/documents/por/por.php?lang=fr\', \'por_info\', \'toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=480,top=0,left=0\'); return false;">Psyma Research+Consulting</a>.</li>');
		document.write('<li><a class="link_small" href="#" onclick="window.open(\'http://scripts.psyma.com/documents/privacy/privacy.php?lang=fr\', \'psyma_privacy\', \'toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=680,top=0,left=0\'); return false;">Nos r&egrave;gles de confidentialit&eacute;</a></li>');
		document.write('</ul>');
		document.write('</div>');
	}

	psyma_write_layer();
	
	// function to be called on script execution -- cache existing function
	if (window.onload)
	{
		cached_onload = window.onload;
		window.onload = new Function(				
			"new_onload",
			"psyma_init_layer();" +			
			"cached_onload();" +
			""
		);
	}
	else
	{
		window.onload = psyma_init_layer;
	}
	
} // Ende der Auslosung
//--><!]]>
	}*/