//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

/*	
	Script written specifically for Best Parties by MJDIGITAL
	Used by permission - MJDIGITAL reserve all rights
	Author - Mark Jackson : March 2009
	http://www.mjdigital.co.uk
	
	This script automatically applies a separate focus style without having to
	add individual class attributes or javascript handlers to each form object
*/

fObjFocus = function(d) { // set focus class for selected form objects - resets onBlur
var x;
var d = (typeof(d)=='Object') ? d : document;
var tagList = new Array("INPUT","TEXTAREA","SELECT");
for (x in tagList) {
	var fObjEls = d.getElementsByTagName(tagList[x]); 
	for (var i=0; i<fObjEls.length; i++) {
		var arrtribs = fObjEls[i].getAttribute("TYPE");
		if ((arrtribs != "checkbox")&&(arrtribs != "radio")&&(arrtribs != "image")&&(arrtribs != "submit")) {
		fObjEls[i].onfocus=function() { 
			if(this.className!='quantity') {
				if(this.value==this.title) { this.value = ''; }
				if(isIE) {
					this.className="formObjHover";
				}
			}
		}
		}
		if((arrtribs == "submit")&&(isIE)) {	
			fObjEls[i].onmouseover=function() { this.className+=" formObjHover"; } 
			fObjEls[i].onmouseout=function() { this.className= this.className.replace(new RegExp(" formObjHover\\b"), "");  } 
		}
	if ((arrtribs != "checkbox")&&(arrtribs != "radio")&&(arrtribs != "image")&&(arrtribs != "submit")) {
		fObjEls[i].onblur=function() { 
				if(this.className!='quantity') {
					if(this.value=='') { this.value = this.title; 	}
					if(isIE) {
						this.className=''; //this.className.replace(new RegExp(" formObjHover\\b"), ""); 
					}
				}
			}
		} 
	} 
}
} 

if(window.addEventListener) window.addEventListener("load", fObjFocus, false); // for non IE browsers
else if(window.attachEvent) window.attachEvent("onload", fObjFocus);			 // for IE
<!--
function setNotice(state) {
	notice = document.getElementById('div_notice');
	notice.style.display = (state=='show') ? 'block' : 'none';
}

function BRB_PHP_DelWithCon(deletepage_url,field_name,field_value,messagetext) { //v1.0 - Deletes a record with confirmation
  if (confirm(messagetext)==1){
  	location.href = eval('\"'+deletepage_url+'?'+field_name+'='+field_value+'\"');
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function doSubmit(thisForm) {
	var theForm = document.getElementById(thisForm);
	if(theForm.onsubmit()) {
		theForm.submit();
	}
}

function submitCheck(f) {
	
}

function checkVote(form) {
	answer_yes = document.getElementById('vote_yes').checked;
	answer_no = document.getElementById('vote_no').checked;
	if((answer_yes==false)&&(answer_no==false)) {
		alert('Please vote either yes or no.');
		document.voteResponse = false;
	} else {
		document.voteResponse = true;
	}
}

function checkKey(thisForm) {
	var key = document.layers ? evt.which 
            : document.all ? event.keyCode
            : evt.keyCode;
	var keyName = String.fromCharCode(key);
	if (key==13) {
		doSubmit(thisForm);
		return false;
	}
}

function addCommas(nStr) {
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}

function toMoney(str) {
	str = Math.round(parseFloat(str)*100)/100;
	return str.toFixed(2);
}

function minVal(field,minV) {
	if(parseInt(field.value)<parseInt(minV)) {
		field.value = parseInt(minV);
		alert('Please enter a minimum amount of '+minV+' or remove all numbers to remove this item');
		return false;
	} else {
		return true;
	}
}

function includeInvoice() {
	// get pay invoice checkbox value
	payInv = document.getElementById('pay_invoice');
	invtot = document.getElementById('invBalance');
	grandtot = document.getElementById('grandtotal');
	invTotal = ((invtot)&&(invtot.lang!=null)) ? parseFloat(invtot.lang) : 0;
	grandTotal = (grandtot.lang) ? parseFloat(grandtot.lang) : 0;
	balance = document.getElementById('balance');
	if(payInv.checked==1) {
		gt = grandTotal+invTotal;
		grandtot.value = 'Â£'+addCommas(toMoney(gt));
		grandtot.lang = gt;
		balance.value = gt;
	} else {
		gt = grandTotal-invTotal;
		grandtot.value = 'Â£'+addCommas(toMoney(gt));
		grandtot.lang = gt;
		balance.value = gt;
	}
	addCardCharge();
}

function calcTotals(inp) {
	if(typeof(inp)!='object') {
		inp = document.getElementById(inp);
	}
	if(typeof(inp)=='object') {
		id = inp.id;
		val = inp.value;
		// make sure the input is numerical
		val=val.replace(/([^0-9])/g,"");
		val = (val=='') ? 0 : val;
		if(val != inp.value) {
			inp.value = val;
		}
		
		// get pay invoice checkbox value
		payInv = document.getElementById('pay_invoice');
		
		// get row total field
		tot = document.getElementById('total_'+id);
		// get subtotal field
		subtot = document.getElementById('subtotal');
		// get grand field
		grandtot = document.getElementById('grandtotal');
		// get inv total field
		invtot = document.getElementById('invBalance');
		// get balance field
		balance = document.getElementById('balance');
		
		// get stored totals
		rowTotal = (tot.lang) ? parseFloat(tot.lang) : 0;
		subTotal = (subtot.lang) ? parseFloat(subtot.lang) : 0;
		grandTotal = (grandtot.lang) ? parseFloat(grandtot.lang) : 0;
		invTotal = (((invtot)&&(invtot.lang!=null))&&(payInv.checked==1)) ? parseFloat(invtot.lang) : 0;
		
		// get new totals
		cost = parseFloat(inp.lang);
		total = parseInt(val)*cost;
		st = (subTotal-rowTotal)+total;
		gt = st+invTotal;
		
		tot.value = 'Â£'+addCommas(toMoney(total));
		subtot.value = 'Â£'+addCommas(toMoney(st));
		grandtot.value = 'Â£'+addCommas(toMoney(gt));
		balance.value = gt;
		
		// store data
		tot.lang = total;
		subtot.lang = st;
		grandtot.lang = gt;
		
		addCardCharge();
	}
}

function checkCart() {
	grandtot = document.getElementById('grandtotal');
	grandTotal = (grandtot.lang) ? parseFloat(grandtot.lang) : 0;
	if(grandTotal>0) {
		card = selectedCard();
		if(!card) { alert('Please select your card type'); }
		return (card) ? true : false;
	} else {
		alert('You must select something to pay for before you can continue');
		return false;
	}
}

function addCardCharge() {
	card = selectedCard();
	// get balance field
	balance = document.getElementById('balance');
	// get grand field
	grandtot = document.getElementById('grandtotal');
	total = (parseFloat(balance.value)) ? parseFloat(balance.value) : 0;
	vat = 17.5;
	sur = 1.5;
	totSur = sur*(vat/(100)+1);
	// calculate surcharge
	if(card=='credit') {
		surcharge = (total/100)*totSur;
		newTotal = (total+surcharge);
		grandtot.value = 'Â£'+addCommas(toMoney(newTotal));
	} else {
		grandtot.value = 'Â£'+addCommas(toMoney(total));
	}
}

// get the value of the card_type box
function selectedCard() {
	retVal = false;
	// get card type info
	var card_type = document.getElementById('card_type');
	var selIndex = card_type.selectedIndex;
	card = card_type.options[selIndex].value;
	// check card type entered
	if(card!='') {
		retVal = card;
	}
	return retVal;
}

function toggle(me) {
	me = document.getElementById(me);
	if(me.style.display) {
		if(me.style.display != "block") {
			me.style.display = "block";
		} else {
			me.style.display = "none";
		}
	} else {
		me.style.display = "none";
	}
}

function setNotice(state) {
	notice = document.getElementById('notice_holder');
	notice.style.display = (state=='show') ? 'block' : 'none';
	if(state!='show') {
		nc = document.getElementById('div_notice_text');
		nc.innerHTML = " ";
	} // remove content
	if(state=='show') { window.scrollTo(0,0); } // scroll to the top of the page 
}

function noticeContent(cont,noesc,count) { 
	if(noesc) {
		cont = unescape(cont)
		replaceThis = "+";
		cont = cont.replace(/\+/g," ");
	}
	setNotice("show");
	document.getElementById('div_notice_text').innerHTML = cont;
	if(count!=null) { document.getElementById('div_notice_text').title = count; }
}

function showImage(img,alt,count) {
	alt = (alt) ? alt : '';
	imageTag = '<img src="'+img+'" alt="'+alt+'" />';
	noticeContent(imageTag,true,count);
}

function stristr( haystack, needle, bool ) {
    var pos = 0;
    haystack += '';
    pos = haystack.toLowerCase().indexOf( (needle+'').toLowerCase() );
    if( pos == -1 ){
        return false;
    } else{
        if( bool ){
            return haystack.substr( 0, pos );
        } else{
            return haystack.slice( pos );
        }
    }
}

function querySt(ji) {
	hu = window.location.search.substring(1);
	gy = hu.split("&");
	for (i=0;i<gy.length;i++) {
		ft = gy[i].split("=");
		if (ft[0] == ji) {
			return ft[1];
		}
	}
}

function setup() {
	if(querySt("dev")!="true") {
		var menu = document.getElementById('div_menu');
		var links = menu.getElementsByTagName('a');
		for(var i=0;i<links.length;i++) {
			links[i]._title = links[i].title;
			links[i].onmouseover = function() {
				 this.title = '';
			}
			links[i].onmouseout = function() {
				 this.title = this._title;
			}
		}
	}
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}


if(window.addEventListener) window.addEventListener("load", setup, false); // for non IE browsers
else if(window.attachEvent) window.attachEvent("onload", setup);			 // for IE

// replace window.open for reservation pages
function openwindow(url,name,params,rep) {
	// process URL
	newURL = 'http://www.bestpartiesever.com/goto?l='+escape(url);
	return window.open(newURL,name,params,rep);
}
/*
	© 2008 MJDIGITAL
	Written by Mark Jackson - code@mjdigital.co.uk
		Replaces selected tags with Flash text objects
		Works a bit like sifr - http://en.wikipedia.org/wiki/Scalable_Inman_Flash_Replacement
		but nowhere near as advanced! Before you steal this I would suggest you look at sifr - it's much better!
		If you are hell-bent on stealing this code then please have the decency to let me know that you liked it
		by dropping me a quick email to say - "Hey, I liked it"! Who knows - I may write more and send you the updates!
		If you want the supporting .FLA then let me know.
	All rights reserved

*/
var alreadyrunflag=0 //flag to indicate whether init function has already been run

function getStyle(oElm, strCssRule){
	var strValue = "";
	if(document.defaultView && document.defaultView.getComputedStyle){
		strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
	}
	else if(oElm.currentStyle){
		strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
			return p1.toUpperCase();
		});
		strValue = oElm.currentStyle[strCssRule];
	}
	return strValue;
}

function toHex(N) {
 if (N==null) return "00";
 N=parseInt(N); if (N==0 || isNaN(N)) return "00";
 N=Math.max(0,N); N=Math.min(N,255); N=Math.round(N);
 return "0123456789ABCDEF".charAt((N-N%16)/16)
      + "0123456789ABCDEF".charAt(N%16);
}

var els = new Array("h1","h2","h3","h4");
function init(o,prefix) {
	for(id in els) {
		tag = els[id];
		if(o!=''&&o!=null) {
			o=(typeof(o)=='object') ? o : document.getElementById(o);	
		} else {
			o=document;	
		}
		es = o.getElementsByTagName(tag);
		if(es.length>0) {
			args = new Object();
			for(i=0;i<es.length;i++) {
				e=es[i];
				prefix = (prefix) ? prefix : '';
				args.id = prefix+"_"+tag+"_"+i;
				args.txt = e.innerHTML;
				args.fSize = getStyle(e,"font-size").replace(/px/,""); // get font size
				args.fWeight = getStyle(e,"font-weight"); args.fWeight = (args.fWeight<500) ? 'false' : 'true'; // get font weight - bold or normal only
				args.fStyle = getStyle(e,"font-style");
				args.fColor = getStyle(e,"color").replace(/#/,"0x");
				args.fDecor = getStyle(e,"text-decoration"); args.fDecor = (args.fDecor=="underline") ? 'true' : 'false';
				args.fAlign = getStyle(e,"text-align"); args.fAlign = (args.fAlign=="start") ? "left" : args.fAlign;
				args.eBGcolor = getStyle(e,"background-color");
				args.eWidth = getStyle(e,"width").replace(/px/,""); args.eWidth = (args.eWidth=="auto") ? e.offsetWidth : args.eWidth;
				args.eHeight = getStyle(e,"height").replace(/px/,""); args.eHeight = (args.eHeight=="auto") ? e.offsetHeight : args.eHeight;
				// Add Flash Glow - outline:glowColour
				if(getStyle(e,"outline")) {
					args.fGlow = getStyle(e,"outline").replace(/#/,"0x");
				}
				lColor = lDecor = lWeight = '';
				
				// get link info
					// <tag><a href...>text</a></tag>
					if((args.txt.search(/<a/i)!=-1)&&(args.txt.search(/href=/i)!=-1)) {
						l = e.getElementsByTagName('a')[0];
						args.lHref = escape(l.href);
						args.lTarget = l.target;
						lWeight = getStyle(l,"font-weight"); lWeight = (lWeight<500) ? 'false' : 'true';
						lColor = getStyle(l,"color").replace(/#/,"0x");
						lDecor = getStyle(l,"text-decoration"); lDecor = (lDecor=="underline") ? 'true' : 'false';
					}
					// <a href...><tag>text</tag></a>
					aLink = checkParent(e,'A','obj');
					if(aLink) { 
						args.lHref = escape(aLink.href);
						args.lTarget = aLink.target;
					}

				args.fColor = (lColor!='') ? lColor : args.fColor;
				args.fDecor = (lDecor!='') ? lDecor : args.fDecor;
				args.fWeight = (lWeight!='') ? lWeight : args.fWeight;
				
				// process colour for FF
				if(args.fColor.search(/rgb/i)!=-1) {
					fColor = args.fColor.replace(/rgb\(/i,""); fColor = fColor.replace(/\)/,"");	
					r = toHex(fColor.split(", ")[0]);
					g = toHex(fColor.split(", ")[1]);
					b = toHex(fColor.split(", ")[2]);
					args.fColor = "0x"+r+g+b;
				}
				
				// strip tags out of text
				args.txt = escape(cleanUpTxt(args.txt).replace(/(<([^>]+)>)/ig,""));
				args.tag = tag;
				
				// Test to make sure the object is actually visible
				if(checkVisibility(e)) {
					insertFlash(e,args);
				}
				args = new Object();
				
			}
		}
	}
}

function checkParent(e,tag,retProp) {
	retVal = false;
	while(e.parentNode){
		if((e.parentNode)&&(e.parentNode.nodeName!='BODY')) {
			if (e.parentNode.nodeName==tag) { 
				if(retProp=='obj') {
					retVal = e.parentNode;
				} else {
					retVal = eval('e.parentNode.'+retProp); 
				}
				break;
			} else {
				break;
			}
		} else { retVal = false; }
	}
	return retVal;
}

function checkVisibility(e) {
	retVal = true;
	while(e.parentNode){
		if((e.parentNode)&&(e.parentNode.nodeName!='BODY')) {
			if (e.parentNode.style.display=='none') { 
				retVal = false; 
				break;
			} else {
				break;
			}
		} else { retVal = false; }
	}
	return retVal;
}

function jsAlert(txt) {
	txt = ""+txt;
	alert(txt);
}

function flashObj(o) {
		obj = document.getElementById(o+"_obj");
		emb = document.getElementById(o+"_emb");
		if (navigator.appName.indexOf("Microsoft") != -1) {
			return obj; // for IE
		} else {
			return emb; // for FF
		}
}

function cleanUpTxt(txt) {
	replaceThis1 = "%";
	replaceThis2 = "\\+";
	txt = txt.replace( RegExp(replaceThis1,'g'),"%25");
	txt = txt.replace( RegExp(replaceThis2,'g'),"%2B");
	return txt;	
}

function resizeMe(o,h,w) { // called by flash object
	el = document.getElementById(o)	;
	fl = flashObj(o);
	if((fl.offsetHeight>(parseInt(h))) || (fl.offsetHeight<(parseInt(h)-5))) { // allow a 5px buffer
		fl.style.height = h+"px";
	}
	if((fl.offsetWidth>(parseInt(w))) || (fl.offsetWidth<(parseInt(w)-5))) { // allow a 5px buffer
		fl.style.width = w+"px";
	}
}

function insertFlash(obj,args) {
	flashFile = "/assets/flash/"; // SWF file directory
	//flashFile += args.tag; // choose swf file (tag name)
	flashFile += "h1"; // choose default swf file
	flashFile += ".swf"; // add .SWF 

	flashVars = '';
	for(a in args) {
		flashVars += a+"="+args[a]+"&";	
	}
	flashVars += "fHcolor=0x999999"; // link hover colour
	flashVars += "&obj="+args.id; // pass object
	//alert(flashVars)
	flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+args.eWidth+'" height="'+args.eHeight+'" id="'+args.id+'_obj"><param name="movie" value="'+flashFile+'" /><param name="quality" value="high" /><param name="menu" value="false" /><param name="scale" value="noscale" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="swliveconnect" value="true" /><param name="flashVars" value="'+flashVars+'" /><embed id="'+args.id+'_emb" src="'+flashFile+'" quality="high" menu="false" scale="noscale" wmode="transparent" allowScriptAccess="always" swliveconnect="true" flashVars="'+flashVars+'" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+args.eWidth+'" height="'+args.eHeight+'" /></object>';
	obj.innerHTML = flash;
	args = '';
}

<!-- DETECT FLASH
var MM_contentVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
//-->
if(!MM_FlashCanPlay) { // FLASH IS INSTALLED
	// do something (or nothing) if Flash version is not installed
	document.write('<link href="/css/_headings.css" rel="stylesheet" type="text/css" media="screen" />');
} else {
	
	// DOM Ready script - to replace on load (faster)
	if (document.addEventListener) { // firefox etc
	  document.addEventListener("DOMContentLoaded", function(){alreadyrunflag=1; init()}, false);
	} else if (document.all && !window.opera){ // crude test for IE
	  document.write('<script type="text/javascript" id="contentloadtag" defer="defer" src="javascript:void(0)"><\/script>')
	  var contentloadtag=document.getElementById("contentloadtag")
	  contentloadtag.onreadystatechange=function(){
		if (this.readyState=="complete"){
		  alreadyrunflag=1
		  init()
		}
	  }
	}
	
	window.onload=function(){
	  setTimeout("if (!alreadyrunflag) init()", 0)
	}
}

