//IMAGE PRELOAD

alerts = new Image();
alerts.src = "images/btn-alerts-on.jpg";

aerial = new Image();
aerial.src = "images/btn-aerial-on.jpg";

mortgage = new Image();
mortgage.src = "images/btn-mortgage-on.jpg";

contact = new Image();
contact.src = "images/btn-contact-on.jpg";

homeonfilm = new Image();
homeonfilm.src = "images/btn-homeonfilm-on.jpg";

conveyancing = new Image();
conveyancing.src = "images/btn-conveyancing-on.jpg";

whitehot = new Image();
whitehot.src = "images/ad-whitehot-on.jpg";

lookingfor = new Image();
lookingfor.src = "images/ad-lookingfor-on.jpg";

buying1 = new Image();
buying1.src = "images/btn-buying-1-on.jpg";

buying2 = new Image();
buying2.src = "images/btn-buying-2-on.jpg";

buying3 = new Image();
buying3.src = "images/btn-buying-3-on.jpg";

selling1 = new Image();
selling1.src = "images/btn-selling-1-on.jpg";

selling2 = new Image();
selling2.src = "images/btn-selling-2-on.jpg";

selling3 = new Image();
selling3.src = "images/btn-selling-3-on.jpg";



//SET ARRAYS FOR DATE

  var d = new Array(
  "Sunday",
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday"
  );
  var m = new Array(
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
  );
  var today = new Date();
  var day = today.getDate();
  var year = today.getYear();
  if (year < 2000)    // Y2K Fix, Isaac Powell
  year = year + 1900; // http://onyx.idbsu.edu/~ipowell
  end = "th";
  if (day==1 || day==21 || day==31) end="st";
  if (day==2 || day==22) end="nd";
  if (day==3 || day==23) end="rd";
  day+=end;


/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
    if (!document.getElementById) { return; }
    this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
    this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
    this.params = new Object();
    this.variables = new Object();
    this.attributes = new Array();
    if(swf) { this.setAttribute('swf', swf); }
    if(id) { this.setAttribute('id', id); }
    if(w) { this.setAttribute('width', w); }
    if(h) { this.setAttribute('height', h); }
    if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
    this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
    if (!window.opera && document.all && this.installedVer.major > 7) {
        // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
        deconcept.SWFObject.doPrepUnload = true;
    }
    if(c) { this.addParam('bgcolor', c); }
    var q = quality ? quality : 'high';
    this.addParam('quality', q);
    this.setAttribute('useExpressInstall', false);
    this.setAttribute('doExpressInstall', false);
    var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
    this.setAttribute('xiRedirectUrl', xir);
    this.setAttribute('redirectUrl', '');
    if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
    useExpressInstall: function(path) {
        this.xiSWFPath = !path ? "expressinstall.swf" : path;
        this.setAttribute('useExpressInstall', true);
    },
    setAttribute: function(name, value){
        this.attributes[name] = value;
    },
    getAttribute: function(name){
        return this.attributes[name];
    },
    addParam: function(name, value){
        this.params[name] = value;
    },
    getParams: function(){
        return this.params;
    },
    addVariable: function(name, value){
        this.variables[name] = value;
    },
    getVariable: function(name){
        return this.variables[name];
    },
    getVariables: function(){
        return this.variables;
    },
    getVariablePairs: function(){
        var variablePairs = new Array();
        var key;
        var variables = this.getVariables();
        for(key in variables){
            variablePairs[variablePairs.length] = key +"="+ variables[key];
        }
        return variablePairs;
    },
    getSWFHTML: function() {
        var swfNode = "";
        if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
            if (this.getAttribute("doExpressInstall")) {
                this.addVariable("MMplayerType", "PlugIn");
                this.setAttribute('swf', this.xiSWFPath);
            }
            swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
            swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
            var params = this.getParams();
             for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
            var pairs = this.getVariablePairs().join("&");
             if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
            swfNode += '/>';
        } else { // PC IE
            if (this.getAttribute("doExpressInstall")) {
                this.addVariable("MMplayerType", "ActiveX");
                this.setAttribute('swf', this.xiSWFPath);
            }
            swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
            swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
            var params = this.getParams();
            for(var key in params) {
             swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
            }
            var pairs = this.getVariablePairs().join("&");
            if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
            swfNode += "</object>";
        }
        return swfNode;
    },
    write: function(elementId){
        if(this.getAttribute('useExpressInstall')) {
            // check to see if we need to do an express install
            var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
            if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
                this.setAttribute('doExpressInstall', true);
                this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
                document.title = document.title.slice(0, 47) + " - Flash Player Installation";
                this.addVariable("MMdoctitle", document.title);
            }
        }
        if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
            var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
            n.innerHTML = this.getSWFHTML();
            return true;
        }else{
            if(this.getAttribute('redirectUrl') != "") {
                document.location.replace(this.getAttribute('redirectUrl'));
            }
        }
        return false;
    }
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
    var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
    if(navigator.plugins && navigator.mimeTypes.length){
        var x = navigator.plugins["Shockwave Flash"];
        if(x && x.description) {
            PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
        }
    }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
        var axo = 1;
        var counter = 3;
        while(axo) {
            try {
                counter++;
                axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//              document.write("player v: "+ counter);
                PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
            } catch (e) {
                axo = null;
            }
        }
    } else { // Win IE (non mobile)
        // do minor version lookup in IE, but avoid fp6 crashing issues
        // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
        try{
            var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
        }catch(e){
            try {
                var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
                axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
            } catch(e) {
                if (PlayerVersion.major == 6) {
                    return PlayerVersion;
                }
            }
            try {
                axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
            } catch(e) {}
        }
        if (axo != null) {
            PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
        }
    }
    return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
    this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
    this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
    this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
    if(this.major < fv.major) return false;
    if(this.major > fv.major) return true;
    if(this.minor < fv.minor) return false;
    if(this.minor > fv.minor) return true;
    if(this.rev < fv.rev) return false;
    return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
    getRequestParameter: function(param) {
        var q = document.location.search || document.location.hash;
        if (param == null) { return q; }
        if(q) {
            var pairs = q.substring(1).split("&");
            for (var i=0; i < pairs.length; i++) {
                if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
                    return pairs[i].substring((pairs[i].indexOf("=")+1));
                }
            }
        }
        return "";
    }
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
    var objects = document.getElementsByTagName("OBJECT");
    for (var i = objects.length - 1; i >= 0; i--) {
        objects[i].style.display = 'none';
        for (var x in objects[i]) {
            if (typeof objects[i][x] == 'function') {
                objects[i][x] = function(){};
            }
        }
    }
}
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
    if (!deconcept.unloadSet) {
        deconcept.SWFObjectUtil.prepUnload = function() {
            __flash_unloadHandler = function(){};
            __flash_savedUnloadHandler = function(){};
            window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
        }
        window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
        deconcept.unloadSet = true;
    }
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;



/*

File: AC_QuickTime.js

Abstract: This file contains functions to generate OBJECT and EMBED tags for QuickTime content.

Version: <1.1>

Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
Computer, Inc. ("Apple") in consideration of your agreement to the
following terms, and your use, installation, modification or
redistribution of this Apple software constitutes acceptance of these
terms.  If you do not agree with these terms, please do not use,
install, modify or redistribute this Apple software.

In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and/or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following
text and disclaimers in all such redistributions of the Apple Software. 
Neither the name, trademarks, service marks or logos of Apple Computer,
Inc. may be used to endorse or promote products derived from the Apple
Software without specific prior written permission from Apple.  Except
as expressly stated in this notice, no other rights or licenses, express
or implied, are granted by Apple herein, including but not limited to
any patent rights that may be infringed by your derivative works or by
other works in which the Apple Software may be incorporated.

The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.

IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

Copyright © 2006 Apple Computer, Inc., All Rights Reserved

*/ 

/*
 * This file contains functions to generate OBJECT and EMBED tags for QuickTime content. 
 */

/************** LOCALIZABLE GLOBAL VARIABLES ****************/

var gArgCountErr =  'The "%%" function requires an even number of arguments.'
        +  '\nArguments should be in the form "atttributeName", "attributeValue", ...';

/******************** END LOCALIZABLE **********************/

var gTagAttrs        = null;
var gQTGeneratorVersion    = 1.0;

function AC_QuickTimeVersion()  { return gQTGeneratorVersion; }

function _QTComplain(callingFcnName, errMsg)
{
    errMsg = errMsg.replace("%%", callingFcnName);
  alert(errMsg);
}

function _QTAddAttribute(prefix, slotName, tagName)
{
  var    value;

  value = gTagAttrs[prefix + slotName];
  if ( null == value )
    value = gTagAttrs[slotName];

  if ( null != value )
  {
    if ( 0 == slotName.indexOf(prefix) && (null == tagName) )
      tagName = slotName.substring(prefix.length); 
    if ( null == tagName ) 
      tagName = slotName;
    return '' + tagName + '="' + value + '"';
  }
  else
    return "";
}

function _QTAddObjectAttr(slotName, tagName)
{
  // don't bother if it is only for the embed tag
  if ( 0 == slotName.indexOf("emb#") )
    return "";

  if ( 0 == slotName.indexOf("obj#") && (null == tagName) )
    tagName = slotName.substring(4); 

  return _QTAddAttribute("obj#", slotName, tagName);
}

function _QTAddEmbedAttr(slotName, tagName)
{
  // don't bother if it is only for the object tag
  if ( 0 == slotName.indexOf("obj#") )
    return "";

  if ( 0 == slotName.indexOf("emb#") && (null == tagName) )
    tagName = slotName.substring(4); 

  return _QTAddAttribute("emb#", slotName, tagName);
}


function _QTAddObjectParam(slotName, generateXHTML)
{
  var    paramValue;
  var    paramStr = "";
  var    endTagChar = (generateXHTML) ? ' />' : '>';

  if ( -1 == slotName.indexOf("emb#") )
  {
    // look for the OBJECT-only param first. if there is none, look for a generic one
    paramValue = gTagAttrs["obj#" + slotName];
    if ( null == paramValue )
      paramValue = gTagAttrs[slotName];

    if ( 0 == slotName.indexOf("obj#") )
      slotName = slotName.substring(4); 
  
    if ( null != paramValue )
      paramStr = '<param name="' + slotName + '" value="' + paramValue + '"' + endTagChar;
  }

  return paramStr;
}

function _QTDeleteTagAttrs()
{
  for ( var ndx = 0; ndx < arguments.length; ndx++ )
  {
    var attrName = arguments[ndx];
    delete gTagAttrs[attrName];
    delete gTagAttrs["emb#" + attrName];
    delete gTagAttrs["obj#" + attrName];
  }
}

    

// generate an embed and object tag, return as a string
function _QTGenerate(callingFcnName, generateXHTML, args)
{
  // is the number of optional arguments even?
  if ( args.length < 4 || (0 != (args.length % 2)) )
  {
    _QTComplain(callingFcnName, gArgCountErr);
    return "";
  }
  
  // allocate an array, fill in the required attributes with fixed place params and defaults
  gTagAttrs = new Object();
  gTagAttrs["src"] = args[0];
  gTagAttrs["width"] = args[1];
  gTagAttrs["height"] = args[2];
  gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
    //Impportant note: It is recommended that you use this exact classid in order to ensure a seamless experience for all viewers
  gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/";

  // set up codebase attribute with specified or default version before parsing args so
  //  anything passed in will override
  var activexVers = args[3]
  if ( (null == activexVers) || ("" == activexVers) )
    activexVers = "6,0,2,0";
  gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers;

  var  attrName,
    attrValue;

  // add all of the optional attributes to the array
  for ( var ndx = 4; ndx < args.length; ndx += 2)
  {
    attrName = args[ndx].toLowerCase();
    attrValue = args[ndx + 1];

    // "name" and "id" should have the same value, the former goes in the embed and the later goes in
    //  the object. use one array slot 
    if ( "name" == attrName || "id" == attrName )
      gTagAttrs["name"] = attrValue;

    else 
      gTagAttrs[attrName] = attrValue;
  }

  // init both tags with the required and "special" attributes
  var objTag =  '<object '
          + _QTAddObjectAttr("classid")
          + _QTAddObjectAttr("width")
          + _QTAddObjectAttr("height")
          + _QTAddObjectAttr("codebase")
          + _QTAddObjectAttr("name", "id")
          + _QTAddObjectAttr("tabindex")
          + _QTAddObjectAttr("hspace")
          + _QTAddObjectAttr("vspace")
          + _QTAddObjectAttr("border")
          + _QTAddObjectAttr("align")
          + _QTAddObjectAttr("class")
          + _QTAddObjectAttr("title")
          + _QTAddObjectAttr("accesskey")
          + _QTAddObjectAttr("noexternaldata")
          + '>'
          + _QTAddObjectParam("src", generateXHTML);
  var embedTag = '<embed '
          + _QTAddEmbedAttr("src")
          + _QTAddEmbedAttr("width")
          + _QTAddEmbedAttr("height")
          + _QTAddEmbedAttr("pluginspage")
          + _QTAddEmbedAttr("name")
          + _QTAddEmbedAttr("align")
          + _QTAddEmbedAttr("tabindex");

  // delete the attributes/params we have already added
  _QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex",
          "hspace","vspace","border","align","noexternaldata","class","title","accesskey");

  // and finally, add all of the remaining attributes to the embed and object
  for ( var attrName in gTagAttrs )
  {
    attrValue = gTagAttrs[attrName];
    if ( null != attrValue )
    {
      embedTag += _QTAddEmbedAttr(attrName);
      objTag += _QTAddObjectParam(attrName, generateXHTML);
    }
  } 

  // end both tags, we're done
  return objTag + embedTag + '></em' + 'bed></ob' + 'ject' + '>';
}

// return the object/embed as a string
function QT_GenerateOBJECTText()
{
  return _QTGenerate("QT_GenerateOBJECTText", false, arguments);
}

function QT_GenerateOBJECTText_XHTML()
{
  return _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments);
}

function QT_WriteOBJECT()
{
  document.writeln(_QTGenerate("QT_WriteOBJECT", false, arguments));
}

function QT_WriteOBJECT_XHTML()
{
  document.writeln(_QTGenerate("QT_WriteOBJECT_XHTML", true, arguments));
}






//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;
}

function addOption(selectbox,text,value )
{
	var optn = document.createElement("option");
	optn.text = text;
	optn.value = value;
	selectbox.options.add(optn);
}

function reFormat(selectbox, selectbox2, showprop) {
	var i;
	for(i=selectbox.options.length-1;i>=0;i--) {
		selectbox.remove(i);
	}
	var j;
	for(j=selectbox2.options.length-1;j>=0;j--) {
		selectbox2.remove(j);
	}
	var y;
	if(showprop == "showsales") {
		addOption(selectbox,'minimum price','')
		addOption(selectbox,'£25,000','25000')
		addOption(selectbox,'£50,000','50000')
		addOption(selectbox,'£75,000','75000')
		addOption(selectbox,'£100,000','100000')
		addOption(selectbox,'£125,000','125000')
		addOption(selectbox,'£150,000','150000')
		addOption(selectbox,'£175,000','175000')
		addOption(selectbox,'£200,000','200000')
		addOption(selectbox,'£300,000','300000')
		addOption(selectbox,'£400,000','400000')
		addOption(selectbox,'£500,000','500000')
		addOption(selectbox,'£600,000','600000')
		addOption(selectbox,'£700,000','700000')
		addOption(selectbox,'£800,000','800000')
		addOption(selectbox,'£900,000','900000')
		addOption(selectbox,'£1,000,000','1000000')
		selectbox.options[0].selected = true;
		addOption(selectbox2,'maximum price','')
		addOption(selectbox2,'£25,000','25000')
		addOption(selectbox2,'£50,000','50000')
		addOption(selectbox2,'£75,000','75000')
		addOption(selectbox2,'£100,000','100000')
		addOption(selectbox2,'£125,000','125000')
		addOption(selectbox2,'£150,000','150000')
		addOption(selectbox2,'£175,000','175000')
		addOption(selectbox2,'£200,000','200000')
		addOption(selectbox2,'£300,000','300000')
		addOption(selectbox2,'£400,000','400000')
		addOption(selectbox2,'£500,000','500000')
		addOption(selectbox2,'£600,000','600000')
		addOption(selectbox2,'£700,000','700000')
		addOption(selectbox2,'£800,000','800000')
		addOption(selectbox2,'£900,000','900000')
		addOption(selectbox2,'£1,000,000','1000000')
		selectbox2.options[0].selected = true;
	}
	if(showprop=="showlets") {
		addOption(selectbox,'minimum rent','')
		addOption(selectbox,'£100 pcm','100')
		addOption(selectbox,'£200 pcm','200')
		addOption(selectbox,'£300 pcm','300')
		addOption(selectbox,'£400 pcm','400')
		addOption(selectbox,'£500 pcm','500')
		addOption(selectbox,'£600 pcm','600')
		addOption(selectbox,'£700 pcm','700')
		addOption(selectbox,'£800 pcm','800')
		addOption(selectbox,'£900 pcm','900')
		addOption(selectbox,'£1000 pcm','1000')
		addOption(selectbox,'£2500 pcm','2500')
		selectbox.options[0].selected = true;
		addOption(selectbox2,'maximum rent','')
		addOption(selectbox2,'£100 pcm','100')
		addOption(selectbox2,'£200 pcm','200')
		addOption(selectbox2,'£300 pcm','300')
		addOption(selectbox2,'£400 pcm','400')
		addOption(selectbox2,'£500 pcm','500')
		addOption(selectbox2,'£600 pcm','600')
		addOption(selectbox2,'£700 pcm','700')
		addOption(selectbox2,'£800 pcm','800')
		addOption(selectbox2,'£900 pcm','900')
		addOption(selectbox2,'£1000 pcm','1000')
		addOption(selectbox2,'£2500 pcm','2500')
		selectbox2.options[0].selected = true;
	}
}

