function ToggleHideShowText(id){
	if (document.getElementById(id).firstChild.data =="Show picture")
		document.getElementById(id).firstChild.data="Hide picture";
	else
		document.getElementById(id).firstChild.data="Show picture";
}

function swapText(id, txtMsg){
	if (document.getElementById(x).value=="Show")
		document.getElementById(id).firstChild.data=txtMsg;
	else
		document.getElementById(id).firstChild.data=txtMsg;
}

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

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

function servicestabshow(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://mldn.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+")";
}


<!--Begin Hide

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function clearLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

// End Hide-->



function whichServiceTab(domain, docurl, filename, anc, index)
{
	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;
}


function whichServiceTab1(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;
}