/*
Script pour fnac
*/
var IS_IE = document.all && window.print && !window.opera && /MSIE [56]/.test(navigator.userAgent);
var IS_IE_ALL = document.all && window.print && !window.opera && /MSIE/.test(navigator.userAgent);
var IE_W3C = IS_IE && /MSIE [789]/.test(navigator.userAgent);
var IS_Webkit = /Konqueror|Safari|KHTML/.test(navigator.userAgent);
var heightPropertyToUse = IS_IE ? "height" : "minHeight";

/* ecrit les classes dans le tag HTML, pas besoin d'attendre le chargement du body */
document.documentElement.className+=" hasJS"; //cette classe rajoute une classe CSS qui permet des actions afin de cacher ou afficher des elements seulement pour les visiteurs qui ont le Javascript active sur leur navigateur. (exemple le hidesubmit)
if (IS_IE) document.documentElement.className+=" IS_IE"; //cette classe permet d'utiliser des hacks CSS/JS seulement pour IE6 et versions inferieures.
var ifrlayer = {
	make:function(obj) {
		if(!obj) return; obj = (typeof(obj)=="string") ? document.getElementById(obj) : obj; if(!obj) return;
		if(document.all && !window.opera && document.getElementById) {
			if(obj.parentNode && !obj.iframelayer) {
			    var ifr = obj.parentNode.insertBefore(document.createElement('<iframe src="javascript:false"></iframe>'), obj);
			    if(obj.currentStyle.zIndex != "" && parseInt(obj.currentStyle.zIndex)>1 ) {
				    ifr.style.zIndex = parseInt(obj.currentStyle.zIndex)-1;
			    }
			    with(ifr.style) {
				    filter = "mask()";
				    position = "absolute";
			    }
                obj.iframelayer = ifr;
            }
		}
		if(obj.iframelayer) {
		    obj.iframelayer.style.visibility="visible";
            ifrlayer.resize(obj);
            ifrlayer.move(obj)
        }
        	},
	hide:function(obj) {
		if(!obj) return; obj = typeof(obj)=="string" ? document.getElementById(obj) : obj; if (!obj) return;
		var ifr = obj.iframelayer;
		if(ifr) {
			ifr.style.visibility="hidden";
		}
	},
	move:function(obj) {
		if(obj && obj.iframelayer) {
		    with(obj.iframelayer.style) {
			    top = obj.offsetTop+"px";
			    left = obj.offsetLeft+"px"
		    }
		}
	},
	resize:function(obj) {
	    if(obj && obj.iframelayer) {
	        with(obj.iframelayer.style) {
	            width =  obj.offsetWidth+"px";
		        height =  obj.offsetHeight+"px";
		    }
		}
	}
}
function addHover(elm) {
	elm.style.behavior = " ";
	elm.onmouseenter = function() {
		this.className+= ' hover';
	}
	elm.onmouseleave = function() {
		this.className = this.className.replace(/\bhover\b/,"");
	}
}
/*  menu deroulant - simulation du hover facon F6
*****/
function sousMenuAddHover(elm, position) {
  elm.style.behavior = " ";
  var menu = elm.getElementsByTagName("ul");
  if (menu.length>0) {
    elm.theUl = menu[0];
    ifrlayer.make(elm.theUl);
    elm.onmouseenter = function() {
      this.className+= ' currentJs';
      ifrlayer.make(elm.theUl);
    }
    elm.onmouseleave = function() {
      this.className = this.className.replace(/\b(right)?currentJs\b/,"");
      ifrlayer.hide(this.theUl);
    }
  }
}

function setTrck(name, value) {
	document.cookie = name + "=" + escape(value);
}

function getTrck(name) {
	var start = document.cookie.indexOf(name+"=");
	var len = start + name.length + 1;
	if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
	if (start == -1) return null;
	var end = document.cookie.indexOf(";",len);
	if (end == -1) end = document.cookie.length;
	return unescape(document.cookie.substring(len, end));
}

function scrshtPreview(sLink) {
	p = "height=300,width=300,left=100,top=100,toolbar=no,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no";
	hWnd = window.open(sLink, "Hwnd", p);
	hWnd.focus();
}


function siteSearch() {
	formOK = true;
	f = document.forms['fFind'];
	if (formOK == true && f.selectCat.value == '') {
		alert("'Vous devez choisir une catégorie!'");
		formOK = false;
	}
	if (formOK == true && f.keyWord.value == '') {
		alert("'Vous devez entrer un mot cle!'");
		formOK = false;
	}
	if (formOK == true) {
		var loc=new String();
		loc = '40swk1-kwq.html';
		loc = loc.replace(/(kwq)/, escape(f.keyWord.value));
		loc = loc.replace(/(swk)/, escape(f.selectCat.value));
		self.location = loc;
	}
}

function mKp() {
	if (window.event.keyCode == 13) { siteSearch(); }
	return false;
}

function dlWnd(sDlLink) {
	p = "height=310,width=396,left=100,top=100,toolbar=no,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no";
	sDlLink = sDlLink + "&trck=" + getTrck("trck");
	hWnd = window.open(sDlLink, "Hwnd", p);
	hWnd.focus();
}


/* PLAYER */

var ie=document.all;
var nn6=document.getElementById&&!document.all;




function gid(id) {
    return document.getElementById(id);
}

function playFile(type, id, name, name2, file, urltogo) { 
    playFileR2(type, name,name2,  file, urltogo, '');
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
 
function animgo(u) {
    window.location = u;
}
function animgo_popup(u){
    window.open(u, '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,scrolling=no,overflow=no,resizable=0,resize=no,copyhistory=0,width=410,height=520,left=0,top=0,margin=0,marginwidth=0,marginheight=0');
}

function opop(u) {
	p = "height=660,width=380,toolbar=no,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no";
	hWndo = window.open (u, "Hwndo", p);
	hWndo.focus();
}

var prec_file = '';
function playFileR2(type, name, name2, file, urltogo, sDownload) { 
	if(file == prec_file)
	{
		document.getElementById('wl_univers').innerHTML = '';
		prec_file = '';
	}
	else
	{
		document.getElementById('wl_univers').innerHTML = '<object id="mp3_player" type="application/x-shockwave-flash" data="http://pics.mediaplazza.com/everymob/media/swf/player_mp3_mini.swf" width="1" height="1">'
				+'<param name="movie" value="http://pics.mediaplazza.com/everymob/media/swf/player_mp3_mini.swf" />'
				+'<param name="FlashVars" value="autoplay=1&mp3=' + file + '" />'
				+'</object>';

		prec_file = file;
	}
	
    if(sDownload=='') sDownload = 'Download';    
    rnd = Math.random();
    tocall = "http://pics.mediaplazza.com/html.mediaplazza.com/themes/default/jeux2filles_player.swf?rnd="+rnd+"&idType="+type+"&sFile="+file+"&sUrl="+urltogo+"&sDownload="+sDownload+"&lib="+name2+'&nbsp;-&nbsp;'+name;
    document.getElementById('wl_univers').innerHTML += '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '+
                                    'align="" WIDTH="184" HEIGHT="116" id="playerR2" ALIGN=""><PARAM NAME="movie" VALUE="'+tocall+'">'+
                                    '<PARAM NAME="quality" VALUE=high><PARAM NAME="wmode" VALUE="transparent"><embed src="'+tocall+'" quality="high" swliveconnect="true" wmode="transparent" WIDTH="184" HEIGHT="116" name="playerR2" ALIGN="" '+
                                     'TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></embed></OBJECT>'; 

    
}


function hidePlayer() {
    gid('divPlayer').style.visibility   = 'hidden';
    gid('divPlayer').style.display      = 'none';
    gid('insidePlayerFlash').innerHTML  = '';
    gid('insidePlayer').innerHTML       = '';
    document.onmousemove = position;
}

/* SCROLL */

container_size = 380;
offset_min = -container_size;
offset_max = 0;
current_offset = 0;
global_sens = 'l';
vitesse = 10;
decal = 25;

function scd(sens) {
    global_sens = sens;
    slide();
}

function getStyle(id) {
    return gid(id).style;
}

function slide() {
    if(global_sens == 'l') {
        if(current_offset < offset_max) {
            getStyle('content').marginLeft = current_offset+decal;
            current_offset = current_offset+decal;
            if(current_offset < offset_max) {
                window.setTimeout("slide()", vitesse);    
            }
        }else{
            scd('r');
        }
    }else{
        if(current_offset > offset_min) {
            getStyle('content').marginLeft = current_offset-decal;
            current_offset = current_offset-decal;
            if(current_offset > offset_min) {
                window.setTimeout("slide()", vitesse);
            }
        }else{
            scd('l');
        }        
    }
}

function newsletter(l,c) {
    window.open("http://www.sonnerie.net/popup_newsletter.php?l=" + l + "&c=" + c + "", "", "toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=349, height=220, left=0, top=0");
}

function infoedit(l,c,v) {
    window.open("http://www.sonnerie.net/external/DrtTop/info/infoedit.php?l=" + l + "&c=" + c + "&a=" +v, "", "toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=300, height=150, left=0, top=0");
}


function conditions()
{
	 window.open("http://orderpopup.sonnerie.net/external/DrtTop/cgv/text_fr.php?lang=FR&a=01net&pays=FR", "", "toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=0, copyhistory=0, menuBar=0, width=600, height=400, left=0, top=0");
}
function bookmark(name, url) {
    var NSstring = "Click [Ctrl + D] ";
    var OPstring = "Click [Ctrl + T]";

    var agt = navigator.userAgent.toLowerCase();
    var app = navigator.appName.toLowerCase();
    var ieAgent = agt.indexOf('msie');
    var nsAgent = app.indexOf('netscape');
    var opAgent = app.indexOf('opera');
    if (ieAgent!= -1) { 
        window.external.addFavorite(window.location.href,document.title) 
    } else if (nsAgent!= -1){ 
        alert(NSstring); 
    } else if (opAgent!= -1){
        alert(OPstring); 
    }
}

/* XITI */

var xtdr = 30;
var xw = window;
var xd = document;     //cette ligne ne doit surtout pas Ãªtre changÃ©e
xtnv = (xw.xtnv!=null) ? xw.xtnv : xd ;    //remplacer xd par parent.document si la page est dans une frame
xtsd = (xw.xtsd!=null) ? xw.xtsd : "http://www" ;
xtsite = (xw.xtsite!=null) ? xw.xtsite : 0;
xtn2 = (xw.xtn2!=null) ? "&s2="+xw.xtn2 : "";
xtp = (xw.xtpage!=null) ? xw.xtpage : "";
xtdi = (xw.xtdi!=null) ? "&di=" + xw.xtdi : "";
xtdmc = (xw.xtdmc!=null) ? ";domain=" + xw.xtdmc  : "" ;
xtrd = (xtsite=="redirect") ? true : false;
xtprm = (xw.xtprm!=null) ? xw.xtprm : "";
xts = screen;
var xtxp = new Date();
xtxp.setTime(xtxp.getTime()+(xtdr*1000));
var xtdate = new Date();

function Getxtorcookie(nom)
{
    var arg = nom + "=";
    var i = 0 ;
    while (i<xd.cookie.length)
    {
        var j = i + arg.length;
        if (xd.cookie.substring(i,j) == arg) {return valeurxtorcook(j);}
        i = xd.cookie.indexOf(" ",i) + 1;
        if (i==0) {break;}
    }
    return null;
}

function valeurxtorcook(index)
{
        var fin = xd.cookie.indexOf(";",index);
        if (fin==-1) {fin=xd.cookie.length;};
        return unescape(xd.cookie.substring(index,fin));
}

function recupxtor(param)
{
        var xturl = xtnv.location.search;
        xtpos = xturl.indexOf(param);
        if (xtpos > 0)
        {
            chq = xturl.substring(1, xturl.length);
            mq = chq.substring(chq.indexOf(param), chq.length);
            pos3 = mq.indexOf("&");
            if (pos3 == -1) pos3 = mq.indexOf("%26")
            if (pos3 == -1) pos3 = mq.length;
            return mq.substring(mq.indexOf("=")+1, pos3);
        }
        else
        {    return null; }
}

function xt_med(type,section,page,x1,x2,x3,x4,x5)
{
    xt_img = new Image();
    xt_ajout = (type=="F") ? "" : (type=="M") ? "&a="+x1+"&m1="+x2+"&m2="+x3+"&m3="+x4+"&m4="+x5 : "&clic="+x1;
    Xt_im = xtsd+'.xiti.com/hit.xiti?s='+xtsite+'&s2='+section;
    Xt_im += '&p='+page+xt_ajout+'&hl=' + xtdate.getHours() + 'x' + xtdate.getMinutes() + 'x' + xtdate.getSeconds();
    if(parseFloat(navigator.appVersion)>=4)
    {Xt_im += '&r=' + xts.width + 'x' + xts.height + 'x' + xts.pixelDepth + 'x' + xts.colorDepth;}
    xt_img.src = Xt_im;
    if ((x2 != null)&&(x2!=undefined)&&(type=="C"))
    { if ((x3=='')||(x3==null)) { document.location = x2} else {xfen = window.open(x2,'xfen',''); xfen.focus();}}
    else
    {return;}
}

if((xtsite!=0)||(xtrd))
{
        xtourl_rf = recupxtor("xtref");
        if (!xtrd)
        {    
            var xtnav = navigator.appName+" "+navigator.appVersion;
            var xtIE = (xtnav.indexOf('MSIE'));
            if (xtIE>=0) {xtvers = parseInt(xtnav.substr(xtIE+5));xtIE=true;}
            else {xtvers = parseFloat(navigator.appVersion);xtIE=false;}
            var xtnet=(xtnav.indexOf('Netscape') >=0);
            var xtmac=(xtnav.indexOf('Mac') >=0);
            var xtOP=(navigator.userAgent.indexOf('Opera') >=0);
            if((xtIE)&&(xtvers >=5)&&(!xtmac)&&(!xtOP)&&(!xtrd))
             {
                xd.body.addBehavior("#default#clientCaps");
                xtconn = '&cn=' + xd.body.connectionType;
                xd.body.addBehavior("#default#homePage");
                xthome = (xd.body.isHomePage(location.href))? '&hm=1': '&hm=0';
                xtresr = '&re='+xd.body.offsetWidth+'x'+xd.body.offsetHeight;
             }
            else
             {xtconn = ''; xthome='';if(xtvers >=5){xtresr = '&re='+xw.innerWidth+'x'+xw.innerHeight;}else{xtresr =''};}
            if((xtnet)&&(xtvers >=4)||(xtOP)){var xtlang = '&lng=' + navigator.language;}
            else {if((xtIE)&&(xtvers >=4)&&(!xtOP)){var xtlang = '&lng=' +navigator.userLanguage;} else {xtlang = '';}}
        
            Xt_r = (xtourl_rf!=null) ? xtourl_rf.replace(/[<>]/g, '') : xtnv.referrer.replace(/[<>]/g, '') ;
            if(Xt_r=="")    {    Xt_r = Getxtorcookie("xtref");    Xt_r = (Xt_r==null) ? "" : Xt_r;    }
            
            Xt_param = 's='+xtsite+xtn2+'&p='+xtp+'&hl='+xtdate.getHours()+'x'+xtdate.getMinutes()+'x'+xtdate.getSeconds();
            Xt_param += xtdi+xtprm+xtconn+xthome+xtlang;
            Xt_i = '<img width="1" height="1" src="'+xtsd+'.xiti.com/hit.xiti?'+Xt_param;
            if(xtvers >=4)
            {Xt_i += '&r=' + xts.width + 'x' + xts.height + 'x' + xts.pixelDepth + 'x' + xts.colorDepth;}
            xd.write(Xt_i + xtresr + '&ref='+Xt_r.replace(/&/g, '$') + '">');
        }
        else
        {
            if(xtourl_rf==null)
            {
                xtref = xtnv.referrer.replace(/[<>]/g, '').replace(/&/g, '$');
                xd.cookie = "xtref=" + xtref + " ;expires=" + xtxp.toGMTString() + " ;path=/;"+xtdmc;
            }
        }
}


/*	Unobtrusive Flash Objects (UFO) v3.02 <http://www.bobbyvandersluis.com/ufo/>
	Copyright 2005, 2006 Bobby van der Sluis
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var UFO = {
	requiredAttrParams: ["movie", "width", "height", "majorversion", "build"],
	optionalAttrEmb: ["name", "swliveconnect", "align"],
	optionalAttrObj: ["id", "align"],
	optionalAttrParams: ["play", "loop", "menu", "quality", "scale", "salign", "wmode", "bgcolor", "base", "flashvars", "devicefont", "allowscriptaccess"],
	ximovie: "ufo.swf",
	xiwidth: "215",
	xiheight: "138",
	
	is_w3cdom: (typeof document.getElementById != "undefined" && typeof document.getElementsByTagName != "undefined" && (typeof document.createElement != "undefined" || typeof document.createElementNS != "undefined")),
	is_ie: (navigator.userAgent.toLowerCase().indexOf("msie") != -1 && navigator.userAgent.toLowerCase().indexOf("opera") == -1),
	is_safari: (navigator.userAgent.toLowerCase().indexOf("safari") != -1),
	is_win: (navigator.userAgent.toLowerCase().indexOf("win") != -1),
	is_mac: (navigator.userAgent.toLowerCase().indexOf("mac") != -1),
	is_XML: (typeof document.contentType != "undefined" && document.contentType.indexOf("xml") > -1),
	
	foList: [],
		
	create: function(FO, id) {
		if (!UFO.is_w3cdom) return;
		UFO.foList[id] = UFO.updateFO(FO);
		UFO.createStyleRule("#" + id, "visibility:hidden;");
		UFO.domLoad(id);
	},

	updateFO: function(FO) {
		if (typeof FO.xi != "undefined" && FO.xi == "true") {
			if (typeof FO.ximovie == "undefined") FO.ximovie = UFO.ximovie;
			if (typeof FO.xiwidth == "undefined") FO.xiwidth = UFO.xiwidth;
			if (typeof FO.xiheight == "undefined") FO.xiheight = UFO.xiheight;
		}
		else {
			FO.xi = false;
		}
		FO.domLoaded = false;
		return FO;
	},

	domLoad: function(id) {
		var timer = setInterval(function() { // doesn't work in IE/Mac
			if((document.getElementsByTagName("body")[0] != null || document.body != null) &&  document.getElementById(id) != null) {
				UFO.main(id);
				clearInterval(timer);
			}
		}, 250);
		if (typeof document.addEventListener != "undefined") {
			document.addEventListener("DOMContentLoaded", function() { UFO.main(id); clearInterval(timer); } , null); // Mozilla only
		}
	},

	main: function(id) {
		var FO = UFO.foList[id];
		if (FO.domLoaded) return; // for Mozilla, only execute once
		UFO.foList[id].domLoaded = true;
		document.getElementById(id).style.visibility = "hidden";
		if (UFO.hasRequiredAttrParams(id)) {
			if (UFO.hasFlashVersion(FO.majorversion, FO.build)) {
				UFO.writeFlashObject(id);
			}
			else if (FO.xi && UFO.hasFlashVersion("6", "65")) {
				UFO.createModalDialog(id);
			}
		}
		document.getElementById(id).style.visibility = "visible";
	},
	
	createStyleRule: function(selector, declaration) {
		if (UFO.is_ie && UFO.is_mac) return; // bugs in IE/Mac
		var head = document.getElementsByTagName("head")[0]; 
		var style = UFO.createElement("style");
		if (!(UFO.is_ie && UFO.is_win)) {
			var styleRule = document.createTextNode(selector + " {" + declaration + "}");
			style.appendChild(styleRule); // bugs in IE/Win
		}
		style.setAttribute("type", "text/css");
		style.setAttribute("media", "screen"); 
		head.appendChild(style);
		if (UFO.is_safari && UFO.is_XML) { head.innerHTML += ""; } // force Safari repaint for MIME type application/xhtml+xml
		if (UFO.is_ie && UFO.is_win && document.styleSheets && document.styleSheets.length > 0) {
			var lastStyle = document.styleSheets[document.styleSheets.length - 1];
			if (typeof lastStyle.addRule == "object") {
				lastStyle.addRule(selector, declaration);
			}
		}
	},

	createElement: function(el) {
		return (typeof document.createElementNS != "undefined") ?  document.createElementNS("http://www.w3.org/1999/xhtml", el) : document.createElement(el);
	},

	hasRequiredAttrParams: function(id) {
		var FO = UFO.foList[id];
		for (var i = 0; i < UFO.requiredAttrParams.length; i++) {
			if (typeof FO[UFO.requiredAttrParams[i]] == "undefined") return false;
		}
		return true;
	},
	
	hasFlashVersion: function(majorVersion, buildVersion) {
		var reqVersion = parseFloat(majorVersion + "." + buildVersion);
		if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") {
			var desc = navigator.plugins["Shockwave Flash"].description;
			if (desc) {
				var versionStr = desc.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
				var major = parseInt(versionStr.replace(/^(.*)\..*$/, "$1"));
				var build = parseInt(versionStr.replace(/^.*r(.*)$/, "$1"));
				var flashVersion = parseFloat(major + "." + build);
			}
		}
		else if (window.ActiveXObject) {
			try {
				var flashObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				var desc = flashObj.GetVariable("$version");
				if (desc) {
					var versionArr = desc.replace(/^\S+\s+(.*)$/, "$1").split(",");
					var major = parseInt(versionArr[0]);
					var build = parseInt(versionArr[2]);
					var flashVersion = parseFloat(major + "." + build);
				}
			}
			catch(e) {}
		}
		if (typeof flashVersion != "undefined"){
			return (flashVersion >= reqVersion ? true : false); 
		}
		return false;
	},

	writeFlashObject: function(id) {
		var el = document.getElementById(id);
		if (typeof el.innerHTML == "undefined") return;
		var FO = UFO.foList[id];
		if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") {
			try	{ // older versions of Gecko only support innerHTML get and not set
				el.innerHTML = "ufo-test";
			}
			catch (e) {}
			if (el.innerHTML != "ufo-test") {
				while(el.hasChildNodes()) {
					el.removeChild(el.firstChild);
				}
				var embed = UFO.createElement("embed");
				embed.setAttribute("type", "application/x-shockwave-flash");
				embed.setAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
				embed.setAttribute("src", FO.movie);
				embed.setAttribute("width", FO.width);
				embed.setAttribute("height", FO.height);
				for (var i = 0; i < UFO.optionalAttrEmb.length; i++) {
					if (typeof FO[UFO.optionalAttrEmb[i]] != "undefined") {
						embed.setAttribute(UFO.optionalAttrEmb[i], FO[UFO.optionalAttrEmb[i]]);
					}
				}
				for (var i = 0; i < UFO.optionalAttrParams.length; i++) {
					if (typeof FO[UFO.optionalAttrParams[i]] != "undefined") {
						embed.setAttribute(UFO.optionalAttrParams[i], FO[UFO.optionalAttrParams[i]]);
					}
				}	
				el.appendChild(embed);
			}
			else {
				var embHTML = "";
				for (var i = 0; i < UFO.optionalAttrEmb.length; i++) {
					if (typeof FO[UFO.optionalAttrEmb[i]] != "undefined") {
						embHTML += ' ' + UFO.optionalAttrEmb[i] + '="' + FO[UFO.optionalAttrEmb[i]] + '"';
					}
				}
				for (var i = 0; i < UFO.optionalAttrParams.length; i++) {
					if (typeof FO[UFO.optionalAttrParams[i]] != "undefined") {
						embHTML += ' ' + UFO.optionalAttrParams[i] + '="' + FO[UFO.optionalAttrParams[i]] + '"';
					}
				}
				el.innerHTML = '<embed type="application/x-shockwave-flash" src="' + FO.movie + '" width="' + FO.width + '" height="' + FO.height + '" pluginspage="http://www.macromedia.com/go/getflashplayer"' + embHTML + '></embed>';
			}
		}
		else {
			var objAttrHTML = "";
			for (var i = 0; i < UFO.optionalAttrObj.length; i++) {
				if (typeof FO[UFO.optionalAttrObj[i]] != "undefined") {
					objAttrHTML += ' ' + UFO.optionalAttrObj[i] + '="' + FO[UFO.optionalAttrObj[i]] + '"';
				}
			}
			var objParamHTML = "";
			for (var i = 0; i < UFO.optionalAttrParams.length; i++) {
				if (typeof FO[UFO.optionalAttrParams[i]] != "undefined") {
					objParamHTML += '<param name="' + UFO.optionalAttrParams[i] + '" value="' + FO[UFO.optionalAttrParams[i]] + '" />';
				}
			}
			var protocol = (window.location.protocol == "https:" ? "https:" : "http:");
			el.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + objAttrHTML + ' width="' + FO.width + '" height="' + FO.height + '" codebase="' + protocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + FO.majorversion + ',0,' + FO.build + ',0"><param name="movie" value="' + FO.movie + '" />' + objParamHTML + '</object>';
		}
	},

	createModalDialog: function(id) {
		var FO = UFO.foList[id];
		UFO.createStyleRule("html", "height:100%; overflow:hidden;");
		UFO.createStyleRule("body", "height:100%; overflow:hidden;");
		UFO.createStyleRule("#xi-con", "position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#333; filter:alpha(opacity:50); -khtml-opacity:0.5; -moz-opacity:0.5; opacity:0.5;");
		UFO.createStyleRule("#xi-mod", "position:absolute; left:50%; top:50%; margin-left: -" + (parseInt(FO.xiwidth)/2) + "px; margin-top: -" + (parseInt(FO.xiheight)/2) + "px; width:" + FO.xiwidth + "px; height:" + FO.xiheight + "px;");
		var body = document.getElementsByTagName("body")[0];
		var container = UFO.createElement("div");
		container.setAttribute("id", "xi-con");
		var dialog = UFO.createElement("div");
		dialog.setAttribute("id", "xi-mod");
		container.appendChild(dialog);
		body.appendChild(container);
		var MMredirectURL = window.location; // MM code
		document.title = document.title.slice(0, 47) + " - Flash Player Installation"; // MM code
		var MMdoctitle = document.title; // MM code
		if (UFO.is_ie && UFO.is_win) {
			var xiFO = { movie:FO.ximovie, width:FO.xiwidth, height:FO.xiheight, majorversion:"6", build:"65", flashvars:"MMredirectURL=" + MMredirectURL + "&amp;MMplayerType=ActiveX&amp;MMdoctitle=" + MMdoctitle };
		}
		else {
			var xiFO = { movie:FO.ximovie, width:FO.xiwidth, height:FO.xiheight, majorversion:"6", build:"65", flashvars:"MMredirectURL=" + MMredirectURL + "&amp;MMplayerType=PlugIn&amp;MMdoctitle=" + MMdoctitle };
		}
		UFO.foList["xi-mod"] = xiFO;
		UFO.writeFlashObject("xi-mod");
	},

	expressInstallCallback: function() {
		var body = document.getElementsByTagName("body")[0];
		var dialog = document.getElementById("xi-con");
	    body.removeChild(dialog);
		UFO.createStyleRule("body", "height:auto; overflow:auto;");
		UFO.createStyleRule("html", "height:auto; overflow:auto;");
	}

};