function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function openPop(f,l,h,op)
{
	longueur=l;
	hauteur=h;
	haut = screen.height/2 - hauteur/2;
	dim = screen.width/2 - longueur/2;
	window.open(f,'','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no,'+op+'');
}

function ouvre_stow_n_go()
{
window.open('/actualite/stowngo/index.asp','','width=570,height=500,scrollbars=yes,resizable=no,left=160,top=10');
}

function ouvre_diesel()
{
window.open('/actualite/diesel/diesel.asp','','width=800,height=600,scrollbars=no,resizable=no,left=160,top=10');
}

function olympia()
{
window.open('/actualite/Olympia/index.asp','','width=706,height=600,scrollbars=no,resizable=no,left=160,top=10');
}

function exemple()
{
document.location.href="/actualite/stowngo/index.htm";
}

function ouvre300c()
{
longueur=745;
hauteur=425;
haut = screen.height/2 - hauteur/2;
dim = screen.width/2 - longueur/2;
window.open('/actualite/300c/index.asp','','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no');
}

function tarification()
{
longueur=620;
hauteur=420;
haut = screen.height/2 - hauteur/2;
dim = screen.width/2 - longueur/2;
window.open('http://extranet.theoreme.fr/netprotego/tarifchrys.htm/tarif','','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no');
}

function ouvreptcabriopub()
{
longueur=352;
hauteur=315;
haut = screen.height/2 - hauteur/2;
dim = screen.width/2 - longueur/2;
window.open('/actualite/video/ptcabrio.asp','','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no');
}

function ouvrestowngopub()
{
longueur=352;
hauteur=300;
haut = screen.height/2 - hauteur/2;
dim = screen.width/2 - longueur/2;
window.open('/actualite/video/stowngo.asp','','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no');
}

function ouvrevoyagerpub()
{
longueur=352;
hauteur=315;
haut = screen.height/2 - hauteur/2;
dim = screen.width/2 - longueur/2;
window.open('/actualite/video/voyager.asp','','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no');
}

function openCarSelector()
{
	window.open('/carselector/frame.html','','width=700,height=550,scrollbars=auto');
	self.location="/default.asp";
}

function selectList(obj){
	document.location.href = obj.options[obj.selectedIndex].value;
}

function press(page,taille){
fenetre=window.open(page,"image",taille)
}

function OpenTarif(Marque, Contrat, Segment){
	ServerIP = "62.210.156.226";	
	url = "http://"+ServerIP+"/tarif_sav/tarif_sav.asp?Marque="+Marque+"&amp;segment="+Segment+"&amp;Contrat="+Contrat;
	win = window.open(url,"", "height=435,width=610,top=100,left=200,scrollbars=no");
}

function largeItUp(id) {
	newWin = window.open("/actualite/minisite_olympia/Olympia-Chrysler_v20.html", "WindowName", "channelmode");
	if(id == 1){
		xt_med('C','','clic_mini_site_olympia_actu','N');
	}
	else{
		xt_med('C','','clic_mini_site_olympia_home','N');
	}
	
}

var newWindow = null;

function closeWin(){
	if (newWindow != null){
		if(!newWindow.closed)
			newWindow.close();
	}
}

function popUpWin(url, type, strWidth, strHeight){
	
	closeWin();
	
	if (type == "fullScreen"){
		strWidth = screen.availWidth;
		strHeight = screen.availHeight;
	}
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "width="+strWidth+",height="+strHeight+",top=0,left=0";
	if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}

function set_mondial_photo(img) {
	document.images["mondial_zoom"].src = img;
}

function loadAxControl() {
  if (!document.all || !window.print || window.opera) return;
  if (document.getElementsByTagName) { 

//object   
	var theObjects = document.getElementsByTagName("object");
   for (var i = 0; i < theObjects.length; i++) {
      //ajout d'un div autour de object
      div = theObjects[i].parentNode.insertBefore(document.createElement("div"), theObjects[i]);
      div.style.display="none";
      div.appendChild(theObjects[i]);

      if(div.firstChild.data){
			// Fix for Flash Satay style objects
			div.firstChild.removeAttribute('data');
		}
      
      //Recuperation des flashvars
      var theParams = div.getElementsByTagName("param");
		for (var j = 0; j < theParams.length; j++) {
			if(theParams[j].name.toLowerCase() == 'flashvars'){
				var theFlashVars = theParams[j].value;
            break;
			}
		}
      
      //changement des flashvars
      var theInnnerHTML = div.innerHTML;
		var re = /<param name="FlashVars" value="">/ig;
		theInnnerHTML = theInnnerHTML.replace(re, "<param name='FlashVars' value='" + theFlashVars + "'>");
		div.outerHTML = theInnnerHTML;
	}

//embed
	var embs = document.getElementsByTagName("embed");
	for (i=0; i<embs.length; i++) {
		embs[i].outerHTML = embs[i].outerHTML;
	}
 }
}