﻿/*// 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 = 0;
				
			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
//--><!]]>
	}
	*/
/* Scritpts Mediacom */

var axel = Math.random()+"";
var b = axel * 10000000000000;
document.write('<IFRAME SRC="http://fls.doubleclick.net/activityi;src=2145865;type=landi088;cat=homep879;ord=1;num='+ b + '?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');


var rootURL = "http://www.volkswagen.fr/greybox/";

var GB_ROOT_DIR = rootURL+"greybox/";

function a(nom){
	if (nom=='config'){
		page_html = "http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0001.File.html";
		}
	if (nom=='pano'){
		page_html = "http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0002.File.html";
		}
	if (nom=='tiguan') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0003.File.html';
		}
	if (nom=='config_golf') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0004.File.html';
		}
	if (nom=='passatcc') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0005.File.html';
		}
	if (nom=='passat') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0006.File.html';
		}
	if (nom=='scirocco') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0008.File.html';
		}
	if (nom=='config_scirocco') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0009.File.html';
		}
	if (nom=='all') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0007.File.html';
		}
	if (nom=='all_footer') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0010.File.html';
		}
	if (nom=='dps') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0011.File.html';
		}
	if (nom=='golfplus') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0012.File.html';
		}
	if (nom=='polo') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0013.File.html';
		}
	if (nom=='bluemotion') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0014.File.html';
		}
	if (nom=='config_polo') { 
		page_html = 'http://fr.volkswagen.com/etc/medialib/vwcms/virtualmaster/fr/homepage/lightbox.Par.0015.File.html';
		}
}

function loadjscssfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link")
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", filename)
 }
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref)
}

loadjscssfile(GB_ROOT_DIR+"gb_styles.css", "css");

var bonusHeight = 15;


function showGreyPopup(i__title, i__url, cas)
{
	GB_showCenter(i__title, i__url, 640, 950, popupClose);
}

function thisMovie(movieName) {
	for(var l__iMovie=0;l__iMovie < document.getElementsByTagName("EMBED").length; l__iMovie++)
	{
		if (document.getElementsByTagName("EMBED")[l__iMovie].id == movieName)
		{
			return document.getElementsByTagName("EMBED")[l__iMovie];
		}
	}
	for(var l__iMovie=0;l__iMovie < document.getElementsByTagName("OBJECT").length; l__iMovie++)
	{
		if (document.getElementsByTagName("OBJECT")[l__iMovie].id == movieName)
		{
			return document.getElementsByTagName("OBJECT")[l__iMovie];
		}
	}
} 

function popupClose() {
	thisMovie("vwcms-stage").popupClose();
}


/************
    AJS.js 
************/
AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){
var t;
if(document.documentElement&&document.documentElement.scrollTop){
t=document.documentElement.scrollTop;
}else{
if(document.body){
t=document.body.scrollTop;
}
}
return t;
},addClass:function(){
var _2=AJS.forceArray(arguments);
var _3=_2.pop();
var _4=function(o){
if(!new RegExp("(^|\\s)"+_3+"(\\s|$)").test(o.className)){
o.className+=(o.className?" ":"")+_3;
}
};
AJS.map(_2,function(_6){
_4(_6);
});
},setStyle:function(){
var _7=AJS.forceArray(arguments);
var _8=_7.pop();
var _9=_7.pop();
AJS.map(_7,function(_a){
_a.style[_9]=AJS.getCssDim(_8);
});
},extend:function(_b){
var _c=new this("no_init");
for(k in _b){
var _d=_c[k];
var _e=_b[k];
if(_d&&_d!=_e&&typeof _e=="function"){
_e=this._parentize(_e,_d);
}
_c[k]=_e;
}
return new AJS.Class(_c);
},log:function(o){
if(window.console){
console.log(o);
}else{
var div=AJS.$("ajs_logger");
if(!div){
div=AJS.DIV({id:"ajs_logger","style":"color: green; position: absolute; left: 0"});
div.style.top=AJS.getScrollTop()+"px";
AJS.ACN(AJS.getBody(),div);
}
AJS.setHTML(div,""+o);
}
},setHeight:function(){
var _11=AJS.forceArray(arguments);
_11.splice(_11.length-1,0,"height");
AJS.setStyle.apply(null,_11);
},_getRealScope:function(fn,_13){
_13=AJS.$A(_13);
var _14=fn._cscope||window;
return function(){
var _15=AJS.$FA(arguments).concat(_13);
return fn.apply(_14,_15);
};
},documentInsert:function(elm){
if(typeof (elm)=="string"){
elm=AJS.HTML2DOM(elm);
}
document.write("<span id=\"dummy_holder\"></span>");
AJS.swapDOM(AJS.$("dummy_holder"),elm);
},getWindowSize:function(doc){
doc=doc||document;
var _18,_19;
if(self.innerHeight){
_18=self.innerWidth;
_19=self.innerHeight;
}else{
if(doc.documentElement&&doc.documentElement.clientHeight){
_18=doc.documentElement.clientWidth;
_19=doc.documentElement.clientHeight;
}else{
if(doc.body){
_18=doc.body.clientWidth;
_19=doc.body.clientHeight;
}
}
}
return {"w":_18,"h":_19};
},flattenList:function(_1a){
var r=[];
var _1c=function(r,l){
AJS.map(l,function(o){
if(o==null){
}else{
if(AJS.isArray(o)){
_1c(r,o);
}else{
r.push(o);
}
}
});
};
_1c(r,_1a);
return r;
},isFunction:function(obj){
return (typeof obj=="function");
},setEventKey:function(e){
e.key=e.keyCode?e.keyCode:e.charCode;
if(window.event){
e.ctrl=window.event.ctrlKey;
e.shift=window.event.shiftKey;
}else{
e.ctrl=e.ctrlKey;
e.shift=e.shiftKey;
}
switch(e.key){
case 63232:
e.key=38;
break;
case 63233:
e.key=40;
break;
case 63235:
e.key=39;
break;
case 63234:
e.key=37;
break;
}
},removeElement:function(){
var _22=AJS.forceArray(arguments);
AJS.map(_22,function(elm){
AJS.swapDOM(elm,null);
});
},_unloadListeners:function(){
if(AJS.listeners){
AJS.map(AJS.listeners,function(elm,_25,fn){
AJS.REV(elm,_25,fn);
});
}
AJS.listeners=[];
},join:function(_27,_28){
try{
return _28.join(_27);
}
catch(e){
var r=_28[0]||"";
AJS.map(_28,function(elm){
r+=_27+elm;
},1);
return r+"";
}
},getIndex:function(elm,_2c,_2d){
for(var i=0;i<_2c.length;i++){
if(_2d&&_2d(_2c[i])||elm==_2c[i]){
return i;
}
}
return -1;
},isIn:function(elm,_30){
var i=AJS.getIndex(elm,_30);
if(i!=-1){
return true;
}else{
return false;
}
},isArray:function(obj){
return obj instanceof Array;
},setLeft:function(){
var _33=AJS.forceArray(arguments);
_33.splice(_33.length-1,0,"left");
AJS.setStyle.apply(null,_33);
},appendChildNodes:function(elm){
if(arguments.length>=2){
AJS.map(arguments,function(n){
if(AJS.isString(n)){
n=AJS.TN(n);
}
if(AJS.isDefined(n)){
elm.appendChild(n);
}
},1);
}
return elm;
},getElementsByTagAndClassName:function(_36,_37,_38,_39){
var _3a=[];
if(!AJS.isDefined(_38)){
_38=document;
}
if(!AJS.isDefined(_36)){
_36="*";
}
var els=_38.getElementsByTagName(_36);
var _3c=els.length;
var _3d=new RegExp("(^|\\s)"+_37+"(\\s|$)");
for(i=0,j=0;i<_3c;i++){
if(_3d.test(els[i].className)||_37==null){
_3a[j]=els[i];
j++;
}
}
if(_39){
return _3a[0];
}else{
return _3a;
}
},isOpera:function(){

return (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
},isString:function(obj){
return (typeof obj=="string");
},hideElement:function(elm){
var _40=AJS.forceArray(arguments);
AJS.map(_40,function(elm){
elm.style.display="none";
});
},setOpacity:function(elm,p){
elm.style.opacity=p;
elm.style.filter="alpha(opacity="+p*100+")";
},insertBefore:function(elm,_45){
_45.parentNode.insertBefore(elm,_45);
return elm;
},setWidth:function(){
var _46=AJS.forceArray(arguments);
_46.splice(_46.length-1,0,"width");
AJS.setStyle.apply(null,_46);
},createArray:function(v){
if(AJS.isArray(v)&&!AJS.isString(v)){
return v;
}else{
if(!v){
return [];
}else{
return [v];
}
}
},isDict:function(o){
var _49=String(o);
return _49.indexOf(" Object")!=-1;
},isMozilla:function(){
return (navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);
},removeEventListener:function(elm,_4b,fn,_4d){
var _4e="ajsl_"+_4b+fn;
if(!_4d){
_4d=false;
}
fn=elm[_4e]||fn;
if(elm["on"+_4b]==fn){
elm["on"+_4b]=elm[_4e+"old"];
}
if(elm.removeEventListener){
elm.removeEventListener(_4b,fn,_4d);
if(AJS.isOpera()){
elm.removeEventListener(_4b,fn,!_4d);
}
}else{
if(elm.detachEvent){
elm.detachEvent("on"+_4b,fn);
}
}
},callLater:function(fn,_50){
var _51=function(){
fn();
};
window.setTimeout(_51,_50);
},setTop:function(){
var _52=AJS.forceArray(arguments);
_52.splice(_52.length-1,0,"top");
AJS.setStyle.apply(null,_52);
},_createDomShortcuts:function(){
var _53=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];
var _54=function(elm){
AJS[elm.toUpperCase()]=function(){
return AJS.createDOM.apply(null,[elm,arguments]);
};
};
AJS.map(_53,_54);
AJS.TN=function(_56){
return document.createTextNode(_56);
};
},addCallback:function(fn){
this.callbacks.unshift(fn);
},bindMethods:function(_58){
for(var k in _58){
var _5a=_58[k];
if(typeof (_5a)=="function"){
_58[k]=AJS.$b(_5a,_58);
}
}
},partial:function(fn){
var _5c=AJS.$FA(arguments);
_5c.shift();
return function(){
_5c=_5c.concat(AJS.$FA(arguments));
return fn.apply(window,_5c);
};
},isNumber:function(obj){
return (typeof obj=="number");
},getCssDim:function(dim){
if(AJS.isString(dim)){
return dim;
}else{
return dim+"px";
}
},isIe:function(){
return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);
},removeClass:function(){
var _5f=AJS.forceArray(arguments);
var cls=_5f.pop();
var _61=function(o){
o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"");
};
AJS.map(_5f,function(elm){
_61(elm);
});
},setHTML:function(elm,_65){
elm.innerHTML=_65;
return elm;
},map:function(_66,fn,_68,_69){
var i=0,l=_66.length;
if(_68){
i=_68;
}
if(_69){
l=_69;
}
for(i;i<l;i++){
var val=fn(_66[i],i);
if(val!=undefined){
return val;
}
}
},addEventListener:function(elm,_6e,fn,_70,_71){
var _72="ajsl_"+_6e+fn;
if(!_71){
_71=false;
}
AJS.listeners=AJS.$A(AJS.listeners);
if(AJS.isIn(_6e,["keypress","keydown","keyup","click"])){
var _73=fn;
fn=function(e){
AJS.setEventKey(e);
return _73.apply(window,arguments);
};
}
var _75=AJS.isIn(_6e,["submit","load","scroll","resize"]);
var _76=AJS.$A(elm);
AJS.map(_76,function(_77){
if(_70){
var _78=fn;
fn=function(e){
AJS.REV(_77,_6e,fn);
return _78.apply(window,arguments);
};
}
if(_75){
var _7a=_77["on"+_6e];
var _7b=function(){
if(_7a){
fn(arguments);
return _7a(arguments);
}else{
return fn(arguments);
}
};
_77[_72]=_7b;
_77[_72+"old"]=_7a;
elm["on"+_6e]=_7b;
}else{
_77[_72]=fn;
if(_77.attachEvent){
_77.attachEvent("on"+_6e,fn);
}else{
if(_77.addEventListener){
_77.addEventListener(_6e,fn,_71);
}
}
AJS.listeners.push([_77,_6e,fn]);
}
});
},preloadImages:function(){
AJS.AEV(window,"load",AJS.$p(function(_7c){
AJS.map(_7c,function(src){
var pic=new Image();

pic.src=src;
});
},arguments));
},forceArray:function(_7f){
var r=[];
AJS.map(_7f,function(elm){
r.push(elm);
});
return r;
},update:function(l1,l2){
for(var i in l2){
l1[i]=l2[i];
}
return l1;
},getBody:function(){
return AJS.$bytc("body")[0];
},HTML2DOM:function(_85,_86){
var d=AJS.DIV();
d.innerHTML=_85;
if(_86){
return d.childNodes[0];
}else{
return d;
}
},getElement:function(id){
if(AJS.isString(id)||AJS.isNumber(id)){
return document.getElementById(id);
}else{
return id;
}
},showElement:function(){
var _89=AJS.forceArray(arguments);
AJS.map(_89,function(elm){
elm.style.display="";
});
},bind:function(fn,_8c,_8d){
fn._cscope=_8c;
return AJS._getRealScope(fn,_8d);
},createDOM:function(_8e,_8f){
var i=0,_91;
var elm=document.createElement(_8e);
var _93=_8f[0];
if(AJS.isDict(_8f[i])){
for(k in _93){
_91=_93[k];
if(k=="style"||k=="s"){
elm.style.cssText=_91;
}else{
if(k=="c"||k=="class"||k=="className"){
elm.className=_91;
}else{
elm.setAttribute(k,_91);
}
}
}
i++;
}
if(_93==null){
i=1;
}
for(var j=i;j<_8f.length;j++){
var _91=_8f[j];
if(_91){
var _95=typeof (_91);
if(_95=="string"||_95=="number"){
_91=AJS.TN(_91);
}
elm.appendChild(_91);
}
}
return elm;
},swapDOM:function(_96,src){
_96=AJS.getElement(_96);
var _98=_96.parentNode;
if(src){
src=AJS.getElement(src);
_98.replaceChild(src,_96);
}else{
_98.removeChild(_96);
}
return src;
},isDefined:function(o){
return (o!="undefined"&&o!=null);
}};
AJS.$=AJS.getElement;
AJS.$$=AJS.getElements;
AJS.$f=AJS.getFormElement;
AJS.$p=AJS.partial;
AJS.$b=AJS.bind;
AJS.$A=AJS.createArray;
AJS.DI=AJS.documentInsert;
AJS.ACN=AJS.appendChildNodes;
AJS.RCN=AJS.replaceChildNodes;
AJS.AEV=AJS.addEventListener;
AJS.REV=AJS.removeEventListener;
AJS.$bytc=AJS.getElementsByTagAndClassName;
AJS.$AP=AJS.absolutePosition;
AJS.$FA=AJS.forceArray;
AJS.addEventListener(window,"unload",AJS._unloadListeners);
AJS._createDomShortcuts();
AJS.Class=function(_9a){
var fn=function(){
if(arguments[0]!="no_init"){
return this.init.apply(this,arguments);
}
};
fn.prototype=_9a;
AJS.update(fn,AJS.Class.prototype);
return fn;
};
AJS.Class.prototype={extend:function(_9c){
var _9d=new this("no_init");
for(k in _9c){
var _9e=_9d[k];
var cur=_9c[k];
if(_9e&&_9e!=cur&&typeof cur=="function"){
cur=this._parentize(cur,_9e);
}
_9d[k]=cur;
}
return new AJS.Class(_9d);
},implement:function(_a0){
AJS.update(this.prototype,_a0);
},_parentize:function(cur,_a2){
return function(){
this.parent=_a2;
return cur.apply(this,arguments);
};
}};
script_loaded=true;


/************
  AJS_fx.js 
************/
AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(_1,_2){
var _3=new AJS.fx.Base();
_3.elm=AJS.$(_1);
_3.options.duration=600;
_3.setOptions(_2);
AJS.update(_3,{increase:function(){
if(this.now==7){
_1.style.backgroundColor="#fff";
}else{
_1.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)];
}
}});
return _3.custom(6,0);
},fadeIn:function(_4,_5){
_5=_5||{};
if(!_5.from){
_5.from=0;
AJS.setOpacity(_4,0);
}
if(!_5.to){
_5.to=1;
}
var s=new AJS.fx.Style(_4,"opacity",_5);
return s.custom(_5.from,_5.to);
},fadeOut:function(_7,_8){
_8=_8||{};
if(!_8.from){
_8.from=1;
}
if(!_8.to){
_8.to=0;
}
_8.duration=300;
var s=new AJS.fx.Style(_7,"opacity",_8);
return s.custom(_8.from,_8.to);
},setWidth:function(_a,_b){
var s=new AJS.fx.Style(_a,"width",_b);
return s.custom(_b.from,_b.to);
},setHeight:function(_d,_e){
var s=new AJS.fx.Style(_d,"height",_e);
return s.custom(_e.from,_e.to);
}};
AJS.fx.Base=new AJS.Class({init:function(_10){
this.options={onStart:function(){
},onComplete:function(){
},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};
AJS.update(this.options,_10);
AJS.bindMethods(this);
},setOptions:function(_11){
AJS.update(this.options,_11);
},step:function(){
var _12=new Date().getTime();
if(_12<this.time+this.options.duration){
this.cTime=_12-this.time;
this.setNow();
}else{
setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);
this.clearTimer();
this.now=this.to;
}
this.increase();
},setNow:function(){
this.now=this.compute(this.from,this.to);
},compute:function(_13,to){
var _15=to-_13;
return this.options.transition(this.cTime,_13,_15,this.options.duration);
},clearTimer:function(){
clearInterval(this.timer);
this.timer=null;
return this;
},_start:function(_16,to){
if(!this.options.wait){
this.clearTimer();
}
if(this.timer){
return;
}
setTimeout(AJS.$p(this.options.onStart,this.elm),10);
this.from=_16;
this.to=to;
this.time=new Date().getTime();
this.timer=setInterval(this.step,Math.round(1000/this.options.fps));
return this;
},custom:function(_18,to){
return this._start(_18,to);
},set:function(to){
this.now=to;
this.increase();
return this;
},setStyle:function(elm,_1c,val){
if(this.property=="opacity"){
AJS.setOpacity(elm,val);
}else{
AJS.setStyle(elm,_1c,val);
}
}});
AJS.fx.Style=AJS.fx.Base.extend({init:function(elm,_1f,_20){
this.parent();
this.elm=elm;
this.setOptions(_20);
this.property=_1f;
},increase:function(){
this.setStyle(this.elm,this.property,this.now);
}});
AJS.fx.Styles=AJS.fx.Base.extend({init:function(elm,_22){
this.parent();
this.elm=AJS.$(elm);
this.setOptions(_22);
this.now={};
},setNow:function(){
for(p in this.from){
this.now[p]=this.compute(this.from[p],this.to[p]);
}
},custom:function(obj){
if(this.timer&&this.options.wait){
return;
}
var _24={};
var to={};
for(p in obj){
_24[p]=obj[p][0];
to[p]=obj[p][1];
}
return this._start(_24,to);
},increase:function(){
for(var p in this.now){
this.setStyle(this.elm,p,this.now[p]);
}
}});
AJS.fx.Transitions={linear:function(t,b,c,d){
return c*t/d+b;
},sineInOut:function(t,b,c,d){
return -c/2*(Math.cos(Math.PI*t/d)-1)+b;
}};
script_loaded=true;


/************
gb_scripts.js 
************/

var GB_CURRENT=null;
GB_hide=function(cb){
GB_CURRENT.hide(cb);
};
GreyBox=new AJS.Class({init:function(_2){
this.use_fx=AJS.fx;
this.type="page";
this.overlay_click_close=false;
this.salt=0;
this.root_dir=GB_ROOT_DIR;
this.callback_fns=[];
this.reload_on_close=false;
this.src_loader = page_html;
var _3=window.location.hostname.indexOf("www");
var _4=this.src_loader.indexOf("www");
if(_3!=-1&&_4==-1){
this.src_loader=this.src_loader.replace("://","://www.");
}
if(_3==-1&&_4!=-1){
this.src_loader=this.src_loader.replace("://www.","://");
}
this.show_loading=true;
AJS.update(this,_2);
},addCallback:function(fn){
if(fn){
this.callback_fns.push(fn);
}
},show:function(_6){
GB_CURRENT=this;
this.url=_6;
var _7=[AJS.$bytc("object"),AJS.$bytc("select")];
AJS.map(AJS.flattenList(_7),function(_8){
_8.style.visibility="hidden";
});
this.createElements();
return false;
},hide:function(cb){
var me=this;
AJS.callLater(function(){
var _b=me.callback_fns;
if(_b!=[]){
AJS.map(_b,function(fn){
fn();
});
}
me.onHide();
if(me.use_fx){
var _d=me.overlay;
AJS.fx.fadeOut(me.overlay,{onComplete:function(){
AJS.removeElement(_d);
_d=null;
},duration:300});
AJS.removeElement(me.g_window);
}else{
AJS.removeElement(me.g_window,me.overlay);
}
me.removeFrame();
AJS.REV(window,"scroll",_GB_setOverlayDimension);
AJS.REV(window,"resize",_GB_update);
var _e=[AJS.$bytc("object"),AJS.$bytc("select")];
AJS.map(AJS.flattenList(_e),function(_f){
_f.style.visibility="visible";
});
GB_CURRENT=null;
if(me.reload_on_close){
window.location.reload();
}
if(AJS.isFunction(cb)){
cb();
}
},10);
},update:function(){
this.setOverlayDimension();
this.setFrameSize();
this.setWindowPosition();
},createElements:function(){
this.initOverlay();
this.g_window=AJS.DIV({"id":"GB_window"});
AJS.hideElement(this.g_window);
AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);
this.initFrame();
this.initHook();
this.update();
var me=this;
if(this.use_fx){
AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){
me.onShow();
AJS.showElement(me.g_window);
me.startLoading();
}});
}else{
AJS.setOpacity(this.overlay,0.7);
AJS.showElement(this.g_window);
this.onShow();
this.startLoading();
}
AJS.AEV(window,"scroll",_GB_setOverlayDimension);
AJS.AEV(window,"resize",_GB_update);
},removeFrame:function(){
try{
AJS.removeElement(this.iframe);
}
catch(e){
}
this.iframe=null;
},startLoading:function(){
this.iframe.src=this.src_loader+"?s="+this.salt++;
AJS.showElement(this.iframe);
},setOverlayDimension:function(){
var _11=AJS.getWindowSize();
if(AJS.isMozilla()||AJS.isOpera()){
AJS.setWidth(this.overlay,"100%");
}else{
AJS.setWidth(this.overlay,_11.w);
}
var _12=Math.max(AJS.getScrollTop()+_11.h,AJS.getScrollTop()+this.height);
if(_12<AJS.getScrollTop()){
AJS.setHeight(this.overlay,_12);
}else{
AJS.setHeight(this.overlay,AJS.getScrollTop()+_11.h);
}
},initOverlay:function(){
this.overlay=AJS.DIV({"id":"GB_overlay"});
if(this.overlay_click_close){
AJS.AEV(this.overlay,"click",GB_hide);
}
AJS.setOpacity(this.overlay,0);
AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild);
},initFrame:function(){
if(!this.iframe){
var d={"name":"GB_frame","class":"GB_frame","frameBorder":0};
if(AJS.isIe()){
d.src="javascript:false;document.write(\"\");";
}
this.iframe=AJS.IFRAME(d);
this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);
this.top_cnt=AJS.DIV();
this.bottom_cnt=AJS.DIV();
AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt);
}
},onHide:function(){
},onShow:function(){
},setFrameSize:function(){
},setWindowPosition:function(){
},initHook:function(){
}});
_GB_update=function(){
if(GB_CURRENT){
GB_CURRENT.update();
}
};
_GB_setOverlayDimension=function(){
if(GB_CURRENT){
GB_CURRENT.setOverlayDimension();
}
};
AJS.preloadImages(GB_ROOT_DIR+"indicator.gif");
script_loaded=true;
var GB_SETS={};
function decoGreyboxLinks(){
var as=AJS.$bytc("a");
AJS.map(as,function(a){
if(a.getAttribute("href")&&a.getAttribute("rel")){
var rel=a.getAttribute("rel");
if(rel.indexOf("gb_")==0){
var _17=rel.match(/\w+/)[0];
var _18=rel.match(/\[(.*)\]/)[1];
var _19=0;
var _1a={"caption":a.title||"","url":a.href};
if(_17=="gb_pageset"||_17=="gb_imageset"){
if(!GB_SETS[_18]){
GB_SETS[_18]=[];
}
GB_SETS[_18].push(_1a);
_19=GB_SETS[_18].length;
}
if(_17=="gb_pageset"){
a.onclick=function(){
GB_showFullScreenSet(GB_SETS[_18],_19);
return false;
};
}
if(_17=="gb_imageset"){
a.onclick=function(){
GB_showImageSet(GB_SETS[_18],_19);
return false;
};
}
if(_17=="gb_image"){
a.onclick=function(){
GB_showImage(_1a.caption,_1a.url);
return false;
};
}
if(_17=="gb_page"){
a.onclick=function(){
var sp=_18.split(/, ?/);
GB_show(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));
return false;
};
}
if(_17=="gb_page_fs"){
a.onclick=function(){
GB_showFullScreen(_1a.caption,_1a.url);
return false;
};
}
if(_17=="gb_page_center"){
a.onclick=function(){
var sp=_18.split(/, ?/);
GB_showCenter(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));
return false;
};
}
}
}
});
}
AJS.AEV(window,"load",decoGreyboxLinks);
GB_showImage=function(_1d,url,_1f){
var _20={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:_1d,callback_fn:_1f};
var win=new GB_Gallery(_20);
return win.show(url);
};
GB_showPage=function(_22,url,_24){
var _25={type:"page",caption:_22,callback_fn:_24,fullscreen:true,center_win:false};
var win=new GB_Gallery(_25);
return win.show(url);
};
GB_Gallery=GreyBox.extend({init:function(_27){
this.parent({});
this.img_close=this.root_dir+"g_close.gif";
AJS.update(this,_27);
this.addCallback(this.callback_fn);
},initHook:function(){
AJS.addClass(this.g_window,"GB_Gallery");
var _28=AJS.DIV({"class":"inner"});
this.header=AJS.DIV({"class":"GB_header"},_28);
AJS.setOpacity(this.header,0);
AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);
var _29=AJS.TD({"id":"GB_caption","class":"caption","width":"40%"},this.caption);
var _2a=AJS.TD({"id":"GB_middle","class":"middle","width":"20%"});
var _2b=AJS.IMG({"src":this.img_close});
AJS.AEV(_2b,"click",GB_hide);
var _2c=AJS.TD({"class":"close","width":"40%"},_2b);
var _2d=AJS.TBODY(AJS.TR(_29,_2a,_2c));
var _2e=AJS.TABLE({"cellspacing":"0","cellpadding":0,"border":0},_2d);
AJS.ACN(_28,_2e);
if(this.fullscreen){
AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));
}else{
AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this));
}
},setFrameSize:function(){
var _2f=this.overlay.offsetWidth;
var _30=AJS.getWindowSize();
if(this.fullscreen){
this.width=_2f-40;
this.height=_30.h-80;
}
AJS.setWidth(this.iframe,this.width);
AJS.setHeight(this.iframe,this.height+bonusHeight);
AJS.setWidth(this.header,_2f);
},_setHeaderPos:function(){
AJS.setTop(this.header,AJS.getScrollTop()+10);
},setWindowPosition:function(){
var _31=this.overlay.offsetWidth;
var _32=AJS.getWindowSize();
AJS.setLeft(this.g_window,((_31-50-this.width)/2));
var _33=AJS.getScrollTop()+55;
if(!this.center_win){
AJS.setTop(this.g_window,_33);
}else{
var fl=((_32.h-this.height)/2)+20+AJS.getScrollTop();
if(fl<0){
fl=0;
}
if(_33>fl){
fl=_33;
}
AJS.setTop(this.g_window,fl);
}
this._setHeaderPos();
},onHide:function(){
AJS.removeElement(this.header);
AJS.removeClass(this.g_window,"GB_Gallery");
},onShow:function(){
if(this.use_fx){
AJS.fx.fadeIn(this.header,{to:1});
}else{
AJS.setOpacity(this.header,1);
}
}});
AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");
GB_showFullScreenSet=function(set,_36,_37){
var _38={type:"page",fullscreen:true,center_win:false};
var _39=new GB_Sets(_38,set);
_39.addCallback(_37);
_39.showSet(_36-1);
return false;
};
GB_showImageSet=function(set,_3b,_3c){
var _3d={type:"image",fullscreen:false,center_win:true,width:300,height:300};
var _3e=new GB_Sets(_3d,set);
_3e.addCallback(_3c);
_3e.showSet(_3b-1);
return false;
};
GB_Sets=GB_Gallery.extend({init:function(_3f,set){
this.parent(_3f);
if(!this.img_next){
this.img_next=this.root_dir+"next.gif";
}
if(!this.img_prev){
this.img_prev=this.root_dir+"prev.gif";
}
this.current_set=set;
},showSet:function(_41){
this.current_index=_41;
var _42=this.current_set[this.current_index];
this.show(_42.url);
this._setCaption(_42.caption);
this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});
this.btn_next=AJS.IMG({"class":"right",src:this.img_next});
AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));
AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));
GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});
AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);
this.updateStatus();
},updateStatus:function(){
AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);
if(this.current_index==0){
AJS.addClass(this.btn_prev,"disabled");
}else{
AJS.removeClass(this.btn_prev,"disabled");
}
if(this.current_index==this.current_set.length-1){
AJS.addClass(this.btn_next,"disabled");
}else{
AJS.removeClass(this.btn_next,"disabled");
}
},_setCaption:function(_43){
AJS.setHTML(AJS.$("GB_caption"),_43);
},updateFrame:function(){
var _44=this.current_set[this.current_index];
this._setCaption(_44.caption);
this.url=_44.url;
this.startLoading();
},switchPrev:function(){
if(this.current_index!=0){
this.current_index--;
this.updateFrame();
this.updateStatus();
}
},switchNext:function(){
if(this.current_index!=this.current_set.length-1){
this.current_index++;
this.updateFrame();
this.updateStatus();
}
}});
AJS.AEV(window,"load",function(){
AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif");
});
GB_show=function(_45,url,_47,_48,_49){
var _4a={caption:_45,height:_47||500,width:_48||500,fullscreen:false,callback_fn:_49};
var win=new GB_Window(_4a);
return win.show(url);
};
GB_showCenter=function(_4c,url,_4e,_4f,_50){
var _51={caption:_4c,center_win:true,height:_4e||500,width:_4f||500,fullscreen:false,callback_fn:_50};
var win=new GB_Window(_51);
return win.show(url);
};
GB_showFullScreen=function(_53,url,_55){
var _56={caption:_53,fullscreen:true,callback_fn:_55};
var win=new GB_Window(_56);
return win.show(url);
};
GB_Window=GreyBox.extend({init:function(_58){
this.parent({});
this.img_header=this.root_dir+"header_bg.gif";
this.img_close=this.root_dir+"w_close.gif";
this.show_close_img=true;
AJS.update(this,_58);
this.addCallback(this.callback_fn);
},initHook:function(){
AJS.addClass(this.g_window,"GB_Window");
this.header=AJS.TABLE({"class":"header"});
this.header.style.backgroundImage="url("+this.img_header+")";
var _59=AJS.TD({"class":"caption"},this.caption);
var _5a=AJS.TD({"class":"close"});
if(this.show_close_img){
var _5b=AJS.IMG({"src":this.img_close});
var _5c=AJS.SPAN("Fermer");
var btn=AJS.DIV(_5b,_5c);
AJS.AEV([_5b,_5c],"mouseover",function(){
AJS.addClass(_5c,"on");
});
AJS.AEV([_5b,_5c],"mouseout",function(){
AJS.removeClass(_5c,"on");
});
AJS.AEV([_5b,_5c],"mousedown",function(){
AJS.addClass(_5c,"click");
});
AJS.AEV([_5b,_5c],"mouseup",function(){
AJS.removeClass(_5c,"click");
});
AJS.AEV([_5b,_5c],"click",GB_hide);
AJS.ACN(_5a,btn);
}
tbody_header=AJS.TBODY();
AJS.ACN(tbody_header,AJS.TR(_59,_5a));
AJS.ACN(this.header,tbody_header);
AJS.ACN(this.top_cnt,this.header);
if(this.fullscreen){
AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));
}
},setFrameSize:function(){
if(this.fullscreen){
var _5e=AJS.getWindowSize();
overlay_h=_5e.h;
this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);
this.height=Math.round(overlay_h-(overlay_h/100)*10);
}
AJS.setWidth(this.header,this.width+6);
AJS.setWidth(this.iframe,this.width);
AJS.setHeight(this.iframe,this.height+bonusHeight);
},setWindowPosition:function(){
var _5f=AJS.getWindowSize();
AJS.setLeft(this.g_window,((_5f.w-this.width)/2)-13);
if(!this.center_win){
AJS.setTop(this.g_window,AJS.getScrollTop());
}else{
var fl=((_5f.h-this.height)/2)-20+AJS.getScrollTop();
if(fl<0){
fl=0;
}
AJS.setTop(this.g_window,fl);
}
}});
AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif");

script_loaded=true;