/* All intellectual property rights relating to this code are owned by Euro RSCG Interaction */

function _getCookie(name) { var a=document.cookie.indexOf(name); if (a==-1) return null; a+=name.length; var b=document.cookie.indexOf(';',a); if (b==-1) b=document.cookie.length; if ((b-a)>1) return document.cookie.substring(a+1,b); return null; }

var flash_version=5;
var _nsmac_fls='flash/macflash.swf';

var _loc=location.toString(); var _swf=0; var nsv=0;  var SWF=0;
if (NS6) nsv=navigator.vendorSub;

function _returnQS() { _qs=(_loc.indexOf('SWF=1')!=-1); _swf=_qs; }
function _macflash() { _qst=(_loc.indexOf('?')!=-1); if (_qst) { _ch='&'; } else { _ch='?'; } window.location=_loc+_ch+'SWF=1'; }
function _setView() { document.cookie='SWF=1;'; SWF=1; }

var sfobj='ShockwaveFlash.ShockwaveFlash.'+eval(flash_version);
var VBS='<SCRIP'; VBS+='T LANGUAGE=VBScript\> \n'; VBS+='on error resume next \n'; VBS+='SWF=IsObject(CreateObject(sfobj)) \n'; VBS+='</S'; VBS+='CRIPT\> \n';
if (!MAC) { document.write(VBS); }
var plugin=(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0);
if (plugin&&parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=flash_version) { _setView() }
if (_getCookie('SWF')=='1') { _swf=1; }
if ((NS6&&(nsv<6.2))||IE&&MAC) { if (_swf<1) { SWF=0; flash(_nsmac_fls,'#ffffff',1,1,'',1); } else { _setView() } }

function flash(src,color,width,height,nofls,overwrite) { var EC; if (SWF||overwrite) { EC='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=/#version=/default.htm'+flash_version+',0,0,0" ID=movie WIDTH='+width+' HEIGHT='+height+'><PARAM NAME=movie VALUE="'+src+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE='+color+'><EMBED NAME="movie" SRC="'+src+'" quality=high bgcolor='+color+' menu=false WIDTH='+width+' HEIGHT='+height+' TYPE="application/x-shockwave-flash" swLiveConnect="true" PLUGINSPAGE="../www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>'; } else { EC=nofls; } document.write(EC); }

var nofls;
function noFlash(h) {
nofls='<table border="0" cellpadding="0" cellspacing="0" width="756" height="'+h+'">';
nofls+='<tr><td bgcolor="#669900"><img src="../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=/i/s.gif" width="102" height="'+(h-10)+'" /></td>';
nofls+='<td bgcolor="#999999"><img src="i/m/p666.gif" width="1" height="1" /></td>';
nofls+='<td><img src="i/s.gif" width="20" height="1" /></td>';
nofls+='<td valign="top"><img src="i/s.gif" width="633" height="14" />';
nofls+='<p>Portions of this website uses Macromedia Flash Technology.<br />';
nofls+='We do not detect the Flash 5 plug-in currently installed on your browser.</p>';
nofls+='<p>Simply <a href="../www.macromedia.com/default.htm" target="_blank"><font color="#6666cc">click here</font></a> to download the Flash plug-in from Macromedia free of charge.</p>';
nofls+='<p>&#160;</p></td></tr>';
nofls+='<tr><td colspan="4"><img src="i/m/p666.gif" width="756" height="1" /></td></tr>';
nofls+='<tr><td><img src="i/s.gif" width="102" height="10" /></td>';
nofls+='<td><img src="i/m/p666.gif" width="1" height="10" /></td>';
nofls+='<td><img src="i/s.gif" width="20" height="1" /></td>';
nofls+='<td><img src="i/s.gif" width="401" height="1" /><img src="i/m/nf_blue.gif" width="232" height="10" /></td></tr>';
nofls+='</table>'; return nofls; }

function goLink(n) { if (n==6) window.open(links[n],'newWin'); else window.location=links[n]; }

function WinPop(url,name,w,h,re,sc,t,l,d,st,m,sx,sy){
  var options = '';
  function comma(){if(options.length > 1) options += ',';}
  function getX(){if(IE){return 'left=' + sx;}else{return 'screenX=' + sx;}}
  function getY(){if(IE){return 'top=' + sy;}else{return 'screenY=' + sy;}}

  if(w)  {comma(); options += 'width=' + w;}
  if(h)  {comma(); options += 'height=' + h;}
  if(re) {comma(); options += 'resizable=' + re;}
  if(sc) {comma(); options += 'scrollbars=' + sc;}
  if(t)  {comma(); options += 'toolbar=' + t;}
  if(l)  {comma(); options += 'location=' + l;}
  if(d)  {comma(); options += 'directories=' + d;}
  if(st) {comma(); options += 'status=' + st;}
  if(m)  {comma(); options += 'menubar=' + m;}
  if(sx) {comma(); options += getX();}
  if(sy) {comma(); options += getY();}

  mywin = window.open(url,name,options)//alert(options);//alert(url);
}

function doVideo(a,b){
  var ext = ( a.indexOf('.') == -1 )?'.mpeg':'';
  
  if(a){
    if(IE) WinPop('video/low/'+a+ext,"Video",365,280,1,0,0,0,0,0,0,10,10);
    else location = 'video/low/'+a+ext;
  }
  if(b)alert('doVideo([1])'+b);
}