var urlMedia='http://www.suziwan.fr/';

/* 
 REDIMENSIONNEMENT DE LA FENETRE
*/
function resize(){
    if(document.documentElement.clientHeight < 650){
        document.getElementById("altContent").style.height="700px";
     } else{
        document.getElementById("altContent").style.height="100%";
 }
}
window.onresize=resize;

window.onresize=resize;

window.onload = cacheMotCle 
function cacheMotCle(){
    document.getElementById("footerMc").style.display="none";
}

var arrTrackIds=[
	//--------------- main pages
	
	//--------------- recette pages
	["Recettes / Plats Principaux / Bœuf aux pousses de bambou et soja", 'boepbso1'],
	["Recettes / Plats Principaux / Bœuf Bobun", 'boebobu1'],
	["Recettes / Plats Principaux / Bœuf sauté au soja", 'boessoj1'],
	//--------------- produit pages
	[, ]
];


function getCatId(id){
	var cat='';
	for(i=0; i<arrTrackIds.length; i++){
		if(arrTrackIds[i][0] == id) {
			cat=arrTrackIds[i][1];
			break;
		}
	}
	return cat;
}
function tracking(trackId){
	var axel = Math.random()+"";
	var a = axel * 10000000000000;
	document.write('<iframe src="http://fls.doubleclick.net/activityi;src=2168021;type=suziwan1;cat='+ getCatId(trackId) +';ord='+ a + '?" width="1" height="1" frameborder="0"></iframe>');
}

function openNewRecipesPopup(){
			
			var leftmargin = (screen.availWidth - 1010)/2;
			var hght	= screen.availHeight;
			if(ie7 == true)
				hght = hght - 40;
            var setting = 'scrollbars=yes, resizable=no, toolbar=no, menubar=yes, location=no, height=' + hght + 'px, width=1020px, left=' + leftmargin + 'px, top=0px;'
            window.open('http://www.suziwan.fr/fr-fr/suziwan-recettes.aspx','recipes',setting);
			return false;
}

function openNewRecipe(pid){
	var leftmargin = (screen.availWidth - 1010)/2;
			var hght	= screen.availHeight;
			if(ie7 == true)
				hght = hght - 40;
            var setting = 'scrollbars=yes, resizable=no, toolbar=no, menubar=yes, location=no, height=' + hght + 'px, width=1020px, left=' + leftmargin + 'px, top=0px;'
            window.open('http://www.suziwan.fr/fr-fr/recipedetails.aspx?pid='+pid,'recipes',setting);

			return false;

}

function selfFocus()
		{			
			self.focus();
		}
