/* http://blog.deconcept.com/2004/10/14/web-standards-compliant-javascript-flash-detect-and-embed/ */
FlashObject = function(swf, id, w, h, ver, c) {
	this.swf = swf;
	this.id = id;
	this.width = w;
	this.height = h;
	this.version = ver || 6; // default to 6
	this.align = "middle"; // default to middle
	this.redirect = "";
	this.sq = document.location.search.split("?")[1] || "";
	this.altTxt = "Please <a href='http://www.macromedia.com/go/getflashplayer'>upgrade your Flash Player</a>.";
	this.bypassTxt = "<br /><span class='smalltext'>Already have Flash Player? <a href='http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash'>Click here if you do not have Flash Player "+ this.version +" installed</a>.</span>";
	this.params = new Object();
	this.variables = new Object();
	if (c) this.color = this.addParam('bgcolor', c);
	this.addParam('quality', 'high'); // default to high
	this.doDetect = getQueryParamValue('detectflash');
}

FlashObject.prototype.addParam = function(name, value) {
	this.params[name] = value;
}

FlashObject.prototype.getParams = function() {
    return this.params;
}

FlashObject.prototype.getParam = function(name) {
    return this.params[name];
}

FlashObject.prototype.addVariable = function(name, value) {
	this.variables[name] = value;
}

FlashObject.prototype.getVariable = function(name) {
    return this.variables[name];
}

FlashObject.prototype.getVariables = function() {
    return this.variables;
}

FlashObject.prototype.getParamTags = function() {
    var paramTags = "";
    for (var param in this.getParams()) {
        paramTags += '<param name="' + param + '" value="' + this.getParam(param) + '" />';
    }
    if (paramTags == "") {
        paramTags = null;
    }
    return paramTags;
}

FlashObject.prototype.getHTML = function() {
    var flashHTML = "";
    if (window.ActiveXObject && navigator.userAgent.indexOf('Mac') == -1) { // PC IE
        flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.width + '" height="' + this.height + '" id="' + this.id + '" align="' + this.align + '">';
        flashHTML += '<param name="movie" value="' + this.swf + '" />';
        if (this.getParamTags() != null) {
            flashHTML += this.getParamTags();
        }
        if (this.getVariablePairs() != null) {
            flashHTML += '<param name="flashVars" value="' + this.getVariablePairs() + '" />';
        }
        flashHTML += '</object>';
    }
    else { // Everyone else
        flashHTML += '<embed type="application/x-shockwave-flash" src="' + this.swf + '" width="' + this.width + '" height="' + this.height + '" id="' + this.id + '" align="' + this.align + '"';
        for (var param in this.getParams()) {
            flashHTML += ' ' + param + '="' + this.getParam(param) + '"';
        }
        if (this.getVariablePairs() != null) {
            flashHTML += ' flashVars="' + this.getVariablePairs() + '"';
        }
        flashHTML += '></embed>';
    }
    return flashHTML;	
}


FlashObject.prototype.getVariablePairs = function() {
    var variablePairs = new Array();
    for (var name in this.getVariables()) {
        variablePairs.push(name + "=" + escape(this.getVariable(name)));
    }
    if (variablePairs.length > 0) {
        return variablePairs.join("&");
    }
    else {
        return null;
    }
}

FlashObject.prototype.write = function(elementId) {
	if(detectFlash(this.version) || this.doDetect=='false') {
		if (elementId) {
			document.getElementById(elementId).innerHTML = this.getHTML();
		} else {
			document.write(this.getHTML());
		}
	} else {
		if (this.redirect != "") {
			document.location.replace(this.redirect);
		} else {
			if (elementId) {
				document.getElementById(elementId).innerHTML = this.altTxt +""+ this.bypassTxt;
			} else {
				document.write(this.altTxt +""+ this.bypassTxt);
			}
		}
	}		
}

function getFlashVersion() {
	var flashversion = 0;
	if (navigator.plugins && navigator.plugins.length) {
		var x = navigator.plugins["Shockwave Flash"];
		if(x){
			if (x.description) {
				var y = x.description;
	   			flashversion = y.charAt(y.indexOf('.')-1);
			}
		}
	} else {
		result = false;
	    for(var i = 15; i >= 3 && result != true; i--){
   			execScript('on error resume next: result = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'"))','VBScript');
   			flashversion = i;
   		}
	}
	return flashversion;
}

function detectFlash(ver) {	
	if (getFlashVersion() >= ver) {
		return true;
	} else {
		return false;
	}
}

// get value of querystring param
function getQueryParamValue(param) {
	var q = document.location.search;
	var detectIndex = q.indexOf(param);
	var endIndex = (q.indexOf("&", detectIndex) != -1) ? q.indexOf("&", detectIndex) : q.length;
	if(q.length > 1 && detectIndex != -1) {
		return q.substring(q.indexOf("=", detectIndex)+1, endIndex);
	} else {
		return "";
	}
}

/* add Array.push if needed */
if(Array.prototype.push == null){
	Array.prototype.push = function(item){
		this[this.length] = item;
		return this.length;
	}
}
//script generated by SiteXpert (www.xtreeme.com)
//Copyright(C) 1998-2003 Xtreeme GmbH
var ver='4.1'
var m1=new Object
m1.name='m1'
m1.fnm='menu_m1'
if(!window.lastm||window.lastm<1)lastm=1
m1.v17=null
m1.v17Timeout=''
var maxZ=1000
m1.v18
m1.targetFrame
var docLoaded=false
m1.bIncBorder=true
m1.v29=null
m1.v29Str=''
m1.v55=50
m1.scrollStep=10
m1.fadingSteps=8
m1.itemOverDelay=0
m1.transTLO=0
m1.fixSB=0
m1.v62=0
m1.v21="http://www.ordirrigation.com.au/Menu"
m1.maxlev=2
m1.v22=0
m1.sepH=10
m1.bHlNL=1
m1.showA=1
m1.bVarWidth=0
m1.bShowDel=0
m1.scrDel=0
m1.v23=150
m1.levelOffset=20
m1.bord=1
m1.vertSpace=4
m1.sep=0
m1.v19=false
m1.bkv=0
m1.rev=0
m1.shs=0
m1.xOff=0
m1.yOff=0
m1.xSOff=0
m1.ySOff=2
m1.v20=false
m1.cntFrame=""
m1.menuFrame=""
m1.v24=""
m1.mout=true
m1.iconSize=8
m1.closeDelay=1000
m1.tlmOrigBg="#8CAAC6"
m1.tlmOrigCol="White"
m1.v25=true
m1.v52=true
m1.v60=85
m1.v11=true
m1.bord=0
m1.v10=6
m1.ppLeftPad=8
m1.v54=0
m1.v01=4
m1.tlmHlBg="#5F89AF"
m1.tlmHlCol="#CFDCE7"
m1.borderCol="Black"
m1.menuHorizontal=true
m1.scrollHeight=6
m1.attr=new Array("12px",false,false,"White","#8CAAC6","#CFDCE7","Trebuchet MS,Arial,Verdana,Tahoma","#5F89AF","White","#8CAAC6")
m1mn1=new Array
(
"History","http://www.ordirrigation.com.au/history.htm",0,"",""
,"Ord Stage 1","http://www.ordirrigation.com.au/stage1.htm",0,"",""
,"Ord Stage 2","http://www.ordirrigation.com.au/stage2.htm",0,"",""
,"Maps","http://www.ordirrigation.com.au/maps.htm",0,"",""
,"Photo Gallery","http://www.ordirrigation.com.au/gallery.htm",0,"",""
)
m1mn2=new Array
(
"Publications","http://www.ordirrigation.com.au/publications.htm",0,"",""
,"Newsletters","http://www.ordirrigation.com.au/newsletters.htm",0,"",""
)
m1mn3=new Array
(
"Business Structure","http://www.ordirrigation.com.au/business.htm",0,"",""
,"Board Members","",1,"",""
,"Staff","http://www.ordirrigation.com.au/staff.htm",0,"",""
,"Corporate Plan","http://www.ordirrigation.com.au/plan.htm",0,"",""
,"Annual Reports","http://www.ordirrigation.com.au/reports.htm",0,"",""
,"Policies","http://www.ordirrigation.com.au/policies.htm",0,"",""
)
m1mn3_2=new Array
(
"OIC","http://www.ordirrigation.com.au/board.htm",0,"",""
,"OIAMC","http://www.ordirrigation.com.au/boardOIAMC.htm",0,"",""
)
m1mn4=new Array
(
"Fees and Charges","http://www.ordirrigation.com.au/charges.htm",0,"",""
,"Water Allocation and Trading","http://www.ordirrigation.com.au/water.htm",0,"",""
,"Weather","http://www.ordirrigation.com.au/weather.htm",0,"",""
,"GIS","http://www.ordirrigation.com.au/GIS.htm",0,"",""
,"Customer Charter","http://www.ordirrigation.com.au/charter.htm",0,"",""
,"SCADA","http://www.ordirrigation.com.au/SCADA.htm",0,"",""
)
m1mn5=new Array
(
"Co-operation","http://www.ordirrigation.com.au/cooperation.htm",0,"",""
,"Downloads","http://www.ordirrigation.com.au/environment.htm",0,"",""
)
absPath=""
if(m1.v19&&!m1.v20){
if(window.location.href.lastIndexOf("\\")>window.location.href.lastIndexOf("/")) {sepCh = "\\";} else {sepCh = "/";}
absPath=window.location.href.substring(0,window.location.href.lastIndexOf(sepCh)+1)}
m1.v02=m1.v23
var stp="<img id="
var stq=" width='1' height='1' style='display:none' src='http://www.ordirrigation.com.au/Menu/menu_m1"
document.write(stp+"'m1menubg4'"+stq+"bg4.png'>")
document.write(stp+"'m1menubg5'"+stq+"bg5.png'>")
document.write(stp+"'m1menubg6'"+stq+"bg6.png'>")
document.write(stp+"'pre0m1tlm0'"+stq+"_i0.png'>")
document.write(stp+"'pre1m1tlm0'"+stq+"_i0h.png'>")
document.write(stp+"'pre0m1tlm1'"+stq+"_i1.png'>")
document.write(stp+"'pre1m1tlm1'"+stq+"_i1h.png'>")
document.write(stp+"'pre0m1tlm2'"+stq+"_i2.png'>")
document.write(stp+"'pre1m1tlm2'"+stq+"_i2h.png'>")
document.write(stp+"'pre0m1tlm3'"+stq+"_i3.png'>")
document.write(stp+"'pre1m1tlm3'"+stq+"_i3h.png'>")
document.write(stp+"'pre0m1tlm4'"+stq+"_i4.png'>")
document.write(stp+"'pre1m1tlm4'"+stq+"_i4h.png'>")
document.write(stp+"'pre0m1tlm5'"+stq+"_i5.png'>")
document.write(stp+"'pre1m1tlm5'"+stq+"_i5h.png'>")
document.write("<style type='text/css'>\n.m1CL0,.m1CL0:link{text-decoration:none;color:White; }\n.m1CL0:visited{color:White}\n.m1mit{padding-left:30px;padding-right:5px;color:White; font-family:Trebuchet MS,Arial,Verdana,Tahoma; font-size:16px; }\n"+"</"+"style>")
document.write("<"+"script type='text/javascript' src='http://www.ordirrigation.com.au/Menu/menu_dom.js'></"+"script>")
