// Function for Espace Canoe ( KeyWord Variable)

function get_keyword(name){
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";  
	var regex = new RegExp( regexS );  
	var results = regex.exec( window.location.href );  
	if( results == null )    
	return "";  
	else    
	return results[1];
}
// End function get_keyword

function GetFlagDE( Posi )
{
	// Tag DE en fonction (actif)
	var ActifDE = activeDE; // TRUE: Tag DE, FALSE: Tag DFP

	var ExceptionDE = 
	{
		button : 1,
		advertorial : 1
	}
	
	return ( ExceptionDE[ Posi ] ) ? true : ActifDE; //DETag flag
}



function GetPosition( Pos, Obj ) 
{

	var NameTranslation = 
	{
		fr : 	
		{
			skyscraper:	'bouton_7',
			special1:	'special1',
			special2:	'special2',
			superbanner:    'bandeau',
			bigbox:		'boite',
			button:		'bouton_4',
			popup:		'popup',
			advertorial:    'publireportage',
			banner:		'bandeau_1',
			doublebox:	'doubleboite',
      catfish: 'catfish'
		},

		en : 	
		{
			skyscraper:	'button_7',
			special1:	'special1',
			special2:	'special2',
			superbanner:	'superbanner',
			bigbox:		'boite',
			button:		'button_4',
			popup:		'popup',
			advertorial:	'publireportage',
			banner:		'banner',
			doublebox:	'doublebox',
      catfish: 'catfish'
		}
	
	}

	return NameTranslation[ Obj.language ][ Pos ];
}



function GetDim( Posi )
{		
	var tab = new Array;
	tab[ "superbanner" ]	="728x90";
	tab[ "bigbox" ]		="300x250";
	tab[ "skyscraper" ]	="120x600";
	tab[ "popup" ]		="500x500";
	tab[ "banner" ]		="468x60";
	tab[ "button" ]		="120x60";
	tab[ "advertorial" ]	="306x140";
	tab[ "special1" ]	="175x40";
	tab[ "special2" ]	="175x40";
  tab[ "catfish" ] = "2x2";

	return tab[ Posi ];
}
