var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isSafari  = (navigator.appVersion.indexOf("Safari") != -1) ? true : false;
var isMacFinal=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)?true:false;
var hBack=0;
var g_Langue,g_MDB;
var g_iBack,x_iBack;
var g_LoadingIFrame=new Array;
var myWidth,myHeight,OffsetX=0,OffsetY=0,hasBack=0,OverlayOffsetX=0;
var first=1;
var FlashMinSX,FlashMinSY,FlashCurSY,FlashHasLayer,HasScroll;
var SizeX1,SizeY1,SizeX2,SizeY2;
var HasScrollH=0;
var CountTAB=0;

SizeX1=SizeY1=SizeX2=SizeY2=0;

function BuildSize()
{
  if( typeof( window.innerWidth ) == 'number' ) 
	{
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  }
	else 
	if( document.documentElement &&( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  }
	else 
	if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
	myWidth-=SizeX1+SizeX2;
	myHeight-=SizeY1+SizeY2;
}


function BuildClip()
{
	var i;
	for (i=0;i<10;i++)
	{
		var clp=document.getElementById("CLayerD"+i);
		if (clp.style.visibility!="visible")
			continue;
		clp=document.getElementById("CLayer"+i);
		if (clp.style.visibility!="visible")
			continue;
		var x=clp.Xori;
		var y=clp.Yori;
		if (x==undefined)
		  x=y=0;
		clp.style.left=x+OffsetX;
		clp.style.top=y+OffsetY;
		var sx=parseInt(clp.style.width);
		var sy=parseInt(clp.style.height);
			// Top Right Bottom Left
		if (x+OffsetX+sx>myWidth-16)
			sx=(myWidth-16)-x-OffsetX;
		if (y+OffsetY+sy>myHeight-16*HasScrollH)
			sy=(myHeight-16*HasScrollH)-y-OffsetY;
    clp.style.clip="rect(0,"+sx+","+sy+",0)";
  }
}

function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


function ChangeScroll()
{
  var flash;
  flash=document.getElementById("OpenFlash");
	flash.SetVariable("_root.WindowPosX",f_scrollLeft());
}

function ResizeFlash()
{
  BuildSize();

  var flash;
  flash=document.getElementById("OpenFlash");
	var ff=typeof flash.SetVariable;
	if (ff!="undefined" && ff!="unknown")
	{
    flash.SetVariable("_root.WindowSizeX",myWidth);
    flash.SetVariable("_root.WindowSizeY",myHeight);
    flash.SetVariable("_root.WindowPosX",f_scrollLeft());
	}

	if (HasScroll)
	{
	  flash.TGotoLabel("_level0/__ScrollManage","SetSize");
    BuildClip();
	}
	else
	{
		if (myWidth<FlashMinSX)
			myWidth=FlashMinSX;
		if (myHeight<FlashCurSY)
			myHeight=FlashCurSY;
		if (myHeight<FlashMinSY)
			myHeight=FlashMinSY;
	  if (FlashHasLayer)
	  {
		  if (x_Align=="T")
			  OverlayOffsetX=myWidth/2-FlashMinSX/2;
			else
			  OverlayOffsetX=0;
			var i;
			for (i=0;i<10;i++)
			{
				var clp=document.getElementById("CLayer"+i);
				if (clp.style.visibility!="visible")
					continue;
				clp=document.getElementById("CLayerD"+i);
				if (clp.style.visibility!="visible")
					continue;
				var x=clp.Xori;
				if (x==undefined)
					x=0;
				clp.style.left=x+OverlayOffsetX;
			}
    }
	}
  if (document.getElementById("flashObject"))
	{
    document.getElementById("flashObject").style.width=myWidth;
    document.getElementById("flashObject").style.height=myHeight;
	}
	if (SizeX1!=0)
    document.getElementById("LLayer").style.height=myHeight;
	if (SizeX2!=0)
	{
	  document.getElementById("RLayerD").style.left=myWidth+SizeX1;
    document.getElementById("RLayer").style.height=myHeight;
	}
	if (SizeY2!=0)
	{
    document.getElementById("BLayerD").style.top=SizeY1+myHeight;
    document.getElementById("BLayer").style.width=SizeX1+SizeX2+myWidth;
	}
	if (SizeY1!=0)
    document.getElementById("TLayer").style.width=SizeX1+SizeX2+myWidth;
}

function CallHelp(key)
{
  neww=window.open("/WebEdit/CallHelp.asp?Key="+key,"OpenSiteHelp","toolbar=0,status=0,menubar=0,topmost=1,dependent=1,alwaysRaised=1");
	neww.focus();
}

function CallPrint(par,sizex,sizey)
{
  window.open("/WebEdit/PrintPage.asp?SizeX="+sizex+"&"+par,"OpenSiteDump","resizable=yes,toolbar=0,status=0,menubar=0,topmost=1,dependent=1,scrollbars=1,alwaysRaised=1,width="+(sizex+32));
}

function CallPrintFlat(par,sizex,sizey)
{
  window.open("/WebEdit/PrintPageFlat.asp?SizeX="+sizex+"&"+par,"OpenSiteDump","resizable=yes,toolbar=0,status=0,menubar=0,topmost=1,dependent=1,scrollbars=1,alwaysRaised=1,width="+(sizex+32));
}

function CallPrint2(url)
{
  window.open(url,"OpenSiteDump","resizable=yes,toolbar=0,status=0,menubar=0,topmost=1,dependent=1,scrollbars=1,alwaysRaised=1");
}

function replace(string,text,by) 
{
  var reg=new RegExp("("+text+")","g");
  return string.replace(reg,by);
}

function DecodeStr(str)
{
  var str2,p,i,c;
	var pos=0;

  do
  {
    p=str.indexOf("##",pos);
    if (p==-1)
      break;
		pos=p+1;
		str2=str.substr(p+2,str.indexOf(";",p+2)-p-2);
		c=parseInt(str2,10);
		if (!c)
		  str=replace(str,"##"+str2+";","##");
		else
		  str=replace(str,"##"+str2+";",String.fromCharCode(c));
  }
  while(1);
 	return(str);
}

function EncodeHTML(str)
{
  str=replace(str,'À','&Agrave;');
  str=replace(str,'à','&agrave;');
  str=replace(str,'Â','&Acirc;');
  str=replace(str,'â','&acirc;');
  str=replace(str,'Ç','&Ccedil;');
  str=replace(str,'ç','&ccedil;');
  str=replace(str,'È','&Egrave;');
  str=replace(str,'è','&egrave;');
  str=replace(str,'É','&Eacute;');
  str=replace(str,'é','&eacute;');
  str=replace(str,'Ê','&Ecirc;');
  str=replace(str,'ê','&ecirc;');
  str=replace(str,'Ô','&Ocirc;');
  str=replace(str,'ô','&ocirc;');
  str=replace(str,'€','&euro;');
  str=replace(str,'£','&pound;');
  str=replace(str,'«','&laquo;');
  str=replace(str,'»','&raquo;');
  str=replace(str,'©','&copy;');
	return(str);
}

function IFrameLoaded(id)
{
  if (g_LoadingIFrame[id])
	{
	  var flash;

    flash=document.getElementById("OpenFlash");
		flash.SetVariable("_root.LayerLoaded"+id,1);
	}
  g_LoadingIFrame[id]=false;
}

function OpenFlash_DoFSCommand(command, args) 
{
	if (!isIE && first && !isMacFinal)
	{
	  var flash;

 	  flash=document.getElementById("OpenFlash");
		flash.SetVariable("_global.m_Flash8",0);
		first=0;
	}
	if (command=='HasLayer')
	{
		return;
	}
	if (command=='GoURL')
	{
	  return;
	}
  if (command=='NoTAB')
	{
	  var way=parseInt(args);
		if (way==0)
		{
		  CountTAB-=1;
			if (CountTAB==0)
			  unsetEventListener(disableTabKey);
			if (CountTAB<0)
			  CountTAB=0;
		}
		else
		{
  		CountTAB++;
			if (CountTAB==1)
			  setEventListener(disableTabKey);
		}
	}
  if (command=='ScrollManage')
	{
	  var flash;

    flash=document.getElementById("OpenFlash");
		flash.SetVariable("_root.WindowSizeX",myWidth);
	  flash.SetVariable("_root.WindowSizeY",myHeight);
	  flash.TGotoLabel("_level0/__ScrollManage","SetSize");
		return;
	}
  if (command=='Title')
	{
	  if (args=="")
		  document.title=xp_PageTitle;
		else
	    document.title=DecodeStr(args);//EncodeHTML(args);
		return;
	}
  if (command=='Urchin')
	{
    urchinTracker(args);
		return;
	}
  if (command=='Back')
	{
	  if (g_iBack)
		{
	    hasBack=1;
      document.getElementById("Back").src="/WebEdit/IBack.asp?Back="+args+"&HB="+hBack+"&Title="+document.title;
		  hBack++;
		}
		return;
	}
  if (command=='SetAnchor')
	{
	  if (!g_iBack)
		  SWFAddress.setValue(args);
		return;
	}
  if (command=='MaxSizeY')
	{
    var sy=parseInt(args);

    if (HasScroll)
		  return;
		BuildSize();
	  if (myHeight<sy)
	    myHeight=sy;
  	if (myHeight<FlashMinSY)
  	  myHeight=FlashMinSY;
	  FlashCurSY=sy;

    document.getElementById("flashObject").style.height=myHeight;
		if (SizeX1!=0)
			document.getElementById("LLayer").style.height=myHeight;
		if (SizeX2!=0)
			document.getElementById("RLayer").style.height=myHeight;
  	if (SizeY2!=0)
      document.getElementById("BLayerD").style.top=SizeY1+myHeight;
		return;
	}
  if (command=='MaxSizeX')
	{
    var sx=parseInt(args);

    if (HasScroll)
		  return;
		BuildSize();
		if (x_Align!='T' || sx>=2000)
		{
	    if (myWidth<sx)
	      myWidth=sx;
		}
  	if (myWidth<FlashMinSX)
  	  myWidth=FlashMinSX;
	  FlashCurSX=sx;

    document.getElementById("flashObject").style.width=myWidth;
		return;
		if (SizeY1!=0)
			document.getElementById("LLayer").style.width=myWidth;
		if (SizeY2!=0)
			document.getElementById("RLayer").style.width=myWidth;
  	if (SizeX2!=0)
      document.getElementById("BLayerD").style.left=SizeX1+myWidth;
		return;
	}
	if (command=='HTMLLayer')		// TopLayer : SizeY,Url
	{
	  var mode=args.substr(0,1);
		args=args.substr(2);
	  if (args=="")
		{
			document.getElementById(mode+"Layer").src="";
			switch(mode)
			{
			  case "T":
				  SizeY1=0;
			    document.getElementById(mode+"Layer").style.height=0;
			    document.getElementById("flashObject").style.top=0;
					break;
			  case "B":
				  SizeY2=0;
			    document.getElementById(mode+"Layer").style.height=0;
			    document.getElementById("flashObject").style.top=0;
					break;
			  case "L":
				  SizeX1=0;
			    document.getElementById(mode+"Layer").style.width=0;
			    document.getElementById("flashObject").style.left=0;
					break;
			  case "R":
				  SizeX2=0;
			    document.getElementById(mode+"Layer").style.width=0;
			    document.getElementById("flashObject").style.left=0;
					break;
			}
			document.getElementById(mode+"Layer").style.visibility="hidden";
		}
		else
		{
	    var j=args.indexOf(',');
			var sy;

		  if (j==-1)
			  sy=parseInt(args);
			else
			{
				var url=args.substr(j+1);

				sy=parseInt(args.substr(0,j));
				document.getElementById(mode+"Layer").src=url;
			}
			switch(mode)
			{
			  case "T":
				  SizeY1=sy;
					document.getElementById(mode+"Layer").style.height=sy;
					document.getElementById("flashObject").style.top=sy;
					document.getElementById(mode+"Layer").style.width=SizeX1+SizeX2+myWidth;
					break;
			  case "B":
				  SizeY2=sy;
					document.getElementById(mode+"Layer").style.height=sy;
					document.getElementById(mode+"LayerD").style.top=SizeY1+myHeight;
					document.getElementById(mode+"Layer").style.width=SizeX1+SizeX2+myWidth;
					break;
				case "L":
				  SizeX1=sy;
					document.getElementById(mode+"Layer").style.width=sy;
					document.getElementById("flashObject").style.left=sy;
					document.getElementById(mode+"Layer").style.height=myHeight;
					document.getElementById(mode+"LayerD").style.top=SizeY1;
				  break;
				case "R":
				  SizeX2=sy;
					document.getElementById(mode+"Layer").style.width=sy;
					document.getElementById(mode+"Layer").style.height=myHeight;
					document.getElementById(mode+"LayerD").style.top=SizeY1;
					document.getElementById(mode+"LayerD").style.left=myWidth+SizeX1;
				  break;
			}
			document.getElementById(mode+"Layer").style.visibility="visible";
		}
		return;
	}
	if (command=='GetWebEdit')
	{
	  var flash;

	  flash=document.getElementById("OpenFlash");
		var lid=parseInt(args);
    var lay=window.frames["CLayer"+lid];
	//	flash.SetVariable("_root.EditorContent",lay.CKEDITOR.instances.editor1.getData());
		flash.SetVariable("_root.EditorContent",lay.oEdit1.getHTML());
	}
	if (command=='SetWebEdit')
	{
		var j=args.indexOf(':');
		var lid=parseInt(args.substr(0,j));
		args=DecodeStr(args.substr(j+1));
    var lay=window.frames["CLayer"+lid];
		args=replace(args,"<%","");
		args=replace(args,"%>","");
		//lay.CKEDITOR.instances.editor1.setData(args);
		var pos;
		pos=lay.document.getElementById("editor1")
		//alert("Set "+lay.document+"/"+pos);
		if (lay.oEdit1==undefined)
		  lay.editor1.value=args;
		else
  		lay.oEdit1.putHTML(args);
		return;
	}
	if (command=='OverflowLayer')
	{
	  var j=args.indexOf(',');
		if (j==-1)
		{
			var lid=parseInt(args);
			document.getElementById("CLayer"+lid).src="";
	    document.getElementById("CLayerD"+lid).style.width=0;
	    document.getElementById("CLayerD"+lid).style.height=0;
 			document.getElementById("CLayerD"+lid).style.visibility="hidden";
			document.getElementById("CLayer"+lid).style.visibility="hidden";
		}
		else
		{
		  var autosize=false;
			var lid=args.substr(0,j);
			if (lid.substr(0,1)=="*")
			{
			  lid=lid.substr(1);
				autosize=true;
			}
			lid=parseInt(lid);
			args=args.substr(j+1);
	    j=args.indexOf(',');
			var x=parseInt(args.substr(0,j));
			args=args.substr(j+1);
			j=args.indexOf(',');
			var y=parseInt(args.substr(0,j));
			args=args.substr(j+1);
			j=args.indexOf(',');
			var sx=parseInt(args.substr(0,j));
			args=args.substr(j+1);
			j=args.indexOf(',');
			var sy=parseInt(args.substr(0,j));
			url=args.substr(j+1);
		  var clp=document.getElementById("CLayerD"+lid);

      g_LoadingIFrame[lid]=true;

			if (url.substr(0,1)=="@")
			{
			  var d=new Date(); 
			  document.getElementById("CLayer"+lid).src="/WebEdit/GetWebContent.asp?Ref="+url.substr(1)+"&UID="+d.getTime()+"&MDB="+g_MDB+"&Langue="+g_Langue;
			}
			else
			if (url.substr(0,1)=="$")
			{
        var myIFrame=document.getElementById("CLayer"+lid);
        myIFrame.contentWindow.document.body.innerHTML=url.substr(1);
			}
			else
			  document.getElementById("CLayer"+lid).src=url;

			clp.style.left=x+OverlayOffsetX;
			clp.Xori=x;
			clp.style.top=y;
			clp.Yori=y;
			clp.style.width=sx;
			if (autosize)
			{
        var fram=document.getElementById("CLayer"+lid);
			  clp.style.height=fram.contentWindow.document.body.scrollHeight+16;
				flash=document.getElementById("OpenFlash");
				flash.SetVariable("_root.LayerHeight"+lid,parseInt(clp.style.height));
			}
			else
			  clp.style.height=sy;
     	clp.style.visibility="hidden";
  		clp.style.visibility="visible";
  		document.getElementById("CLayer"+lid).style.visibility="visible";

		  var clp=document.getElementById("CLayer"+lid);
			clp.style.scrollbarFaceColor=document.body.style.scrollbarFaceColor;
			clp.style.scrollbarArrowColor=document.body.style.scrollbarArrowColor;
			clp.style.scrollbarTrackColor=document.body.style.scrollbarTrackColor;
			clp.style.scrollbarDarkshadowColor=document.body.style.scrollbarDarkshadowColor;
			clp.style.scrollbarHighlightColor=document.body.style.scrollbarHighlightColor;
			clp.style.scrollbar3dlightColor=document.body.style.scrollbar3dlightColor;
			clp.style.scrollbarShadowColor=document.body.style.scrollbarShadowColor;

		  var clp=document.getElementById("CLayerD"+lid);
				// Top Right Bottom Left
			if (x+sx>myWidth-16)
			  sx=(myWidth-16)-x;
			//if (y+sy>FlashCurSY-16*HasScrollH)
			//  sy=(FlashCurSY-16*HasScrollH)-y;
			//clp.style.clip="rect(0,"+sx+","+sy+",0)";
		}
		return;
	}
	if (command=="HasScrollH")
	{
	  HasScrollH=parseInt(args);
		BuildClip();
		return;
	}
	if (command=="SetVPos")
	{
	  OffsetY=parseInt(args);
		BuildClip();
	  return;
	}
	if (command=="SetHPos")
	{
	  OffsetX=parseInt(args);
		BuildClip();
	  return;
	}
	if (command=="Wheel")
	{
	  scrollBy(0,parseInt(args)*8);
		return;
	}
	if (command=="ScrollColor")
	{
	  var j=args.indexOf(',');
    document.body.style.scrollbarFaceColor=args.substr(0,j);
		args=args.substr(j+1);
	  j=args.indexOf(',');
    document.body.style.scrollbarArrowColor=args.substr(0,j);
		args=args.substr(j+1);
	  j=args.indexOf(',');
    document.body.style.scrollbarTrackColor=args.substr(0,j);
		args=args.substr(j+1);
	  j=args.indexOf(',');
    document.body.style.scrollbarDarkshadowColor=args.substr(0,j);
		args=args.substr(j+1);
	  j=args.indexOf(',');
    document.body.style.scrollbarHighlightColor=args.substr(0,j);
		args=args.substr(j+1);
	  j=args.indexOf(',');
    document.body.style.scrollbar3dlightColor=args.substr(0,j);
		args=args.substr(j+1);
	  j=args.indexOf(',');
    document.body.style.scrollbarShadowColor=args.substr(0,j);
		return;
  }
	if (command=="SetScrollTop")
	{
	  scroll(0,0);
	  return;
	}
	if (command=="GotoScroll")
	{
	  var j=args.indexOf(',');
    var x=parseInt(args.substr(0,j));
		var y=parseInt(args.substr(j+1));
		//if (1)
	  //		x+=FlashCurSX/2;
	  scroll(x,y);
	  return;
	}
}

function IsBack(id)
{
  var flash;

  if (!hasBack || !g_iBack)
	  return;
  flash=document.getElementById("OpenFlash");
  flash.SetVariable("_root.__WantBackPage",id);
  flash.TGotoLabel("_root","OpenSite");
}

myTracker=function(id)
{
	flash=document.getElementById("OpenFlash");
	if (id.substr(1)=="/")
	  id=id.substr(1);
  flash.SetVariable("_root.__WantTrackPage",id);
  flash.TGotoLabel("_level0/__ScrollManage","SetSize");
}

function CheckBack(id,bck)
{
  if (id==undefined)
    return(false);
	if (id<hBack-1)
	{
	  IsBack(bck);
		return(true);
	}
	return(false);
}

function MM_openBrWindow(theURL,winName,features) 
{
  var wnd;

  wnd=window.open(theURL,winName,features);
	wnd.opener=self;
}
function flashGetHref() { return location.href; }
function flashPutHref(href) { location.href = href; }
function flashGetTitle() { return document.title; }
function flashPutTitle(title) { document.title = title; }

function disableTabKey (evt) 
{ 
  var event; 

  if (evt)
     event = evt; 
  else
	if (window.event)
    event = window.event; 
  if (event) 
	{ 
    var keyCode = event.keyCode ? event.keyCode : event.charCode; 
    if (keyCode == 9) 
		{ 
      if (event.preventDefault) 
        event.preventDefault(); 
      return false; 
    } 
  } 
} 


function setEventListener (eventListener) 
{ 
  if (document.addEventListener) 
    document.addEventListener('keypress', eventListener, true); 
  else 
	if (document.attachEvent)
   document.attachEvent('onkeydown', eventListener); 
  else
   document.onkeydown = eventListener; 
} 

function unsetEventListener (eventListener) 
{ 
  if (document.removeEventListener)
     document.removeEventListener('keypress', eventListener, true); 
  else
	if (document.detachEvent)
    document.detachEvent('onkeydown', eventListener); 
  else
    document.onkeydown = null; 
}

function InsertFlash(SizeXmini,SizeYmini,iback)
{
  x_SizeXmini=SizeXmini;
  x_SizeYmini=SizeYmini;
	x_iBack=iback
  var x_HasKbdBug=0;
  if (!isMacFinal && x_HasLayer)
  if (navigator.userAgent.toLowerCase().indexOf("firefox")!=-1 || isSafari)
    x_HasKbdBug=1;
  if (navigator.userAgent.toLowerCase().indexOf("firefox/2")!=-1)
	  x_HasLayer=0;
  if (navigator.userAgent.toLowerCase().indexOf("firefox/1")!=-1)
	  x_HasLayer=0;
  //setArrowListener();
  BuildSize();
  var clp=document.getElementById("flashObject");
	if (!isMacFinal)
    clp.style.position="absolute";
	else
    clp.style.position="";

	x_fv+='&WindowSizeX='+myWidth+'&WindowSizeY='+myHeight;
	x_fv+='&Browser='+navigator.userAgent.toLowerCase();
	x_fv+="&HasLayer="+x_HasLayer;
	x_fv+="&KBug="+x_HasKbdBug;

  var params = {}; 
	params.SeamlessTabbing="false";
	params.menu="false";
	params.quality="best";
	params.scale="noscale";
	params.salign=x_Align;
	params.devicefont="true";
  if (x_HasLayer==1)
	  params.wmode="transparent";
	params.FlashVars=x_fv;
	params.bgcolor=x_BackColor;
  
  swfobject.embedSWF(x_SWF,"OpenFlash","100%","100%",x_requiredMajorVersion+','+x_requiredMinorVersion+','+x_requiredRevision,"expressInstall.swf",{},params,{},callbackSWF);
}

function callbackSWF()
{
  g_iBack=x_iBack
	var jFF=navigator.userAgent.toLowerCase().indexOf("firefox");
	var NoFocus=false;
	if (jFF!=-1)
	{
		var ff=navigator.userAgent.toLowerCase().substr(jFF+8);
		if (ff.substr(0,1)<="1")
		{
			if (ff.substr(2,1)<"5")
				NoFocus=true;
		}
	}

	if (!NoFocus && !isMacFinal)
		document.getElementById("OpenFlash").focus();

	FlashMinSX=x_SizeXmini;
	FlashMinSY=x_SizeYmini;
	FlashCurSY=x_SizeYmini;
	FlashHasLayer=x_HasLayer;
	ResizeFlash();
	if (!x_iBack)
	{
  	SWFAddress.addId('OpenFlash');
    SWFAddress.setTracker("myTracker");
	}
}


var url=document.location; 
var strippedUrl=url.toString().split("#"); 
if (strippedUrl.length>1) 
{
  var anchorValue; 
  anchorvalue=strippedUrl[1]; 
	document.write('<div id="AutoSub" name=AutoSub style="position:absolute; top:0; left:0; width:0; height:0; z-index:11; overflow:hidden; visibility:0;">');
	document.write('<form name="myform" action="/" method="POST">');
	document.write('<input type="hidden" name="SubDirect" value="'+anchorvalue+'">');
	document.write('<input type="submit" value="" />');
	document.write('</form>');
	document.write('</div>');

//	document.myform.SubDirect.value=anchorvalue;
//  window.location.href="/?SubDirect="+anchorvalue;
 	document.myform.submit()
}

