var qlub_excludedoptions = [ ];
// désactivation de l'accès aux sponsors
var sponsorsmgr_disabled = true ;

/*
function -
function UTILES
*/

function pages_adsdimensions() {
	return { width : 120 , paddingleft : 0 , paddingright : 6 , inpage : false }
}

function q_currsvcishome(){
	return q_svcishome( currsvcid ) ;
}

function q_svcishome( svcid, s ){
	if ( ! s && ! spacexml.sitemap ) return false;
	if ( ! s ) s = { items : spacexml.sitemap };
	if ( ! s.items ) return false;
	for ( var i in s.items ){
		if ( s.items[ i ].id && s.items[ i ].id == svcid && s.items[ i ].home && s.items[ i ].home == true ) return true;
		else return q_svcishome( svcid, s.items[ i ] );
	}
}

function rgb2hex(val){//préciser ce que peut être val
	if ( typeof( val ) == "string" && val.indexOf("rgb") >= 0) var rgb_val = val.slice(val.indexOf('(') + 1,val.indexOf(')')).split(",");
	else var rgb_val = val;
	val = "#";
	var hexChars = "0123456789ABCDEF";
	for ( var i = 0 ; i < 3 ; i++ ) {
		var v = Math.max( 0 , Math.min( 255 , rgb_val[i] ) ) ;
		val += hexChars.charAt(v/16) + hexChars.charAt(v%16);
	}
	return val;
}

/*
function -
function ADS
*/

function qlub_noads_forie() {
	return false ;
	return ( isie() && window.q_jscssversion && q_jscssversion < 32 ) ;
}
function qlub_ads_checkadd( site ) {
	if ( q_pagemode() == "makeweb" ) return false ;
	var spaceads = q_spaceparam( "ads" ) ;
	if ( spaceads && ( spaceads.enabled || ( spaceads[ site ] && spaceads[ site ].enabled ) ) ) {
		return "active" ;
		if ( spaceads.active == "false" ) return false ;
		else return "active" ;
	}
	if ( q_pagemode() == "edit" ) return false ;
	if ( qlub_noads_forie() ) return false ;
	return "pub" ;
}
var ads_pubrandomnumber = Math.floor( Math.random() * 1000000 ) ;
function qlub_init_adshandler() {
	function imgsrc( site ){
		var base = ( qlub_ads_slotHTML( { type : "imgwithhttp" } ) == true ) ? "http://core0.quomodo.com" : "" ;
		var type = q_spaceparam( "infos" ).type ;
		if ( type && ( /basket/ ).test( type.toLowerCase() ) ) return base + "/images/ads/ods/" + site + "_basket_orga.jpg" ;
		if ( type && ( /foot/ ).test( type.toLowerCase() ) ) return base + "/images/ads/ods/" + site + "_foot_orga.jpg" ;
		return base + "/images/ads/ods/" + site + "_general_orga.jpg" ;
	}
	var use = ( q_spaceparam( "infos" ) ) ? q_spaceparam( "infos" ).subscribe_use : "other" ;
	var b = ( use.toLowerCase() != "sport" || ads_pubrandomnumber % 5 ) ;
	return {
		"top_active" : qlub_init_topads ,
		"right_active" : qlub_init_rightads ,
		"bottom_active" : qlub_init_bottomads ,
		"top_pub" : function( siteads ){
			if ( b ) return qlub_init_pubtopads( siteads ) ;
			qlub_init_topads( { slots : [ { width : "728", height : "90" , type : "imglink" , img: imgsrc( "top" ) , link: "http://lofficieldusport.fr/inscrivez_votre_manifestation" , target: "_blank" } ] } ) ;
		} ,
		"right_pub" : function( siteads ){
			if ( b ) return qlub_init_pubrightads( siteads ) ;
			qlub_init_rightads( { slots : [ { width : "120", height : "600" , type : "imglink" , img: imgsrc( "right" ) , link: "http://lofficieldusport.fr/inscrivez_votre_manifestation" , target: "_blank" } ] } ) ;
		} ,
		"bottom_pub" : function( siteads ){
			if ( b ) return qlub_init_pubbottomads( siteads ) ;
			qlub_init_bottomads( { slots : [ { width : "468", height : "60" , type : "imglink" , img: imgsrc( "bottom" ) , link: "http://lofficieldusport.fr/inscrivez_votre_manifestation" , target: "_blank" } ] } ) ;
		}
	} ;
	return { "top_active" : qlub_init_topads , "right_active" : qlub_init_rightads , "bottom_active" : qlub_init_bottomads , "top_pub" : qlub_init_pubtopads , "right_pub" : qlub_init_pubrightads , "bottom_pub" : qlub_init_pubbottomads } ;
}

function qlub_init_pubtopads( siteads ) {
	var slot = ( q_currsvcishome() ) ? "Accueil_HautPage_Centre_728x90" : "Pages_HautPage_Centre_728x90";
	if ( ! window.q_ads_version ) slot = "ad_top" ;
	document.write( '<script type="text/javascript">\n' + '//<![CDATA[\n' + 'GA_googleFillSlotWithSize( "ca-pub-7347844944087363","' +  slot + '" , 728 , 90 ) ;\n' + '//]]>\n' + '</script>' ) ;
}

function qlub_init_pubbottomads( siteads ) {
	var slot = (  q_currsvcishome() ) ? "Accueil_BasPage_Centre_468x60" : "Pages_BasPage_Centre_468x60";
	if ( ! window.q_ads_version ) slot = "ad_bottom_1" ;
	document.write( '<script type="text/javascript">\n' + '//<![CDATA[\n' + 'try { GA_googleFillSlotWithSize( "ca-pub-7347844944087363","' +  slot + '" , 468 , 60 ) ; } catch( err ) {}\n' + '//]]>\n' + '</script>' ) ;
}

function qlub_init_pubrightads( siteads ) {
	if ( ! window.pages_adsdimensions ) return ;
	var x = pages_adsdimensions() ;
	var w = x.width - x.paddingleft - x.paddingright ;
	var td = document.getElementById( "qlub_ads_addright_elem" ) ;
	if ( td ) {
		td.style.width = w + "px" ;
		td.style.padding = "6px " + x.paddingright + "px 6px " + x.paddingleft + "px" ;
	}
	var slot = (  q_currsvcishome() ) ? "Accueil_HautPage_Skycraper_120x600" : "Pages_HautPage_Skycraper_120x600";
	if ( ! window.q_ads_version ) slot = "ad_right" ;
	document.write( '<script type="text/javascript">\n' + '//<![CDATA[\n' + 'try { GA_googleFillSlotWithSize( "ca-pub-7347844944087363","' +  slot + '" , 120 , 600 ) ; } catch( err ) {}\n' + '//]]>\n' + '</script>' ) ;
}

function qlub_init_ads() {}

function qlub_ads_head_loadads() {
	if ( q_pagemode() == "makeweb" || q_pagemode() == "edit" ) return ;
	if ( qlub_noads_forie() ) return ;
	
	document.write( '<script type="text/javascript">\n' 
	+ '//<![CDATA[\n' 
	+ 'try { GS_googleAddAdSenseService("ca-pub-7347844944087363"); GS_googleEnableAllServices(); } catch( err ) {}\n' 
	+ '//]]>\n' 
	+ '</script>' ) ;
	document.write( '<script type="text/javascript" src="/clients/qlubads0910/ads-google-step2.js"></script>' ) ; 
	window.q_ads_version = "2.0" ;
}


