/* 

ARTEXTYL



*/
function writeFL(id,src,W,H,WM)
{
	document.write("<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='100%' height='100%'>");
	document.write("<object id='"+id+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0' width='"+W+"' height='"+H+"' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always'>");
	document.write("<param name='wmode' value='"+WM+"'>");
	document.write("<param name='movie' value="+src+">");
	document.write("<param name='quality' value='high'>");
	document.write("<embed name='"+id+"' src="+src+" allowScriptAccess='always' width='"+W+"' height='"+H+"' wmode='"+WM+"' align='middle' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed>");
	document.write("</object>");
	document.write("</td><td><img width='0' height='650' /></td></tr><tr><td><img width='980' height='0' /></td><td></td></tr></table>");
}

function writeFLSPE(id,src,W,H,WM,arg)
{
	document.write("<object id='"+id+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0' width='"+W+"' height='"+H+"' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always'>");
	document.write("<param name='wmode' value='"+WM+"'>");
	document.write("<param name='movie' value="+src+">");
	document.write("<param name='flashvars' value='arg="+arg+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<embed name='"+id+"' src="+src+" flashvars='arg="+arg+"' allowScriptAccess='always' width='"+W+"' height='"+H+"' wmode='"+WM+"' align='middle' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed>");
	document.write("</object>");
}

function ow (url)
{
	window.open(url);
}

var separateurMarqueur = "#";

function recupMarqueur(animDest)
{
	var tabTmpRecupMarqueur = document.location.href.split(separateurMarqueur);
	var marqueurRecup = tabTmpRecupMarqueur[1];
	document[animDest].SetVariable('marqueur',marqueurRecup);
}

function placeFooter()
{
	var st = document.documentElement.scrollTop;
	var hp = document.documentElement.clientHeight;
	document.getElementById("footer").style.top = st+(hp-130)+"px";
}

function manageFooter()
{
	var hg = document.getElementById("global").offsetHeight;
	var hp = document.documentElement.clientHeight;
	var hs = document.documentElement.scrollHeight;
	var hf = document.getElementById("footer").height;

	if(hg>hp) {
		//alert("systeme menu");
		document.getElementById("endPage").style.height = 130+"px";
		document.getElementById("footer").style.position = "absolute";
		setInterval(placeFooter,10);
	} else {
		document.getElementById("endPage").style.height = 'auto';
		document.getElementById("footer").style.position = "static";
	}
}

//window.onresize = manageFooter;

function hide(id)
{
    document.getElementById(id).style.display = "none";
}

rollactive = false;

function position(event)
{
	if(!rollactive){
		rollactive = true;
		var event = event || window.event;
		mouse_x = event.clientX;
		mouse_y = event.clientY;
		if(navigator.appName == 'Microsoft Internet Explorer' )
		{
			x = mouse_x+document.documentElement.scrollLeft;
			y = mouse_y+document.documentElement.scrollTop;
		} else {
			x = mouse_x+window.pageXOffset;
			y = mouse_y+window.pageYOffset;
		}
	}
}

var activMenu = "";

function showSubMenu(idMenu)
{
	if(activMenu!="")
	{ 
		clearTimeout(hideSub);
		hideSubMenuAction();
	}
	document.getElementById(idMenu).style.display = "block";
	//document.getElementById(idMenu).style.left = x+5+"px";
	//document.getElementById(idMenu).style.top = y+5+"px";
	activMenu = idMenu;
}

function hideSubMenuAction()
{
	document.getElementById(activMenu).style.display = "none";
	rollactive = false;
}

function hideSubMenu()
{
	hideSub = setTimeout(hideSubMenuAction,500);
}

function clearHide()
{
	clearTimeout(hideSub);
}

function showTable()
{
	var wt = document.getElementById("tabass").offsetWidth;
	document.getElementById("tabass").style.display = "block";
	document.getElementById("tabass").style.left = Math.round((975/2)-(wt/2))+"px";
	document.getElementById("tabass").style.top = y+30+"px";
}

function owPageFlip()
{
	window.open("pageflip/pageflip.html","ARTEXTYL","menubar=no, status=no, scrollbars=no, location=no, width=900, height=716");
}

function owCarrousels(url,w,h)
{
	window.open(""+url+"","ARTEXTYL","menubar=no, status=no, scrollbars=no, location=no, width="+w+", height="+h+"");
}


function callExternalInterface() {
  thisMovie("f").myFunction();
}

function thisMovie(movieName) {
  if (navigator.appName.indexOf("Microsoft") != -1) {
    return window[movieName]
  }else {
    return document[movieName]
  }
}

function callnews(str) {
	//document["f"].newsmanager(str);
	//document.getElementById("f").newsmanager(str);
	if (navigator.appName.indexOf("Microsoft") != -1) {
    	window["f"].newsmanager(str);
  	}else {
    	document["f"].newsmanager(str);
  	}
}
