function hide(x) {
document.getElementById(x).style.display='none';
}

function show(x) {
	document.getElementById(x).style.display='block';
}

function activitiestabshow(focustab, s,h1,h2,h3,h4,h5,h6) {
	document.getElementById(s).style.display='block';
	document.getElementById(h1).style.display='none';
	document.getElementById(h2).style.display='none';
	document.getElementById(h3).style.display='none';
	document.getElementById(h4).style.display='none';
	document.getElementById(h5).style.display='none';
	document.getElementById(h6).style.display='none';

 var el = document.getelementbyid(focustab); 
 if(el.currentStyle) { 
  // for msie 
  el.style.backgroundcolor = "#c0c0c0"; 
 } else { 
  // for real browsers ;) 
  el.style.setProperty("background-color", "#c0c0c0"); 
 } 

//document.getElementById(focustab).focus(); // cannot set focus on DIV element, so try use OnMouse events.
	//document.getElementById(focustab).style.backgroundImage = 'url(p7tp/img/tabs01_down.gif)';
}

function setBgImage(x) {
	document.getElementById(x).style.backgroundImage = 'url(http://masonstravel.mobilife.sc/images/flags_of_spain.gif)';
	//document.getElementById(x).style.background-repeat = 'repeat-x';
}

function ChangeBackground(x) {
	document.getElementById(x).style.backgroundImage = 'url("tabs02_down.gif")';
	//document.getElementById(x).style.background-repeat = 'repeat';
}

function changeBgImage (image, id) {
	var element = document.getElementById(id);
	element.style.backgroundImage = "url("+image+")";
}

function changeIframeSrc(id, url) {
    var el = document.getElementById(id);
    if (el && el.src) {
        el.src = url;
        return false;
    }
    return true;
}


function whichActTab(domain, docurl, filename, anc, index, location)
{
	var str = docurl.substr(0,docurl.search('.php')+4);
	var len = docurl.length-anc.length;
	if (str=='http://'+domain+filename)
		var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:+index});
	else
		 window.location = 'http://'+domain+filename+anc;

// scroill to anchor
	window.location = location;
}

/*Using javascript to scroll to an ancor on a page*/
function jumpToAnchor(a) {
	// 'a' is the anchor you want to scroll to 
   window.location = String(window.location).replace(/\#.*$/, "") + a;
}