/* Javascript - HK Institut  */

function creatediv(id, html) 
{ 
    if ($(id)==null)
    {
       var newdiv = document.createElement('div');
       newdiv.setAttribute('id', id);
       newdiv.style.display = "none";
       newdiv.setAttribute('class', 'layer');

	   $Pi$('div','content')[0].appendChild(newdiv);
	   $Pi(id).className = 'layer';
        
      if (html) {
           newdiv.innerHTML = html;
       } else {
           newdiv.innerHTML = "";
       }
    }
    else
    {
        $(id).innerHTML = html;
    }              
} 

function sendToAFriend(pageid, baseUrl)
{
     var html = '<img id="LayerSendFriendCloser" src="'+baseUrl+'/Site/includes/images/btns/close.gif" style="cursor:hand;" class="closer" onclick="$(\'LayerSendFriend\').hide(); endRescueFrame();" alt="Fermer" />';
     html += '<div class="title" id="LayerSendFriendTitle">Envoyer &agrave; un ami</div>';
     html += '<div class="text" id="LayerSendFriendTexte">Afin d\'envoyer cette page &agrave; un ami, veuillez remplir les champs ci-dessous : ';
     html += '<br/><br/>Votre email* : <input type="text" id="LayerSendFriend_MyEmail" value=""  />';
     html += '<br/><br/>Email ami 1* : <input type="text" id="LayerSendFriend_Email1" value=""  />';
     html += '<br/><br/>Email ami 2 : <input type="text" id="LayerSendFriend_Email2" value=""  />';
     html += '<br/><br/>Email ami 3 : <input type="text" id="LayerSendFriend_Email3" value=""  /><br/>';
     html += '<i>*Champs obligatoires</i>';
     html += '<br/><br/>';
     html += '<img id="LayerSendFriend_Annule" src="'+baseUrl+'/Site/includes/images/btns/annuler-layer.gif" style="cursor:hand;"  onclick="$(\'LayerSendFriend\').hide(); endRescueFrame();" alt="Fermer" />';
     html += '&nbsp;&nbsp;&nbsp;';
     html += '<img id="LayerSendFriend_Valid" src="'+baseUrl+'/Site/includes/images/btns/valider-layer.gif" style="cursor:hand;"  onclick="sendFriendAjax(\''+ pageid + '\',\'' + baseUrl + '\');" alt="Valider" />';
     html += '<div id="LayerSendFriend_DivAttente" style="DISPLAY:none">Traitement en cours. Veuillez patienter...&nbsp;<img src="'+baseUrl+'/Site/includes/images/picto/indicator.gif" alt="Veuillez patienter" />&nbsp;&nbsp;</div>';
     html += '</div>';
     creatediv('LayerSendFriend', html)
     $('LayerSendFriend').show();
}

function sendFriendAjax(pageid,baseUrl)
{
    var erreur = 0;

    // CHAMPS EMAIL	    
	if($("LayerSendFriend_MyEmail") && $("LayerSendFriend_MyEmail").value == "")
	{						
	    alert('Votre email est obligatoire !');
//		$("alert_LayerSendFriend_MyEmail").style.display = 'inline';
		$("LayerSendFriend_MyEmail").focus();
		erreur++;								
	}
	else
	{
		if($("LayerSendFriend_MyEmail").value.match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/))
		{
//			$("alert_LayerSendFriend_MyEmail").style.display = 'none';
		}
		else
		{	
//			$("alert_LayerSendFriend_MyEmail").style.display = 'inline';
            alert('Veuillez saisir pour votre email une adresse correcte !');
			$("LayerSendFriend_MyEmail").focus();
			erreur++;
		}
	}
	
	if($("LayerSendFriend_Email1") && $("LayerSendFriend_Email1").value == "")
	{						
	    alert('L\'adresse email de votre ami(e) est obligatoire !');
//		$("alert_LayerSendFriend_MyEmail").style.display = 'inline';
		$("LayerSendFriend_Email1").focus();
		erreur++;								
	}
	else
	{
	    if (($("LayerSendFriend_Email1").value.match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/)) || ($("LayerSendFriend_Email1").value==''))
		{}
		else
		{
		    alert('Veuillez saisir pour votre ami(e) 1 une adresse correcte !');
	        erreur++;
		}
    }
		
	if (($("LayerSendFriend_Email2").value.match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/)) || ($("LayerSendFriend_Email2").value==''))
		{}
		else
		{
		    alert('Veuillez saisir pour votre ami(e) 2 une adresse correcte !');
		    erreur++;
		}

	if (($("LayerSendFriend_Email3").value.match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/)) || ($("LayerSendFriend_Email3").value==''))
		{}
		else
		{
		    alert('Veuillez saisir pour votre ami(e) 3 une adresse correcte !');
		    erreur++;
		}			
	
    // Si aucune erreur, la page peut-être envoyer
	if(erreur == 0)
	{
        // Bloque le bouton le temps du traitement
        $("LayerSendFriend_DivAttente").style.display = 'block'; 
                
	    var data = $H({ 'CMD'            : 'SEND_PAGE_FRIENDS',
	                    'EMAIL'          : $F("LayerSendFriend_MyEmail"),
	                    'EMAIL1'         : $F("LayerSendFriend_Email1"),
	                    'EMAIL2'         : $F("LayerSendFriend_Email2"),
	                    'EMAIL3'         : $F("LayerSendFriend_Email3"),
	                    'PAGEID'         : pageid }).toQueryString();	
                                        	        	                        	      	                   
	    var path = baseUrl + '/Site/includes/Ajax/AjaxFormulaire.aspx';
	    var DoAjax = new Ajax.Updater( 'LayerSendFriend_AjaxFluxReponse' , path, { postBody: data , evalScripts:true } );        
		
		return true;
    }
	return false;
}


function Rechercher(urlBase)
{
    if($('TXT_SEARCH').value.length < 3)
        $('MessErreurRecherche').show();        
    else
    {
        $('MessErreurRecherche').hide();
        document.location = urlBase + '/Recherche/resultats-de-recherche_' + $('TXT_SEARCH').value + '.html';    
    }
}

/***** Sommaire *****/
// 10 - rollImg
// 20 - Write Flash
// 30 - Brands
// 40 - Innovations
// 50 - Field cleaner
// 60 - Tabs
// 70 - Layers
// 80 - Popup
// 85 - rescueFrame
// 99 - onLoad
/***** ********* *****/

/***** 10 - rollImg *****/
var onAdd="-on";
function autoRoll(Img,Event){
	if(!Img.onmouseout && Event == true) Img.onmouseout = function(){ autoRoll(Img) };
	imgExt = Img.src.substring(Img.src.lastIndexOf("."));
	imgName = Img.src.substring(0,Img.src.lastIndexOf("."));
	imgOn = imgName+onAdd+imgExt;
	if(imgName.indexOf(onAdd) != -1) imgName = imgName.substring(0,imgName.length-onAdd.length);
	imgOff = imgName+imgExt;
	if(Img.src.indexOf(onAdd) != -1) Img.src = imgOff;
	else Img.src = imgOn;
}

function autoRollEvents(){
	var imgTable = arguments[0].getElementsByTagName('img');
	for(var i=0; i<imgTable.length; i++){
		if(imgTable[i].src.indexOf(onAdd) == -1) imgTable[i].onmouseover = function(){autoRoll(this,true)};
	}
}

/***** 20 - Write Flash *****/
function writeFlash(url,id,w,h,o){
	var ch = "";
	ch += '\n<object id="'+id+'" type="application/x-shockwave-flash" data="'+url+'" width="'+w+'" height="'+h+'">\n';
	ch += '\t<param name="movie" value="'+url+'" />\n';
	if(o != ''){
		var flashOptionsTab = new Array();
		flashOptionsTab = o.split('|');
		for(i=0; i<flashOptionsTab.length; i++){
			var tempParam = flashOptionsTab[i].split('#')[0];
			var tempValue = flashOptionsTab[i].split('#')[1];
			ch += '\t<param name="'+tempParam+'" value="'+tempValue+'" />\n';
		}
	}
	ch += '</object>\n';
	document.write(ch);
}

/***** 30 - Brands *****/
brands = new Array();
function brand(id,media,text,link,url){
	this.id = id;
	this.media = media;
	this.text = text;
	this.link = link;
	this.url = url;
	brands[brands.length] = this;
}

function brandsSlideBuilder(){
	var brandsSlideCh = '<div class="brandsSlide">';
	for(var i=0; i<brands.length; i++){
		brandsSlideCh += '<img src="'+brands[i].media+'" alt="'+brands[i].url+'" />';
	}
	brandsSlideCh += '</div>';
	$Pi$('div','brandsMedia')[0].innerHTML = brandsSlideCh;
}

var brandSlideInterval;
var isFirstBrand = true;
var lastBrand = 0;
function showBrand(id){
	// Si une seule marque
	if(brands.length == 1){
		$Pi$('div','brandsSlide')[0].style.left = '37px';
	} else {
	// Sinon
		if(isFirstBrand == true){
			id = (brands.length/2);
			$Pi$('div','brandsSlide')[0].style.left = ((-(brands.length/2)*100)+37)+'px';
			// Ajout des liens de navigation
			$Pi$('div','brandsSwitcher')[0].innerHTML += '\t<a class="brandsPrev" href="javascript:showBrand('+(brands.length-1)+');"></a><a class="brandsNext" href="javascript:showBrand(1);"></a>\n';
			isFirstBrand = false;
		} else {
			// Si bouclage en cours
			if(Math.abs(lastBrand-id) > 1){
				if(id > lastBrand){
					$Pi$('div','brandsSlide')[0].style.left = ((-(id)*100)-63)+'px';
					var targetOffest = ((-(id-1)*100)-63);
				} else {
					$Pi$('div','brandsSlide')[0].style.left = ((-(id-2)*100)-63)+'px';
					var targetOffest = ((-(id-1)*100)-63);
				}
			} else {
				if(id > lastBrand){
					var targetOffest = ((-(id-1)*100)-63);
				} else {
					var targetOffest = ((-(id-1)*100)-63);
				}
			}
			clearInterval(brandSlideInterval);
			brandSlideInterval = setInterval('slideBrand('+targetOffest+');',25);
		}
	}
	
	// Mise à jour des textes et des liens de navigation
	var prevId = (id == 1)? (brands.length/2) : id-1;
	var nextId = (id == (brands.length-2))? ((brands.length/2)-1) : id+1;
	
	$Pi$('div','brandsText')[0].innerHTML = brands[id].text;
	$Pi$('div','brandsLink')[0].innerHTML = '<a href="'+brands[id].url+'" target="_blank">'+brands[id].link+'</a>';
	$Pi$('div','brandsMask')[0].getElementsByTagName('a')[0].href = brands[id].url;
	
	if(brands.length > 1){
		$Pi$('a','brandsPrev')[0].href = 'javascript:showBrand('+prevId+');';
		$Pi$('a','brandsNext')[0].href = 'javascript:showBrand('+nextId+');';
	}
	
	lastBrand = id;
}

function slideBrand(offset){
	var currentOffset = parseInt($Pi$('div','brandsSlide')[0].style.left);
	if(currentOffset < offset){
		$Pi$('div','brandsSlide')[0].style.left = (currentOffset+10)+'px';
	} else if(currentOffset > offset){
		$Pi$('div','brandsSlide')[0].style.left = (currentOffset-10)+'px';
	} else {
		clearInterval(brandSlideInterval);
	}
}

/***** 40 - Innovations *****/
var innovations = new Array();
function innovation(id){
	this.id = id;
	innovations[innovations.length] = this;
}

var lastInnovation = -1;
function showInnovation(id){
	if(lastInnovation != -1){
		hideInnovation(lastInnovation);
	}
	// Affichage de l'innovation
	$Pi$('div','innovation')[id].style.display = 'block';
	// Mise à jour des liens de navigation
	if(innovations.length > 1){
		$Pi$('a','innovationPrev')[0].href = 'javascript:showInnovation('+(id-1)+');';
		$Pi$('a','innovationNext')[0].href = 'javascript:showInnovation('+(id+1)+');';
		$Pi$('a','innovationPrev')[0].style.display = (id == 0)? 'none' : '';
		$Pi$('a','innovationNext')[0].style.display = (id == (innovations.length-1))? 'none' : '';
	} else {
		$Pi$('a','innovationPrev')[0].style.display = 'none';
		$Pi$('a','innovationNext')[0].style.display = 'none';
	}
	lastInnovation = id;
}
function hideInnovation(id){
	$Pi$('div','innovation')[id].style.display = 'none';
	lastInnovation = -1;
}

/***** 50 - Field cleaner *****/
function fieldCleaner(field,message){
	if(field.value == message){
		field.value = '';
	}
}

/***** 60 - Tabs *****/
var defaultTab = -1;
var lastTab = -1;
var lastTabs = -1;
function showTab(id,index){
	if(lastTab != -1){
		hideTab(lastTabs,lastTab);
	}
	$PiS('add',$Pi(id+'Tab'+index),'tabOn');
	autoRoll($Pi(id+'Nav','img',index),false);
	lastTab = index;
	lastTabs = id;
}
function hideTab(id,index){
	$PiS('del',$Pi(id+'Tab'+index),'tabOn');
	autoRoll($Pi(id+'Nav','img',index),false);
	lastTab = -1;
	lastTabs = -1;
}

/***** 80 - Popup *****/
function popThis(url,nom,isCenter,w,h,o){
	if(isCenter){	
		var popHPos = (screen.availWidth/2)-(w/2);
		var popVPos = (screen.availHeight/2)-(h/2);
		pop = window.open(url,nom,'width='+w+',height='+h+',top='+popVPos+',left='+popHPos+','+o);
	} else {	
		pop = window.open(url,nom,'width='+w+',height='+h+','+o);
	}
	pop.focus();
}

/***** 85 - rescueFrame *****/
function rescueFrame(){
	if(isIE && !isIE7){		
		if(!$Pi('rescueFrame')){
			var rescueObj = document.createElement('iframe');
			var rescueElement = (!$Pi('contentForm'))? document.body.appendChild(rescueObj) : $Pi('contentForm').appendChild(rescueObj);
			rescueElement.id = 'rescueFrame';
			rescueElement.style.position = 'absolute';
			rescueElement.style.display = 'none';
			rescueElement.style.border = '0';
			rescueElement.style.filter = 'alpha(opacity=0);';
		}
		
		$Pi('rescueFrame').style.zIndex = (typeof arguments[1] == 'number')? arguments[1] : $PiZ(arguments[1])+1;
		$Pi('rescueFrame').style.top = (!$Pi('contentForm'))? $PiC('y',arguments[0])+'px' : arguments[0].offsetTop+'px';
		$Pi('rescueFrame').style.left = (!$Pi('contentForm'))? $PiC('x',arguments[0])+'px' : arguments[0].offsetLeft+'px';
		if(arguments[0].id == 'dhtmltooltip'){
			$Pi('rescueFrame').style.top = ($Pi('rescueFrame').offsetTop-$PiC('y',$Pi('contentForm')))+'px';
			$Pi('rescueFrame').style.left = ($Pi('rescueFrame').offsetLeft-$PiC('x',$Pi('contentForm')))+'px';
		}
		$Pi('rescueFrame').style.width = arguments[0].offsetWidth+'px'; 
		$Pi('rescueFrame').style.height = arguments[0].offsetHeight+'px'; 
		$Pi('rescueFrame').style.display = 'block';
	}
}
function endRescueFrame(){
	if(isIE && !isIE7 && $Pi('rescueFrame')){	
		$Pi('rescueFrame').style.display = 'none';
		$Pi('rescueFrame').style.left = '-9999px';
		$Pi('rescueFrame').style.top = '-9999px';
	}
}

/***** 99 - onLoad *****/
window.onload = function(){
	// 10 - rollImg
	if($Pi$('div','navTop')[0]){
		autoRollEvents($Pi$('div','navTop')[0]);
	}
	
	// 30 - Brands
	if($Pi$('select','quickBrand')[0]){
		$Pi$('select','quickBrand')[0].onchange = function(){ if(this.value != 00){ window.open(this.value); }}
	}
	
	if($Pi$('div','brand').length > 0){
		// Créatino des objets
		var brandTab = $Pi$('div','brand');
		// X1
		for(var i=0; i<brandTab.length; i++){
		
		    if (brandTab[i].getElementsByTagName('img')[0] != null)
			    var tempMedia = brandTab[i].getElementsByTagName('img')[0].src;
			else
			    var tempMedia = '';
			
			var tempText = brandTab[i].getElementsByTagName('p')[0].innerHTML;
			var tempLink = brandTab[i].getElementsByTagName('a')[0].innerHTML;
			var tempUrl = brandTab[i].getElementsByTagName('a')[0].href;
			new brand(i,tempMedia,tempText,tempLink,tempUrl);
		}
		// Duplicata si plus d'une marque pour bouclage
		if(brandTab.length > 1){
			// X2
			for(var i=0; i<brandTab.length; i++){
			
		    if (brandTab[i].getElementsByTagName('img')[0] != null)
				var tempMedia = brandTab[i].getElementsByTagName('img')[0].src;
			else
			    var tempMedia = '';
			    
				var tempText = brandTab[i].getElementsByTagName('p')[0].innerHTML;
				var tempLink = brandTab[i].getElementsByTagName('a')[0].innerHTML;
				var tempUrl = brandTab[i].getElementsByTagName('a')[0].href;
				new brand(i,tempMedia,tempText,tempLink,tempUrl);
			}
		}
		// Slide builder
		brandsSlideBuilder();
		// First switch
		showBrand(0);
	}
	
	// 40 - innovations
	if($Pi$('div','innovation').length > 0){
		var innovationsTab = $Pi$('div','innovation');
		for(var i=0; i<innovationsTab.length; i++){
			new innovation(i);
		}
		showInnovation(0);
	}
	
	// 60 - Tabs
	if($Pi$('div','tabs').length > 0){
		var tabsTab = $Pi$('div','tabs');
		for(var i=0; i<tabsTab.length; i++){
			// IDs
			tabsTab[i].id = 'tabs'+i;
			$Pi('tabs'+i,'div',0).id = 'tabs'+i+'Nav';
		}
	}
	if($Pi$('div','tab').length > 0){
		var tabTab = $Pi$('div','tab');
		for(var i=0; i<tabTab.length; i++){
			tabTab[i].id = tabTab[i].parentNode.id+'Tab'+i;
			tabNavCh = '<a href="javascript:showTab(\''+tabTab[i].parentNode.id+'\','+i+');"><img src="'+$Pi(tabTab[i].parentNode.id+'Tab'+i,'h2',0,'img',0).src+'" alt="" /></a>\n';
			$Pi(tabTab[i].parentNode.id+'Nav').innerHTML += tabNavCh;
		}
		if(defaultTab != -1){
			showTab('tabs0',defaultTab);
		}
	}

}

function ecrirePlayer(urlbase,flv,titre,isAutoPlay) {

    var so = new SWFObject(urlbase+"/Site/includes/swf/player.swf", "heinekenVideo", 440, 315, 7, "#ffffff");
    so.addParam("wmode", "transparent");
    so.addVariable("monFLV", flv);
    so.addVariable("monTITRE", titre);
	if (isAutoPlay) so.addVariable("startAuto", isAutoPlay);
    so.write("layerPlayer");
    
}

function tgvideoGo(urlbase, flv, titre, isAutoPlay) {
    document.getElementById('layer').style.display = document.getElementById('layerPlayer').style.display = "block";
    ecrirePlayer(urlbase, flv, titre, isAutoPlay);
}

function tgvideoEnd() {
    document.getElementById('layer').style.display = document.getElementById('layerPlayer').style.display = "none";
    document.getElementById('layerPlayer').innerHTML = "";
}

function changeDaf(dafy) {
    document.getElementById('dafRed').style.display = document.getElementById('dafGreen').style.display = document.getElementById('dafBlue').style.display = "none";
    document.getElementById(dafy).style.display = "block";
}

//if (typeof deconcept == "undefined") { var deconcept = new Object(); } if (typeof deconcept.util == "undefined") { deconcept.util = new Object(); } if (typeof deconcept.SWFObjectUtil == "undefined") { deconcept.SWFObjectUtil = new Object(); } deconcept.SWFObject = function(_1, id, w, h, _5, c, _7, _8, _9, _a) { if (!document.getElementById) { return; } this.DETECT_KEY = _a ? _a : "detectflash"; this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if (_1) { this.setAttribute("swf", _1); } if (id) { this.setAttribute("id", id); } if (w) { this.setAttribute("width", w); } if (h) { this.setAttribute("height", h); } if (_5) { this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split("."))); } this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); if (!window.opera && document.all && this.installedVer.major > 7) { deconcept.SWFObject.doPrepUnload = true; } if (c) { this.addParam("bgcolor", c); } var q = _7 ? _7 : "high"; this.addParam("quality", q); this.setAttribute("useExpressInstall", false); this.setAttribute("doExpressInstall", false); var _c = (_8) ? _8 : window.location; this.setAttribute("xiRedirectUrl", _c); this.setAttribute("redirectUrl", ""); if (_9) { this.setAttribute("redirectUrl", _9); } }; deconcept.SWFObject.prototype = { useExpressInstall: function(_d) { this.xiSWFPath = !_d ? "expressinstall.swf" : _d; this.setAttribute("useExpressInstall", true); }, setAttribute: function(_e, _f) { this.attributes[_e] = _f; }, getAttribute: function(_10) { return this.attributes[_10]; }, addParam: function(_11, _12) { this.params[_11] = _12; }, getParams: function() { return this.params; }, addVariable: function(_13, _14) { this.variables[_13] = _14; }, getVariable: function(_15) { return this.variables[_15]; }, getVariables: function() { return this.variables; }, getVariablePairs: function() { var _16 = new Array(); var key; var _18 = this.getVariables(); for (key in _18) { _16[_16.length] = key + "=" + _18[key]; } return _16; }, getSWFHTML: function() { var _19 = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\""; _19 += " id=\"" + this.getAttribute("id") + "\" name=\"" + this.getAttribute("id") + "\" "; var _1a = this.getParams(); for (var key in _1a) { _19 += [key] + "=\"" + _1a[key] + "\" "; } var _1c = this.getVariablePairs().join("&"); if (_1c.length > 0) { _19 += "flashvars=\"" + _1c + "\""; } _19 += "/>"; } else { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<object id=\"" + this.getAttribute("id") + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\">"; _19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />"; var _1d = this.getParams(); for (var key in _1d) { _19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />"; } var _1f = this.getVariablePairs().join("&"); if (_1f.length > 0) { _19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />"; } _19 += "</object>"; } return _19; }, write: function(_20) { if (this.getAttribute("useExpressInstall")) { var _21 = new deconcept.PlayerVersion([6, 0, 65]); if (this.installedVer.versionIsValid(_21) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { this.setAttribute("doExpressInstall", true); this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { var n = (typeof _20 == "string") ? document.getElementById(_20) : _20; n.innerHTML = this.getSWFHTML(); return true; } else { if (this.getAttribute("redirectUrl") != "") { document.location.replace(this.getAttribute("redirectUrl")); } } return false; } }; deconcept.SWFObjectUtil.getPlayerVersion = function() { var _23 = new deconcept.PlayerVersion([0, 0, 0]); if (navigator.plugins && navigator.mimeTypes.length) { var x = navigator.plugins["Shockwave Flash"]; if (x && x.description) { _23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } } else { if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) { var axo = 1; var _26 = 3; while (axo) { try { _26++; axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + _26); _23 = new deconcept.PlayerVersion([_26, 0, 0]); } catch (e) { axo = null; } } } else { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch (e) { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23 = new deconcept.PlayerVersion([6, 0, 21]); axo.AllowScriptAccess = "always"; } catch (e) { if (_23.major == 6) { return _23; } } try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch (e) { } } if (axo != null) { _23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); } } } return _23; }; deconcept.PlayerVersion = function(_29) { this.major = _29[0] != null ? parseInt(_29[0]) : 0; this.minor = _29[1] != null ? parseInt(_29[1]) : 0; this.rev = _29[2] != null ? parseInt(_29[2]) : 0; }; deconcept.PlayerVersion.prototype.versionIsValid = function(fv) { if (this.major < fv.major) { return false; } if (this.major > fv.major) { return true; } if (this.minor < fv.minor) { return false; } if (this.minor > fv.minor) { return true; } if (this.rev < fv.rev) { return false; } return true; }; deconcept.util = { getRequestParameter: function(_2b) { var q = document.location.search || document.location.hash; if (_2b == null) { return q; } if (q) { var _2d = q.substring(1).split("&"); for (var i = 0; i < _2d.length; i++) { if (_2d[i].substring(0, _2d[i].indexOf("=")) == _2b) { return _2d[i].substring((_2d[i].indexOf("=") + 1)); } } } return ""; } }; deconcept.SWFObjectUtil.cleanupSWFs = function() { var _2f = document.getElementsByTagName("OBJECT"); for (var i = _2f.length - 1; i >= 0; i--) { _2f[i].style.display = "none"; for (var x in _2f[i]) { if (typeof _2f[i][x] == "function") { _2f[i][x] = function() { }; } } } }; if (deconcept.SWFObject.doPrepUnload) { if (!deconcept.unloadSet) { deconcept.SWFObjectUtil.prepUnload = function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { }; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); }; window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); deconcept.unloadSet = true; } } if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }; } var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; var SWFObject = deconcept.SWFObject;