//:: Configuration :://
_URL='http://www.fckb.fr/';


//:: Tester navigateur :://
var agt=navigator.userAgent.toLowerCase();
var appVer=navigator.appVersion.toLowerCase();
var is_opera=(agt.indexOf("opera")!=-1);
var is_mac=(agt.indexOf("mac")!=-1);
var is_konq=(agt.indexOf('konqueror')!=-1);
var is_safari=((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
var is_khtml=(is_safari||is_konq);
var is_gecko=((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
var is_fb=((agt.indexOf('mozilla/5')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1)&&(is_gecko)&&(navigator.vendor=="Firebird"));
var is_fx=((agt.indexOf('mozilla/5')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1)&&(is_gecko)&&((navigator.vendor=="Firefox")||(agt.indexOf('firefox')!=-1)));
var is_moz=((agt.indexOf('mozilla/5')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1)&&(is_gecko)&&(!is_fb)&&(!is_fx)&&((navigator.vendor=="")||(navigator.vendor=="Mozilla")||(navigator.vendor=="Debian")));
var is_nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1)&&(!is_khtml)&&(!(is_moz))&&(!is_fb)&&(!is_fx));
var is_ie=((appVer.indexOf('msie')!=-1)&&(!is_opera)&&(!is_khtml));
var is_ie7=((appVer.indexOf('msie 7.0')!=-1)&&(!is_opera)&&(!is_khtml));


var fenetreConnexionOuverte=0;



// Règles
var myrules = {
	/* ---- Panneau navigation mobile */
	'#navigationOuvrir' : function(element){
		element.onclick = function(){
			var targetDiv = $('utils');
			
			new Effect.BlindDown(targetDiv,{duration: 0.5});
			new Effect.Fade(this);
			Effect.Appear('navigationFermer', {delay: 1});		}
	},
	'#navigationFermer' : function(element){
		element.onclick = function(){
			var targetDiv = $('utils');
			
			new Effect.BlindUp(targetDiv,{duration: 0.5});
			new Effect.Fade(this); 
			Effect.Appear('navigationOuvrir', {delay: 1});
		}
	},
	/* ---- Changement de background ---- */
	'#bg3' : function(element){
		element.onclick = function(){
			changerWallpaper('bg7.jpg', 3);
		}
	},
	'#bg2' : function(element){
		element.onclick = function(){
			changerWallpaper('bg9.jpg', 2);
		}
	},
	'#bg1' : function(element){
		element.onclick = function(){
			changerWallpaper('bg5.jpg', 1);
		}
	},
	/* ---- Système de connexion ---- */
	'#lien_header' : function(element){
		element.onclick = function(){
			afficherConnexion();
		}
	},
	'#closeConnexion' : function(element){
		element.onclick = function(){
			fermerConnexion();
		}
	}
};
Behaviour.register(myrules);

/* ---- Effets css inexistants pour IE */
/*if (is_ie) {
	var myrulesIe = {
		'.ancillary img' : function(element){
			element.onmouseover = function(){
				this.style.backgroundColor="#00A8FF";
			},
			element.onmouseout = function(){
				this.style.backgroundColor="#FFFFFF";
			}
		},
		'#couleurs li img' : function(element){
			element.onmouseover = function(){
				this.style.backgroundColor="#5FCAFF";
			},
			element.onmouseout = function(){
				this.style.backgroundColor="#FFFFFF";
			}
		}

	};
	Behaviour.register(myrulesIe);
}*/

//-- Permet de rendre dragable l'image news --//
/*Behaviour.addLoadEvent(function(){
	new Draggable('image_news', {snap:true, revert:true, ghosting:true });
});*/
	
//-- Connexion AJAX --//
function afficherConnexion() {
	
	
	// On affiche les 2 input //
	if ($('connexion')) $('connexion').style.display="block";
	
	
	if ($('con_login')) $('con_login').style.display="inline";
	if ($('con_pass')) $('con_pass').style.display="inline";
	if ($('con_sub')) $('con_sub').style.display="inline";
	
	if (fenetreConnexionOuverte==0) {
		
		element=$('connexion');
		
		// Effet Firefox
		if (is_fx) {
			
			new Effect.Parallel(
			[ 
			  new Effect.MoveBy(element, 150, -700,
				{ sync: true }), 
			  new Effect.Opacity(element, 
				{ sync: true, to: 0.85, from: 0 } ), 
			  new Effect.Scale(element, 5000, 
				{ sync: true, scaleContent:false } ) 
			],
			{ duration: 1  }
		  );
			
		} 
		// Effet Internet Explorer 7
		else if (is_ie7) 
		{
			new Effect.Parallel(
			[ 
			  new Effect.MoveBy(element, 150, -700,
				{ sync: true }), 
			  new Effect.Opacity(element, 
				{ sync: true, to: 0.85, from: 0 } ), 
			  new Effect.Scale(element, 5500, 
				{ sync: true, scaleContent:false } ) 
			],
			{ duration: 1  }
		  );
			
		}
		else
		// Effet Internet Explorer 6
		{
			new Effect.Opacity(element, { to: 0.85, from: 0, duration:2 } );
		}
		
		new Draggable(element, {snap:true, handle:'move'});

		fenetreConnexionOuverte=1;
	}
	
}

function fermerConnexion() {
	
	if (fenetreConnexionOuverte==1) {
		
		element=$('connexion');
		
		// Effet Firefox
		if (is_fx) { 
		
			new Effect.Parallel(
			[ 
			  new Effect.MoveBy(element, -150, 700,
				{ sync: true }), 
			  new Effect.Opacity(element, 
				{ sync: true, to: 0, from: 0.85 } ), 
			  new Effect.Scale(element, 0.0002,  
				{ sync: true, scaleContent:false, afterFinish:function() {
					// Anti bug - On réinitialise la taille pour réafficher correctement
					element.style.height="4px";
					element.style.width="5px";
					}
				}) 
			 ],
			 { duration: 1.5  }
		   );
			
		}
		// Effet IE 7
		else if (is_ie7)
		{
			
		    new Effect.Parallel(
			[ 
			  new Effect.MoveBy(element, -150, 700,
				{ sync: true }), 
			  new Effect.Opacity(element, 
				{ sync: true, to: 0, from: 0.85 } ), 
			  new Effect.Scale(element, 0.0002,  
				{ sync: true, scaleContent:false, afterFinish:function() {
					// Anti bug - On réinitialise la taille pour réafficher correctement
					element.style.height="4px";
					element.style.width="5px";
					}
				}) 
			 ],
			 { duration: 1.5  }
		   );
			 
		}
		// Effet IE 6
		else
		{
			new Effect.Opacity(element, { to: 0, from: 0.85, duration:2 } );
		}
		
		fenetreConnexionOuverte=0;
		
	}
}

function connexion_ajax() {
	_login=escape($('con_login').value);
	_pass=escape($('con_pass').value);
	
	if (_login.length<=3) $('con_pass').style.borderColor="#FF6600";
	else if (_pass.length<=3) $('con_pass').style.borderColor="#FF6600";
	else {
		$('con_sub').value="Verification";
		ajax('post', 'pages/fonctions/connexion.php', 'login='+_login+'&pass='+_pass, 'connexion_verif');
	}	
}
function connexion_verif(r) {
	r=unescape(r);
	if (r=="+")  {
		pseudo=$('con_login').value;
		txt="<div style='text-align:center'><p>&nbsp;</p><p>Bienvenue <b>"+pseudo+"</b></p><p><a href='?admin-accueil'>Accéder à l'administration</a></p></center>";
		new Effect.Fade('con_contenu', { duration:1, afterFinish:function() {
			$('con_contenu').innerHTML=txt;
			new Effect.Appear('con_contenu');
		} });
	}
	else 
	{
		$('con_mess').innerHTML="<span style='color:#F6F; font-weight:bold'>Identifiants inconnus</span>";
		$('con_sub').value="Connexion";
	}
	
}


//-- Changer wallpaper --//
function changerWallpaper(img, id)
{
	idLi=$('liMin'+id);
	idMin=$('bg'+id);

	// On remet les class par defaut
	elem=$('couleurs').getElementsByTagName('img');
	for (i=0;i<elem.length; i++) {
		if (elem[i].className=="active") elem[i].className="";
	}
		
	new Effect.Fade( idMin, {duration:0.7, from:1, to:0.5, afterFinish:function() {
		// on affiche le bouton wait
		idLi.innerHTML+="<img src='theme/images/ajax-loader2.gif' style='opcity:0.5; position:relative; top:-45px; left:10px' id='waitbg"+id+"' />";

		// On précharge l'image wallpaper
		imgPreloader = new Image();
		imgPreloader.onload=function(){
		
		// On cache le div actuel
		new Effect.Fade( 'primary', {duration: 1, from:1, to:0.0001, afterFinish:function() {
				
				$('primary').style.backgroundImage="url(theme/images/"+img+")";
				
				// On le raffiche
					new Effect.Appear( 'primary', {duration: 0.7, afterFinish:function() {
					
					// Suppression de l'image wait
					new Effect.Fade( 'waitbg'+id , {duration: 0.5, afterFinish:function() {
						remove = idLi.removeChild(idLi.lastChild);
						
						// Miniature opacité normale avec style actif
						$(idLi).getElementsByTagName('a')[0].innerHTML="<img src='theme/images/min_"+img+"' class='active' id='bg"+id+"' onclick='changerWallpaper(\""+img+"\","+id+"); return false' />";
					} } );
					
				} });
																										   
		} });	
		
		} 
		imgPreloader.src = 'theme/images/'+img;
		
	} } );
	
	// On sauvegarde le thème dans un cookies
	document.cookie ="theme='theme/images/"+img+"'; path=/portfolio/;";
}
	

//-- Changement News --//
function news_naviguer(action, obj) {
	idCurrent=Math.round($('id_news_courante').innerHTML);
	$('wait').style.display="block";
	ajax('get', 'pages/news_ajax.php', 'act=recup_apercu&idCurrent='+idCurrent+'&dir='+action+'&obj='+obj, 'afficherNews');
}
function direct_news(id) {
	$('wait').style.display="block";
	ajax('get', 'pages/news_ajax.php', 'act=recup_apercu&idAff='+id, 'afficherNews');	
}
function news_detail() {
	id=Math.round($('id_news_courante').innerHTML);
	$('wait').style.display="block";
	ajax('get', 'pages/news_ajax.php', 'act=recup_apercu&idAff='+id+'&obj=detail', 'afficherNewsDetail');
	
}
function afficherNews(r) {
	
	var doc = eval(unescape(r)); /* Données Json dans infosNews */
	
	new Effect.Fade('n_contenu', {from:1, to:0.05, duration:1, afterFinish:function() { 
		$('n_titre').innerHTML=infosNews.titre;
		$('n_date').innerHTML=infosNews.date;
		$('n_auteur').innerHTML=infosNews.auteur;
		$('n_contenu').innerHTML=infosNews.contenu;
		$('n_cat').innerHTML=infosNews.cat;
		$('id_news_courante').innerHTML=infosNews.id;
		
		if (infosNews.suivant==0) Element.hide('fleche_droite');
			else Element.show('fleche_droite');
		if (infosNews.precedent==0) Element.hide('fleche_gauche');
			else Element.show('fleche_gauche');

		new Effect.Appear("n_contenu", {from:0.05, to:1, duration:0.7, afterFinish:function() { 
			$('wait').style.display="none"; 
		} });
	} });
				
}
function afficherNewsDetail(r) {
	
	var doc = eval(unescape(r)); /* Données Json dans infosNews */
	
	new Effect.Fade('primary', {from:1, to:0.05, duration:1, afterFinish:function() { 
		Element.removeClassName('primary', 'twocol-stories')
		Element.addClassName('primary', 'onecol-stories')
		$('n_titre').innerHTML=infosNews.titre;
		$('n_date').innerHTML=infosNews.date;
		$('n_auteur').innerHTML=infosNews.auteur;
		$('n_contenu').innerHTML=infosNews.contenu;
		$('n_cat').innerHTML=infosNews.cat;
		$('id_news_courante').innerHTML=infosNews.id;
		
		if (infosNews.suivant==0) Element.hide('fleche_droite');
			else Element.show('fleche_droite');
		if (infosNews.precedent==0) Element.hide('fleche_gauche');
			else Element.show('fleche_gauche');
		
		new Effect.Appear("primary", {from:0.05, to:1, duration:2, afterFinish:function() { 
			$('wait').style.display="none"; 
		} });
	} });				
}

function contact_choose(valeur)
{
	if(valeur == "-"){
		contact_cacher();	
	}else{
		contact_cacher();
		contact_afficher('infos');	
	}
}
function contact_cacher()
{
  $('infos').style.display = 'none';
  $('partenariat').style.display = 'none';
  $('devis').style.display = 'none';
}

function contact_afficher(id)
{
	new Effect.Phase(id, { duration:1} );
}

function contact_verif() {
	
	num= '1'; //$('form_type').selectedIndex;
	statut=$('statut'+num);
	
	statut.innerHTML='Traitement en cours<br /><img src="images/wait.gif" alt="wait" />';
	statut.style.display="block";
	
	error=0;
	if ( $F('form_email')=="") {
		error=1;
		$('form_email').style.borderColor="#FF3333";
	}
	else { $('form_email').style.borderColor="#B9B9B9"; }
	if ( $F('form_nom')=="") {
		error=1;
		$('form_nom').style.borderColor="#FF3333";
	}
	else { $('form_nom').style.borderColor="#B9B9B9"; }
	
	if (error==1) {
		statut.innerHTML='<b style="color:#FF3333">Erreur</b><br />Le formulaire n\'a pas été rempli correctement.</b>';
	}
	else
	{
		donnees=getDataFromForm(document.contact);
		ajax('post', 'pages/contact_ajax.php', donnees, 'contact_send');
	}	
	
}

function contact_send(r) {

	if (unescape(r)=="ok") {
		new Effect.Fade('primary_effect', { duration:0.5, from:1, to:0.05, afterFinish:function() { 												  
			$('contenu').innerHTML="<br /><br /><br /><br /><center><b>Votre message nous a été transmis avec succés.</b><br /><br /><br />Une réponse vous sera envoyée dans les plus bref délais.<br />Fckb Corbas</center><br /><br /><br /><br />";
			new Effect.Appear('primary_effect', { duration:0.5, from:0.05, to:1} );
			}
		});
	}
	else
	{
		alert('Une erreur est survenue durant l\'envoie du formulaire. \n\nVeuillez réitérer votre demande ultérieurement ou me contacter directement à l\'adresse : manager@alienfx.net\n\nMerci.');
	}
}

function plus_largeur(id, idFleche2) {
	largeur=Element.getDimensions(id).width;
	new Effect.Scale(id, 120, { duration:0.5, scaleY:false, scaleContent:false, afterFinish:function() { 
		largeurNew=Element.getDimensions(id).width;																					   
		diff=largeurNew-largeur;
		new Effect.MoveBy(idFleche2, 0, diff, { duration:0.5 } );
	} }); 
	
}

function plus_hauteur(id) {
	new Effect.Scale(id, 120, { duration:0.5, scaleX:false, scaleContent:false } ); 
}

/*
function drag_drop_creations() {
		
		nbrdrag = $('nbrdrag').value;
		
		//for (i=1; i<=nbrdrag; i++) {
			//new Draggable("gallerie_"+i, { revert:true, starteffect:false  }); 
		//}
		new Draggable("gallerie_1", { revert:true, starteffect:false  });
		
		//new Draggable("gallerie_1", { revert:true, starteffect:false  }); 
		//new Draggable("gallerie_2", { revert:true, starteffect:false  }); 
		
							
		Droppables.add("zone_detail", {
		   onDrop: function(element) 
			 { 
				
				// ele = $(element.id+'_chp').value.split("_");
				 switch(element.id) 
				 {			   
				   case "gallerie_1": srcId = 1; nomImg = "Entrainement"; srcImg = "1.jpg"; break;
				 }
				 			
			 
			 $("inter_detail").innerHTML="<img src=\'upload/gallerie/"+srcImg+"\' border=\'0\'  id=\'img_detail\' /><div style=\'line-height:16px; padding-top:13px; vertical-align:middle; font-weight:bold\'>"+nomImg+"<br/><span style=\'font-size:9px; font-weight:normal; color:#777\'>( Glissez une autre miniature pour voir la gallerie )</span></div>";
			 setTimeout("new Effect.Puff(\'img_detail\', {duration:1});",1500);

			 setTimeout("ajax('get', 'pages/gallerie_ajax.php', 'act=detail&nom=gallerie_"+srcId+"', 'show_details');", 500);
			
			 },
			 hoverclass:"hoverDetail"
			 
		});

}*/
function drag_onRelease(bouh){
	 
	 switch(bouh) 
				 {
				    case "1": srcImg="1.jpg"; nomImg="Entrainement"; break;
					case "2": srcImg="2.jpg"; nomImg="Soirée des dauphins"; break;
					case "3": srcImg="3.jpg"; nomImg="Championnat de zone"; break;
					case "4": srcImg="4.jpg"; nomImg="Championnat de zone"; break;
				 }
	 
	 $("inter_detail").innerHTML="<img src=\'upload/gallerie/"+srcImg+"\' border=\'0\'  id=\'img_detail\' /><div style=\'line-height:16px; padding-top:13px; vertical-align:middle; font-weight:bold\'>"+nomImg+"<br/><span style=\'font-size:9px; font-weight:normal; color:#777\'>( Glissez une autre miniature pour voir la gallerie )</span></div>";
			 setTimeout("new Effect.Puff(\'img_detail\', {duration:1});",1500);

			 setTimeout("ajax('get', 'pages/gallerie_ajax.php', 'act=detail&nom="+bouh+"', 'show_details');", 500);
}

function drag_drop_creations() {
	
		
		nbrdrag = $('nbrdrag').value;
		for(var i=1; i<=nbrdrag; i++){
			new Draggable("gallerie_"+i, { revert:true, starteffect:false  });
		}
		
		/*new Draggable("gallerie_1", { revert:true, starteffect:false  });
			new Draggable("gallerie_2", { revert:true, starteffect:false  });
				new Draggable("gallerie_3", { revert:true, starteffect:false  });
					new Draggable("gallerie_4", { revert:true, starteffect:false  });*/
				
		Droppables.add("zone_detail", {
		   onDrop: function(element) 
			 { 
				 
				nbrdrag = $('nbrdrag').value;
				var ous = element.id.split("_"); 
				var temp = $('gallerie_'+ous[1]+'_chp').value.split('___');
				srcImg=temp[2]; 
				nomImg=temp[1]; 
				lId=temp[0];
					
			 $("inter_detail").innerHTML="<img src=\'upload/gallerie/"+srcImg+"\' border=\'0\'  id=\'img_detail\' /><div style=\'line-height:16px; padding-top:13px; vertical-align:middle; font-weight:bold\'>"+nomImg+"<br/><span style=\'font-size:9px; font-weight:normal; color:#777\'>( Glissez une autre miniature pour voir la gallerie )</span></div>";
			 setTimeout("new Effect.Puff(\'img_detail\', {duration:1});",1500);

			 setTimeout("ajax('get', 'pages/gallerie_ajax.php', 'act=detail&nom=gallerie_"+lId+"', 'show_details');", 500);
			
			 },
			 hoverclass:"hoverDetail"
			 
		});
		
	

}

nbr_show = 0;
function show_details(r) {
		
	if (is_fx) {  // Affichage d'une création en détail pour Firefox
		
		if ($('aff_detail').style.display=='none') 
		{ 
			$('aff_detail').innerHTML=unescape(r);
			new Effect.Appear('aff_detail', { duration:1 , afterFinish:function(){ 
					initLightbox();															
				}} );
		}
		else 
		{
			new Effect.Fade('aff_detail', { duration:1, afterFinish:function() {
				$('aff_detail').innerHTML=unescape(r);
				new Effect.Appear('aff_detail', { duration:1 , afterFinish:function(){ 
					initLightbox();															
				}} );
			} });
		}

	} else { // Affichage d'une création en détail pour les autres navigateurs
		
		$('aff_detail').innerHTML=unescape(r);
		if ($('aff_detail').style.display=='none') new Effect.Appear('aff_detail', { duration:1 , afterFinish:function(){ 
																													   
					initLightbox();															
				}});
	
	}

	//myLightbox.initialize();
	/*if(nbr_show == 0){
		initLightbox();
	}*//*else{
	//addLoadEvent(initLightbox);	
	//Behaviour.addLoadEvent(initLightbox);
	}*/
	//myLightbox = new Lightbox();
	
	
	
	nbr_show = 1;
	
	
}

// ----------------------------------------------------------------------------------- //
// ----------------------- FONCTIONS GENERALES ---------------------------- //
// ----------------------------------------------------------------------------------- //

// Script Ajax perso ( POST/GET en asynchrone )
function ajax ( type, fichier, variables /* , fonction */ ) 
{ 
	if ( window.XMLHttpRequest ) var req = new XMLHttpRequest();
	else if ( window.ActiveXObject ) var req = new ActiveXObject("Microsoft.XMLHTTP");
	else alert("Votre navigateur n'est pas assez récent pour accéder à cette fonction, ou les ActiveX ne sont pas autorisés");
	if ( arguments.length==4 ) var fonction = arguments[3];

	if (type.toLowerCase()=="post") {
		req.open("POST", _URL+fichier, true);
		req.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=iso-8859-1');
		req.send(variables);
	} else if (type.toLowerCase()=="get") {
		req.open('get', _URL+fichier+"?"+variables, true);
		req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-1');
		req.send(null);
	} else { 
		alert("Méthode d'envoie des données invalide"); 
	}

	req.onreadystatechange = function()  { 
		if (req.readyState == 4 && req.responseText != null )
		{				
			if (fonction) eval( fonction + "('"+escape(req.responseText)+"')");
			
		} 
	}
}

// Permet de retirer toutes les infos d'un form
function getDataFromForm(Form) {  
	var data=""; 
	var key=0; 
	for (key=0;key<Form.elements.length;key++) { 
		if (Form.elements[key].tagName.toLowerCase()=="select") {
			currentValue=getSelectValue(Form.elements[key]);
		} else {
			currentValue=Form.elements[key].value;
		}
		if (currentValue!="undefined" && currentValue!="") data+=escape(Form.elements[key].name)+"="+escape(currentValue)+"&"; 
	}  
	return data.substr(0, data.length-1); 
}
function getSelectValue(selectt) {
	var value="";
	for (var i=0; true; i++) {  
		if (selectt.options[i]) { if (selectt.options[i].selected) value += selectt.options[i].value + ","; } 
		else {return value.substr(0, value.length-1); }  
	} 
}	


// Equivalent perso de isset( )
function isset(varname){
  return (typeof(varname)!='undefined');
}

/* ---------------------------------------- ADMIN ------------------------------------------------- */
function verifAjouterNews()
{
		$("_contenu").value = oEdit1.getHTMLBody();
		return true;
}



/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
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;
