/* Precache all of the rollover button images */
tab_off = new Image(109,29);
tab_off.src="/images/tab_off.png";

tab_on = new Image(109,29);
tab_on.src="/images/tab_on.png";

/* Behaviour rules */

tab_off=new Image(109,29);tab_off.src="/images/tab_off.png";tab_on=new Image(109,29);tab_on.src="/images/tab_on.png";var summaryRules={'div.flag':function(element){Event.observe(element,'mouseover',function(e){if(browserName=="Internet Explorer"){Element.addClassName(element,"highlighted_flag");}});Event.observe(element,'mouseout',function(e){if(browserName=="Internet Explorer"){Element.removeClassName(element,"highlighted_flag");}});Event.observe(element,'click',function(e){flag_id=element.id.split("-")[1];owner=document.getElementsByClassName("login",element)[0].innerHTML;user=new Cookie("login").get();re=/http:\/\/.*?\/(.*?)\/(.*)/;m=re.exec(window.location);if(m[1]=="my"){if(user==owner){window.location="/my/flags?reload=true&ownership=yours&current_flag="+flag_id;}else{window.location="/my/flags?reload=true&ownership=friends&current_flag="+flag_id;}}else{window.location="/flags/"+owner+"?reload=true&current_flag="+flag_id;}});},'li.map':function(element){Event.observe(element,'click',function(e){map_id=element.id.split("-")[1];window.location="/maps/"+map_id;});Event.observe(element,'mouseover',function(e){if(browserName=="Internet Explorer"){Element.addClassName(element,"highlighted_map");}});Event.observe(element,'mouseout',function(e){if(browserName=="Internet Explorer"){Element.removeClassName(element,"highlighted_map");}});},'#myspace_link':function(element){Event.observe(element,'click',function(e){Element.toggle('allsites');Element.toggle('myspace');});},'#allsites_link':function(element){Event.observe(element,'click',function(e){Element.toggle('allsites');Element.toggle('myspace');});}};Behaviour.register(summaryRules);
