
var requiredMajorVersion=7;var requiredMinorVersion=0;var requiredRevision=0;var jsVersion=1.0;var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;jsVersion=1.1;function JSGetSwfVer(i){if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;descArray=flashDescription.split(" ");tempArrayMajor=descArray[2].split(".");versionMajor=tempArrayMajor[0];versionMinor=tempArrayMajor[1];if(descArray.length>3)
{if(descArray[3]!=""){tempArrayMinor=descArray[3].split("r");}else{tempArrayMinor=descArray[4].split("r");}
versionRevision=tempArrayMinor[1]>0?tempArrayMinor[1]:0;}
else
{versionRevision=0;}
flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}else{flashVer=-1;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else{flashVer=-1;}
return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{reqVer=parseFloat(reqMajorVer+"."+reqRevision);for(i=25;i>0;i--){if(isIE&&isWin&&!isOpera){versionStr=VBGetSwfVer(i);}else{versionStr=JSGetSwfVer(i);}
if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
versionMajor=versionArray[0];versionMinor=versionArray[1];versionRevision=versionArray[2];versionString=versionMajor+"."+versionRevision;versionNum=parseFloat(versionString);if((versionMajor>reqMajorVer)&&(versionNum>=reqVer)){return true;}else{return((versionNum>=reqVer&&versionMinor>=reqMinorVer)?true:false);}}}
return(reqVer?false:0.0);}
var hasRightVersion=null;function writeFlash(fSwf,fBG,fWidth,fHeight,fArgs,fID,wmode,el){hasRightVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);if(wmode!="transparent"||wmode!="opaque")
{var wmode="transparent";}
if(hasRightVersion){var fstr='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+fWidth+'" height="'+fHeight+'" id="'+fID+'" align="middle">';fstr+='<param name="allowScriptAccess" value="sameDomain" /><param name="AllowFullScreen" value="true">';fstr+='<param name="FlashVars" value="'+fArgs+'" />';if(wmode!=null){fstr+='<param name="wmode" value="'+wmode+'" />';}
fstr+='<param name="salign" value="l" />';fstr+='<param name="movie" value="'+fSwf+'" /><param name="quality" value="high" /><param name="bgcolor" value="'+fBG+'" />';fstr+='<embed src="'+fSwf+'" FlashVars="'+fArgs+'"';if(wmode!=null){fstr+=' wmode="'+wmode+'"';}
fstr+='" allowfullscreen="true" quality="high" bgcolor="'+fBG+'" width="'+fWidth+'" height="'+fHeight+'" name="'+fID+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';fstr+='</object>';if(el==undefined){document.write(fstr);}else{document.getElementById(el).innerHTML=fstr;}}else{var alternateContent='<div class="errors">'
+'This content requires the Macromedia Flash Player and Javascript to be turned on in your browser. '
+'<a href=http://www.macromedia.com/go/getflash/>Get Flash</a></div>';document.write(alternateContent);}}
function writeFlashInElement(fSwf,fBG,fWidth,fHeight,fArgs,fID,wmode,el){hasRightVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);if(wmode!="transparent"||wmode!="opaque")
{var wmode="transparent";}
if(hasRightVersion){var fstr='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+fWidth+'" height="'+fHeight+'" id="'+fID+'" align="left">';fstr+='<param name="allowScriptAccess" value="always" />';fstr+='<param name="FlashVars" value="'+fArgs+'" />';fstr+='<param name="wmode" value="'+wmode+'" />';fstr+='<param name="salign" value="l" />';fstr+='<param name="movie" value="'+fSwf+'" /><param name="quality" value="high" /><param name="bgcolor" value="'+fBG+'" />';fstr+='<embed src="'+fSwf+'" FlashVars="'+fArgs+'" wmode="'+wmode+'" quality="high" bgcolor="'+fBG+'" width="'+fWidth+'" height="'+fHeight+'" name="'+fID+'" align="left" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';fstr+='</object>';if(el==undefined){document.write(fstr);}else{document.getElementById(el).innerHTML=fstr;}}}
function toggleMapHighlight(regionToShow){var REGIONS_COUNT=6;for(var regionIndex=0;regionIndex<REGIONS_COUNT;regionIndex++)
{var highlightRegion='region'+regionIndex;document.getElementById(highlightRegion).style.display="none";}
document.getElementById(regionToShow).style.display="block";}
function toggleElements(str,r){for(var i=0;i<6;i++){var newstr=str+i
document.getElementById(newstr).style.display="none";}
var showstr=str+r;document.getElementById(showstr).style.display="block";}
function toggleVideo(el,mov,flv,xmlPath){var state=document.getElementById(el).style.display;if(state==""||state=="none"){document.getElementById(el).style.display="block";writeFlash(mov,'#FFFFFF',398,245,'vid='+flv+'&xml_path='+xmlPath,'BannerVideoPlayer',null,'videoHolder');}else{document.getElementById(el).style.display="none";}}
function toggle(el)
{var state=document.getElementById(el).style.display;if(state==""||state=="none")
{document.getElementById(el).style.display="block";if(el!='subscribe')
{document.getElementById(el).style.display="block";document.getElementById('toggleIcon').src="../images/icon_hide.gif";document.getElementById('toggleText').innerHTML="Hide Details";}}
else
{document.getElementById(el).style.display="none";if(el!='subscribe')
{document.getElementById(el).style.display="none";document.getElementById('toggleIcon').src="../images/icon_show.gif";document.getElementById('toggleText').innerHTML="Show More";}}}
function openWindow(theURL,winname,features){window.open(theURL,winname,features);}
function randomHeader(){var r=Math.floor(Math.random()*heroArray.length);str='<div id="heroText">'+heroArray[r][1]+'</div><img src="/TeM/Consumer/flash/subpagebanner_images/'+heroArray[r][0]+'" width="980" height="180" alt="'+heroArray[r][2]+'" title="'+heroArray[r][2]+'" />';document.write(str);}
function checkCountry(str){if(str.toLowerCase()=="australia"){document.getElementById("stateWrapper").style.display="block";}else{document.getElementById("stateWrapper").style.display="none";document.getElementById("state").selectedIndex=0;}}
function mailpage()
{s.linkTrackVars="events";s.linkTrackEvents='events6';s.events='event6';s.tl(this,'o','Link Name');mail_str="mailto:?subject=Check out the "+makeProper(document.title);mail_str+="&body=I thought you might be interested in the "+makeProper(document.title);mail_str+=". You can view it at, "+makeProper(location.href);location.href=mail_str;}
function makeProper(str){str=str.replace(/&/g,"%26");str=str.replace(/ /g,"%20");return str;}
var Index=new Object;function InsertIntoTextAndRepopulateTowns(txtId,selectId)
{InsertIntoText(txtId,selectId);RepopulateTowns(txtId);}
function CompleteTextFromListAndRepopulateTowns(txtId,selectId)
{CompleteTextFromList(txtId,selectId);RepopulateTowns(txtId);}
function RepopulateTowns(regionTxtId)
{if(!document.getElementById)return false;var text=document.getElementById("ctl00$PlaceHolderMain$SearchResults$AdvancedSearch$FindLocation$TextBoxControl");if(!text)
{text=document.getElementById("ctl00$PlaceHolderMain$NewSearch$FindLocation$TextBoxControl");}
if(!text)
{text=document.getElementById("ctl00_PlaceHolderMain_SearchResults_AdvancedSearch_FindLocation_TextBoxControl");}
if(!text)
{text=document.getElementById("ctl00_PlaceHolderMain_NewSearch_FindLocation_TextBoxControl");}
var select=document.getElementById("ctl00$PlaceHolderMain$SearchResults$AdvancedSearch$FindLocation$ListBoxControl");if(!select)
{select=document.getElementById("ctl00$PlaceHolderMain$NewSearch$FindLocation$ListBoxControl");}
if(!select)
{select=document.getElementById("ctl00_PlaceHolderMain_SearchResults_AdvancedSearch_FindLocation_ListBoxControl");}
if(!select)
{select=document.getElementById("ctl00_PlaceHolderMain_NewSearch_FindLocation_ListBoxControl");}
var secretTownList=document.getElementById("ctl00$PlaceHolderMain$SearchResults$AdvancedSearch$SecretTownList");if(!secretTownList)
{secretTownList=document.getElementById("ctl00_PlaceHolderMain_SearchResults_AdvancedSearch_SecretTownList");}
if(!secretTownList)
{secretTownList=document.getElementById("ctl00$PlaceHolderMain$NewSearch$SecretTownList");}
if(!secretTownList)
{secretTownList=document.getElementById("ctl00_PlaceHolderMain_NewSearch_SecretTownList");}
var regionText=document.getElementById(regionTxtId);text.value='';select.options.length=0;var j=0;var textRegions=regionText.value.split(/\s*,\s*/);if(!textRegions)return false;select.options.length++;select.options[j].value="ALL";select.options[j].text="ALL";j++;for(var k=0;k<secretTownList.options.length;k++)
{for(var i=0;i<textRegions.length;i++)
{var thisRegion=textRegions[i].replace(' ','').replace(' ','').replace(' ','').replace(' ','')
switch(thisRegion)
{case"ExperiencePerth":if(secretTownList.options[k].text=="Experience Perth")
{select.options.length++;select.options[j].value=secretTownList.options[k].value;select.options[j].text=secretTownList.options[k].value;j++;}
break;case"Australia'sNorthWest":if(secretTownList.options[k].text=="Australia's North West")
{select.options.length++;select.options[j].value=secretTownList.options[k].value;select.options[j].text=secretTownList.options[k].value;j++;}
break;case"Australia'sSouthWest":if(secretTownList.options[k].text=="Australia's South West")
{select.options.length++;select.options[j].value=secretTownList.options[k].value;select.options[j].text=secretTownList.options[k].value;j++;}
break;case"Australia'sGoldenOutback":if(secretTownList.options[k].text=="Australia's Golden Outback")
{select.options.length++;select.options[j].value=secretTownList.options[k].value;select.options[j].text=secretTownList.options[k].value;j++;}
break;case"Australia'sCoralCoast":if(secretTownList.options[k].text=="Australia's Coral Coast")
{select.options.length++;select.options[j].value=secretTownList.options[k].value;select.options[j].text=secretTownList.options[k].value;j++;}
break;}}}
if(textRegions.length==1&&textRegions[0]=='')
{var n=0
select.options.length++;select.options[n].value="ALL";select.options[n].text="ALL";n++;for(var m=0;m<secretTownList.options.length;m++)
{select.options.length++;select.options[n].value=secretTownList.options[m].value;select.options[n].text=secretTownList.options[m].value;n++;}}
return true;}
function CompleteTextFromList(txtId,selectId)
{if(!document.getElementById)return;var text=document.getElementById(txtId);var select=document.getElementById(selectId);if(!Index.populated)BuildIndex(selectId);var suburb=text.value.match(/,*([^,]+)$/);if(suburb)
{var name=suburb[1].toUpperCase().replace(/^\s*/,'').replace(/\s*$/,'');for(var i=Index[name.charAt(0)];i<select.options.length;i++)
{if(select.options[i].text.toUpperCase().indexOf(name)==0)
{select.selectedIndex=i;break;}
else
{select.selectedIndex=-1;}}}}
function BuildIndex(selectId)
{if(!document.getElementById)return;var select=document.getElementById(selectId);for(var i=select.options.length;i--;)
{Index[select.options[i].text.toUpperCase().charAt(0)]=i;}
Index.populated=true;}
function InsertIntoTextSingle(txtBox,listBox)
{if(!document.getElementById)return false;var text=document.getElementById(txtBox);var select=document.getElementById(listBox);text.focus();var suburb=select.options[select.selectedIndex];if(select.selectedIndex==0)
{text.value='';return true;}
var newvalue=suburb.text;text.value=newvalue;return false;}
function InsertIntoText(txtBox,listBox)
{if(!document.getElementById)return false;var text=document.getElementById(txtBox);var select=document.getElementById(listBox);text.focus();var suburb=select.options[select.selectedIndex];if(select.selectedIndex==0)
{text.value='';return true;}
var textSuburbs=text.value.split(/\s*,\s*/);if(!textSuburbs)return false;var pattern=new RegExp('\s*'+suburb.text+'\s*$');for(var i=0;i<textSuburbs.length;i++)
{if(pattern.exec(textSuburbs[i]))return false;}
var newvalue=text.value.replace(/(^|,)([^,]*)$/,"$1 "+suburb.text+', ');text.value=newvalue;return false;}
function toggleMulti(el,iconShow,iconHide,text){var state=document.getElementById(el).style.display;if(state==""||state=="none"){document.getElementById(el).style.display="block";document.getElementById(iconShow).style.display="none";document.getElementById(iconHide).style.display="inline";if(document.getElementById(text))
{document.getElementById(text).innerHTML="Hide Details";}}else{document.getElementById(el).style.display="none";document.getElementById(iconShow).style.display="inline";document.getElementById(iconHide).style.display="none";if(document.getElementById(text))
{document.getElementById(text).innerHTML="Show More";}}}
function doSearch()
{var keyWords=document.getElementById("siteSearch");if(keyWords!=null&&keyWords.value!="")
{window.location="/en/search/Pages/Search.aspx?k="+encodeHtml(keyWords.value);}}
function checkKey(event)
{oEvent=event;iKeyCode=oEvent.keyCode;if(iKeyCode==13||iKeyCode==3)
{document.getElementById("searchBtn").click();return false;}}
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 setFont(){var num;if(agt.indexOf('opera')!=-1||agt.indexOf('safari')!=-1){document.getElementById('fontUp').style.display="none";document.getElementById('fontDown').style.display="none";}else{num=parseInt(getCookie('fontSize'));}
if(num!=null){adjustFont(0);}}
var minFontSize=8;var maxFontSize=24;var agt=navigator.userAgent.toLowerCase();function adjustFont(a){fs=parseInt(getCookie('fontSize'));if(fs==null||isNaN(fs)){fs=11;}
var num=fs+a;if((parseInt(navigator.appVersion)==4)&&(agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)){alert('Your Browser does not support this feature. Please consider upgrading.');}
else if(agt.indexOf('gecko')!=-1){if(fs>(minFontSize-a)&&fs<(maxFontSize-a)){document.getElementById('tssxyz').sheet.insertRule('.adjustable, p.adjustable, .adjustable ul{ font-size: '+num+'px; }',document.getElementById('tssxyz').sheet.cssRules.length);document.getElementById('tssxyz').sheet.insertRule('div.adjustable { font-size: '+num+'px; }',document.getElementById('tssxyz').sheet.cssRules.length);document.getElementById('tssxyz').sheet.insertRule('h2.adjustable, h3.adjustable, div.adjustable h2, div.adjustable h3 { font-size: '+(num+3)+'px; }',document.getElementById('tssxyz').sheet.cssRules.length);setCookie('fontSize',num,120,'/','','');}}
else if((parseInt(navigator.appVersion)>=4)&&(agt.indexOf('msie')!=-1)){if(fs>(minFontSize-a)&&fs<(maxFontSize-a)){newSize="font-size:"+num+"px";newH2Size="font-size:"+(num+3)+"px";document.styleSheets["tssxyz"].addRule(".adjustable",newSize);document.styleSheets["tssxyz"].addRule("p.adjustable",newSize);document.styleSheets["tssxyz"].addRule("div.adjustable",newSize);document.styleSheets["tssxyz"].addRule(".adjustable ul",newSize);document.styleSheets["tssxyz"].addRule("h2.adjustable",newH2Size);document.styleSheets["tssxyz"].addRule("h3.adjustable",newH2Size);document.styleSheets["tssxyz"].addRule("div.adjustable h2",newH2Size);document.styleSheets["tssxyz"].addRule("div.adjustable h3",newH2Size);setCookie('fontSize',(fs+a),120,'/','','');}}}
function setCookie(name,value,days,path,domain,secure){var expires,date;if(typeof days=="number"){date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires=date.toGMTString();}
document.cookie=name+"="+escape(value)+
((expires)?"; expires="+expires:"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");}
function getCookie(name){var nameq=name+"=";var c_ar=document.cookie.split(';');for(var i=0;i<c_ar.length;i++){var c=c_ar[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameq)==0)return unescape(c.substring(nameq.length,c.length));}
return null;}
function deleteCookie(name,path,domain){if(getCookie(name)){document.cookie=name+"="+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
window.onload=setFont;function IE6_Transparency_MouseOn(obj)
{if(navigator.appName.indexOf("Microsoft")<0)
return;if(parseInt(navigator.appVersion)>5)
return;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent))
{var ieversion=new Number(RegExp.$1)
if(ieversion>=7)
return;}
var teMMenuDiv=document.getElementById('zz1_teMMenu');var teMMenuDivOffset=findPos(obj);if(teMMenuDiv!=null)
{var tempiframe=document.getElementById('tempiframe');if(tempiframe==null)
{teMMenuDiv.insertAdjacentHTML("afterEnd",'<IFRAME style="padding: 0; margin: 0; position:absolute; z-index: 1;"'+' src="#" frameBorder="0" scrolling="no"'+' id="tempiframe" />');var iframeShim=document.getElementById("tempiframe");var children=obj.childNodes;var h=0;childOffset=findPos(children[2]);iframeShim.style.top=teMMenuDivOffset[1]+29+"px";iframeShim.style.left=(teMMenuDivOffset[0])+"px";iframeShim.style.height=children[2].offsetHeight+"px";iframeShim.style.width=children[2].offsetWidth+"px";iframeShim.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=100)';}}}
function IE6_Transparency_MouseOff(obj)
{if(navigator.appName.indexOf("Microsoft")<0)
return;if(parseInt(navigator.appVersion)>5)
return;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent))
{var ieversion=new Number(RegExp.$1)
if(ieversion>=7)
return;}
var teMMenuDiv=document.getElementById("zz1_teMMenu");if(teMMenuDiv!=null)
{var tempiframe=document.getElementById("tempiframe");if(tempiframe!=null)
{tempiframe.style.display='none';teMMenuDiv.parentNode.removeChild(tempiframe);}}}
function findPos(obj)
{var curleft=curtop=0;if(obj.offsetParent)
{do
{if(obj==document.getElementById('container')||obj==document.getElementById('searchContainer')||obj==document.getElementById('resultContainer'))
break;curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);}
return[curleft,curtop];}
