
var output=""

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

str=unescape(window.location.href)
//var pp=str.match(/(\w+)\.htm|html/g)
var pp=str.substring(str.lastIndexOf('index.html')+1);
pp=pp.replace(/#/gi,'');
var connectstring = ""

var expDate = new Date();
expDate.setTime(expDate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 

function handleError() {
	return true;
}

 window.onerror = handleError;


function loadSource(id,pagecomp,buffer) {
	if (ns4) {

	}
	else if (ie4) {
		eval('parent.'+buffer).document.location.replace ( "resources/updater47d9.html?type=" + pagecomp + "&div=" + id + "&page=" + pp + "&buffer=" + buffer + "&" + connectstring);

	}
	
}

function loadSourceFinish(id,frameid) {
inputString = eval('parent.' + frameid).document.body.innerHTML

	if  ((inputString == null) || (inputString.length == 0)) return false;

	if (ie4) document.all[id].innerHTML = inputString
}

var today = new Date(); // Set date
var expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000); // plus 1 year
var monster = document.cookie;

function Get_Cookie(name) {
    var index = monster.indexOf(name + "=");
    if (index == -1) return null;
    index = monster.indexOf("=", index) + 1;
    var endstr = monster.indexOf(";", index);
    if (endstr == -1) endstr = monster.length;
    return unescape(monster.substring(index, endstr));
}
  
expiry = new Date(today.getTime() + 14 * 24 * 60 * 60 * 1000); // plus 28 days

function Set_Cookie(name, value) { // use: setCookie("name", value);
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString() + "; path=/ ;";
    monster = document.cookie; // update monster
  }

function deleteCookie(name,path,domain) {
  if (get_Cookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}



function popupwin(url) {
	
	maxheight=eval(screen.availHeight-50);
	if (maxheight > 1000) {maxheight=1000}
       var awin = window.open(url, 'floater','left=0,top=0,width=500,height=' + maxheight + ',status=no,menubar=no,scrollable=yes,scrollbars=yes,resizable=no');
		awin.focus();
}
function DisplayPopup() {
	document.all.popup.style.display='inline';
	document.all.popup.style.top = eval(document.body.scrollTop+120) + 'px'
}

function ClosePopup() {
	window.close();
}

function SaveResults() {
Set_Cookie('setup',connectstring)
}

connectstring=Get_Cookie('setup')

// Top navigation


var disappeardelay=500  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=1 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function dropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+5.5+"px"
}
return clickreturnvalue()
}

function clickreturnvalue(){
if ((ie5||ns6) && !enableanchorlink) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}




menu_status = new Array(); 

function showHide(theid,linkid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
    var link_id = document.getElementById(linkid);

	document.all.mymenu1.className = 'hide';
	document.all.link1.src="newimages/shared/arrow_h.gif"
	menu_status['mymenu1'] = 'hide';
	document.all.mymenu2.className = 'hide';
	document.all.link2.src="newimages/shared/arrow_h.gif"
	menu_status['mymenu2']= 'hide';
	document.all.mymenu3.className = 'hide';
	document.all.link3.src="newimages/shared/arrow_h.gif"
	menu_status['mymenu3']= 'hide';


        if(menu_status[theid] != 'show') {
        link_id.src="newimages/shared/arrow_v.gif"
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
     link_id.src="newimages/shared/arrow_v.gif"
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
	return false;
}

function storePos(){
  document.cookie = "win_pos="+document.body.scrollTop;
}

function resetPos(){
  document.cookie = "win_pos=0";
}


function lastPos(){
  cVal = document.cookie.split("win_pos=");
  if(cVal.length==2){
    window.scrollTo(0,parseInt(cVal[1]));
  }
}

/*
Copyright Justin Whitford 2006.
  http://www.whitford.id.au/
Perpetual, non-exclusive license to use this code is granted
on the condition that this notice is left in tact.
*/
var delim = '|';
var trailLength = 4;
var chunks;
var DAY = 24 * 60 * 60 * 1000;

function getTitle () {
  var metaElements = document.all ?
    document.all.tags('META') :
    document.getElementsByTagName ?
    document.getElementsByTagName ('META') : new Array();
  var metaKeywords = new Array();
  var i = 0;
  for (var m = 0; m < metaElements.length; m++)
    if (metaElements[m].name == 'title')
      metaKeywords[i++] = metaElements[m].content;
	  
	  if (metaKeywords.length == 0) {metaKeywords = document.title;}
	  
  return metaKeywords;  
}


function doCrumbs(){
	var propertitle=getTitle()
  if(cookieTest('xxx')){
    crumbList = new CrumbList();
    if(getCookie('trailLinks')){
      var staleLinkCrumbs = getCookie('trailLinks').split(delim);
      var staleTextCrumbs = getCookie('trailText').split(delim);
      var startPos=
        (staleTextCrumbs.length<trailLength ||
        document.location==staleLinkCrumbs[staleLinkCrumbs.length-1])
        ?0:1;
      for(i=startPos;i<staleLinkCrumbs.length;i++){
		  if (staleLinkCrumbs[i] == document.location) {break}
        crumbList.add(staleLinkCrumbs[i],staleTextCrumbs[i]);
      }
    }
    if(document.location!=crumbList.links[crumbList.links.length-1]){
	  
      crumbList.add(document.location,propertitle);

    }
    setCookie('trailLinks',crumbList.links.join(delim),1);
    setCookie('trailText',crumbList.text.join(delim),1);
    crumbList.output();
  }
  	  
}


function CrumbList(){
  this.links=new Array();
  this.text=new Array();
  this.add = crumbListAdd;
  this.output = crumbListShow;
}
  function crumbListAdd(href,text){
    this.links[this.links.length]=href;
    this.text[this.text.length]=text;
  }
  function crumbListShow(){
    for(var i in this.links){
      if(i==this.links.length-1) {
        document.write( ((i==0)?"":" &nbsp; >&nbsp; ") + this.text[i] + '&nbsp;&nbsp;&nbsp;' );
      }else {
        document.write(
          ((i==0)?"":"&nbsp; >&nbsp; ")
          +"<a href='" + this.links[i] + "' class='navtop'>"
          + this.text[i] + "</a>"
        );
      }
    }
  }


function cookieTest(name){
  try{
    setCookie(name,'true',1);
    chunks = document.cookie.split("; ");
    return (getCookie(name)=='true');
  }catch(e){
    return false;
  }
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}


function setCookie(name, value, days) {
  if (value != null && value != "" && days > 0){
    var expiry=
      new Date(new Date().getTime() + days * DAY);
    document.cookie= name +"="+ escape(value) +"; expires=" + expiry.toGMTString();
    chunks = document.cookie.split("; ");
  }
}


function delCookie(name) {
	 var expiry=
      new Date(new Date().getTime() + 1 * DAY);
    document.cookie=
      name +"=123; expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function delCrumbs() {
delCookie('trailLinks');
delCookie('trailText');
}

var ref=document.referrer;
var searchterm=''

function getQueryVariable(variable) {
var query2 = ref.split("?");//window.location.search.substring(1);
var query = query2[1]
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
		results=unescape(pair[1]).replace(/\+/g,' ');
		results=results.replace(/london/i,' ');
		results=results.replace(/\"/g,'');
      return results;
    }
  } 
  //alert('Query Variable ' + variable + ' not found');
}



if (ref.indexOf("google")>-1) {
searchterm=getQueryVariable("q")
}

if (ref.indexOf("yahoo")>-1) {
searchterm=getQueryVariable("p")
}

if (ref.indexOf("msn")>-1) {
searchterm=getQueryVariable("q")
}

if (ref.indexOf("aol")>-1) {
searchterm=getQueryVariable("query")
}

document.title = getTitle();





// Rollover  v2.0.1
// documentation: http://www.dithered.com/javascript/rollover/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)


function isDefined(property) {
  return (typeof property != 'undefined');
}

var rolloverInitialized = false;
function rolloverInit() {
   if (!rolloverInitialized && isDefined(document.images)) {
      
      // get all images (including all <input type="image">s)
      // use getElementsByTagName() if supported
      var images = new Array();
      if (isDefined(document.getElementsByTagName)) {
         images = document.getElementsByTagName('img');
         var inputs = document.getElementsByTagName('input');
         for (var i = 0; i < inputs.length; i++) {
            if (inputs[i].type == 'image') {
               images[images.length] = inputs[i];
            }
         }
      }
      
      // otherwise, use document.images and document.forms collections
      // remove if not supporting IE4, Opera 4-5
      else {
         images = document.images;
         inputs = new Array();
         for (var formIndex = 0; formIndex < document.forms.length; formIndex++) {
            for (var elementIndex = 0; elementIndex < document.forms.elements.length; elementIndex++) {
               if (isDefined(document.forms.elements[i].src)) {
                  inputs[inputs.length] = document.forms.elements[i];
               }
            }
         }
      }
      
      // get all images with '_off.' in src value
      for (var i = 0; i < images.length; i++) {
         if (images[i].src.indexOf('_off.') != -1) {
            var image = images[i];
            
            // store the off state filename in a property of the image object
            image.offImage = new Image();
            image.offImage.src = image.src;
            
            // store the on state filename in a property of the image object
            // (also preloads the on state image)
            image.onImage = new Image();
            image.onImage.imageElement = image;
            
            // add onmouseover and onmouseout event handlers once the on state image has loaded
            // Safari's onload is screwed up for off-screen images; temporary fix
            if (navigator.userAgent.toLowerCase().indexOf('safari') != - 1) {
               image.onmouseover = function() {
                  this.src = this.onImage.src;
               };
               image.onmouseout = function() {
                  this.src = this.offImage.src;
               };
            }
            else {
               image.onImage.onload = function() {
                  this.imageElement.onmouseover = function() {
                     this.src = this.onImage.src;
                  };
                  this.imageElement.onmouseout = function() {
                     this.src = this.offImage.src;
                  };
               };
            }
            
            // set src of on state image after defining onload event handler
            // so cached images (that load instantly in IE) will trigger onload
            image.onImage.src = image.src.replace(/_off\./, '_on.');
         }
      }
   }
   rolloverInitialized = true;
}

// call rolloverInit when document finishes loading
if (isDefined(window.addEventListener)) {
   window.addEventListener('load', rolloverInit, false);
}
else if (isDefined(window.attachEvent)) {
   window.attachEvent('onload', rolloverInit);
}


//UDMv3.8.4