
var max_font_size=1.05;var rpm_height_step=1.1;$(document).ready(function()
{var bg_class_name=$("meta[name=bg_class]").attr("content");if(bg_class_name!=null)
{change_background_class(bg_class_name);}});function change_background_class(classType)
{var container=document.getElementById('background_container');container.className=classType;}
function createCookie(name,value,days)
{if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name)
{var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function deleteCookie(name)
{createCookie(name,"",-1);}
function getElementsByClass(searchClass,tag)
{var returnArray=[];tag=tag||'*';var els=document.getElementsByTagName(tag);var pattern=new RegExp('(^|\\s)'+searchClass+'(\\s|$)');for(var i=0;i<els.length;i++)
{if(pattern.test(els[i].className))
{returnArray.push(els[i]);}}
return returnArray;}
function load_preferences()
{var body_array=document.getElementsByTagName("body");var body=body_array[0];var footer_container=document.getElementById('footer_container_inner');var rpm_array=getElementsByClass('right_page_module','div');var promo_module_opaque_array=getElementsByClass('rpm_opaque_container','div');var promo_module_content_array=getElementsByClass('rpm_actual_content','div');var em_size=readCookie('burswood_font_size');var footer_margin_top=readCookie('burswood_footer_margin_top');var rpm_height=readCookie('burswood_rpm_height');var rpm_content_height=readCookie('burswood_rpm_content_height');if(null==em_size)
{em_size=0.75;}
if(null==footer_margin_top)
{footer_margin_top=2;}
if(null==rpm_height)
{rpm_height=14;}
if(null==rpm_content_height)
{rpm_content_height=13.8;}
body.style.fontSize=em_size+"em";footer_container.style.marginTop=footer_margin_top+"em";for(var rpm in rpm_array)
{rpm_array[rpm].style.height=rpm_height+"em";}
for(var rpm_opaque in promo_module_opaque_array)
{promo_module_opaque_array[rpm_opaque].style.height=rpm_height+"em";}
for(var rpm_content in promo_module_content_array)
{promo_module_content_array[rpm_content].style.height=rpm_content_height+"em";}}
function get_current_font_size()
{var body_array=document.getElementsByTagName("body");var body=body_array[0];var current_size=0.75;if(body.style.fontSize)
{current_size=body.style.fontSize.substring(0,body.style.fontSize.length-2);}
return current_size;}
function resize_margin_top(increase_margin_top)
{var footer_container=document.getElementById('footer_container_inner');var current_footer_margintop=2;if(footer_container.style.marginTop)
{current_footer_margintop=footer_container.style.marginTop.substring(0,footer_container.style.marginTop.length-2);}
var new_margin_top=current_footer_margintop;if(increase_margin_top)
{var current_font_size=get_current_font_size();if(current_font_size<max_font_size)
{new_margin_top=current_footer_margintop*1.4;}}
else
{new_margin_top=current_footer_margintop/1.4;}
createCookie('burswood_footer_margin_top',new_margin_top);footer_container.style.marginTop=new_margin_top+"em";}
function resize_rpm_height(increase_height)
{var promo_module_array=getElementsByClass('right_page_module','div');var promo_module_opaque_array=getElementsByClass('rpm_opaque_container','div');var promo_module_content_array=getElementsByClass('rpm_actual_content','div');var current_rpm_height=14;var current_rpm_content_height=13.8;if(promo_module_content_array.length>0)
{if(promo_module_array[0].style.height)
{current_rpm_height=promo_module_array[0].style.height.substring(0,promo_module_array[0].style.height.length-2);}
if(promo_module_content_array[0].style.height)
{current_rpm_content_height=promo_module_content_array[0].style.height.substring(0,promo_module_content_array[0].style.height.length-2);}}
else
{var cookie_rpm_height=readCookie('burswood_rpm_height');var cookie_rpm_content_height=readCookie('burswood_rpm_content_height');if(null!=cookie_rpm_height)
{current_rpm_height=cookie_rpm_height;}
if(null!=cookie_rpm_content_height)
{current_rpm_content_height=cookie_rpm_content_height;}}
var new_rpm_height=current_rpm_height;var new_rpm_content_height=current_rpm_content_height;if(increase_height)
{var current_font_size=get_current_font_size();if(current_font_size<max_font_size)
{new_rpm_height=current_rpm_height*rpm_height_step;new_rpm_content_height=current_rpm_content_height*rpm_height_step;}}
else
{new_rpm_height=current_rpm_height/rpm_height_step;new_rpm_content_height=current_rpm_content_height/rpm_height_step;}
createCookie('burswood_rpm_height',new_rpm_height);createCookie('burswood_rpm_content_height',new_rpm_content_height);for(var rpm in promo_module_array)
{promo_module_array[rpm].style.height=new_rpm_height+"em";}
for(var rpm_opq in promo_module_opaque_array)
{promo_module_opaque_array[rpm_opq].style.height=new_rpm_height+"em";}
for(var rpm_content in promo_module_content_array)
{promo_module_content_array[rpm_content].style.height=new_rpm_content_height+"em";}}
function resize_font_size(increase_font_size)
{var body_array=document.getElementsByTagName("body");var body=body_array[0];var current_size=0.75;if(body.style.fontSize)
{current_size=body.style.fontSize.substring(0,body.style.fontSize.length-2);}
var new_size=current_size;if(increase_font_size)
{var current_font_size=get_current_font_size();if(current_font_size<max_font_size)
{new_size=parseFloat(current_size)+0.15;}}
else
{new_size=parseFloat(current_size)-0.15;}
createCookie('burswood_font_size',new_size);body.style.fontSize=new_size+"em";}
function resize_text(increase_size)
{resize_rpm_height(increase_size);resize_margin_top(increase_size);resize_font_size(increase_size);}
function highlight_venue(div_area,venue_name,venue_category,flag)
{var bec_venue_logo;var venue_bg_class;var selected_venue_logo;var hover_name;if(true==flag)
{bec_venue_logo=getElementsByClass(venue_name,'a');venue_bg_class=venue_name+"_"+venue_category+"_bg_rollover";selected_venue_logo=bec_venue_logo[0];hover_name=venue_name+"_over";}
else
{bec_venue_logo=getElementsByClass((venue_name+'_over'),'a');venue_bg_class=venue_category+'_mainpage'+'_bg';selected_venue_logo=bec_venue_logo[0];hover_name=venue_name;}
change_background_class(venue_bg_class);selected_venue_logo.className=hover_name;div_area.style.cursor="pointer";div_area.style.cursor="hand";}