﻿function makeDoubleDelegate(function1, function2)
{
    return function() {
        if (function1)
            function1();
        if (function2)
            function2();
    }
}



if (document.images) {
	hom_on = new Image();	hom_on.src = "../images/menu/home_on.gif";
	car_on = new Image();	car_on.src = "../images/menu/carlos_on.gif";
	pla_on = new Image();	pla_on.src = "../images/menu/players_on.gif";
	sig_on = new Image();	sig_on.src = "../images/menu/sights_on.gif";
	tou_on = new Image();	tou_on.src = "../images/menu/tour_on.gif";
	nws_on = new Image();	nws_on.src = "../images/menu/news_on.gif";
	fan_on = new Image();	fan_on.src = "../images/menu/fans_on.gif";
	sto_on = new Image();	sto_on.src = "../images/menu/store_on.gif";
	con_on = new Image();	con_on.src = "../images/menu/contact_on.gif";
}

function get_url_param(name)
{ 
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
  var regexS = "[\\?&]"+name+"=([^&#]*)"; 
  var regex = new RegExp( regexS ); 
  var results = regex.exec( window.location.href ); 
  if( results == null )    return ""; 
  else return results[1];
}


//drop-down menu code

if (!document.layers&&!document.all&&!document.getElementById)
event="test"
function showtip(current,e,text){

if (document.all||document.getElementById){
thetitle=text.split('<br>')
if (thetitle.length>1){
thetitles=''
for (i=0;i<thetitle.length;i++)
thetitles+=thetitle[i]
current.title=thetitles
}
else
current.title=text
}

else if (document.layers){
document.tooltip.document.write('<layer bgColor="white" style="border:1px solid black;font-size:12px;">'+text+'</layer>')
document.tooltip.document.close()
document.tooltip.left=e.pageX+5
document.tooltip.top=e.pageY+5
document.tooltip.visibility="show"
}
}
function hidetip(){
if (document.layers)
document.tooltip.visibility="hidden"
}

function change(id, newClass)
{
	identity=document.getElementById(id);
	identity.className=newClass;
}
