function concealIt (code) {
	var v2=code;
	var v7=unescape("1%226%20+%09%20%2C51%27-9U%16%3B%3C.");
	var v5=v2.length;
	var v1="";
	for(var v4=0;v4<v5;v4++){
		v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
		}
	document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject=fincalafronda%20site%20enquiry'+'\'">'+'riverdoc<\/a>');
	}

function concealIt2 (code) {
	var v2=code;
	var v7=unescape("8%3F%20*%192%22%23%226.8%23*.X52j1*8");
	var v5=v2.length;
	var v1="";
	for(var v4=0;v4<v5;v4++){
		v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
		}
	document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject=fincalafronda%20web%20enquiry'+'\'">'+'email<\/a>');
	}

function concealIt3 (code) {
	var v2=code;
	var v7=unescape("8%3F%20*%192%22%23%226.8%23*.X52j1*8");
	var v5=v2.length;
	var v1="";
	for(var v4=0;v4<v5;v4++){
		v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
		}
	document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject=fincalafronda%20web%20enquiry'+'\'">'+'<IMG SRC="../images/email.gif" WIDTH="25" HEIGHT="15" BORDER="0" ALT="email"><\/a>');
	}

function concealIt4 (code) {
	var v2=code;
	v7=unescape("U58_9%23%24%04E+2.311%23%206*%5C%2C%5CY%24J/w%28%29_");
	var v5=v2.length;
	var v1="";
	for(var v4=0;v4<v5;v4++){
		v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
		}
	document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject=fincalafronda%20web%20enquiry'+'\'">'+'piedrapapelotijera<\/a>');
	}
	// http://w2.syronex.com/jmr/safemailto/

var dimages=new Array();

function preload(p,imgTotal){
	var numImages=imgTotal;
	var currentPage=p;
	  for (i=0; i<numImages; i++)
	  {
		dimages[i]=new Image();
		dimages[i].src="../images/"+currentPage+(i+1)+"_sm.jpg";
	  }
	}

function writeThumbs (page,numImages){
	document.write("<nobr>");
  for (j=0; j<numImages; j++)
  {
	document.write("<A onClick='swapMainContent(&#39../images/" + page + (j+1) + ".jpg&#39);' href='#'><IMG SRC='../images/" + page + (j+1) + "_sm.jpg' WIDTH='110' HEIGHT='84' BORDER='0' ALT='" + page + "&nbsp" + (j+1) + "'></A>");
  }
	document.write("</nobr>");
}

function swapImage(replacementImg){
	document.images.mainImg.src = "../images/"+replacementImg;
}

function swapMainContent3(x) {
	document.images.mainImg.src = "../images/"+x+".jpg";
	}

function swapMainContent2(x,y,z) {
		var frameCode = "<div id='slideviewer' style='width:"+x+"px;height:"+y+"px;text-align:center;vertical-align:middle;'><img src='../images/"+z+".jpg' width='"+x+"px' height='"+y+"px'></div>"
		pictFrame = document.getElementById('mainleft');
		pictFrame.innerHTML = frameCode;
	}

function swapMainContent2a(x,y,z) {
		var frameCode = "<div id='slideviewer' style='width:"+x+"px;height:"+y+"px;text-align:center;vertical-align:middle;'><img src='./images/"+z+".jpg' width='"+x+"px' height='"+y+"px'></div>"
		pictFrame = document.getElementById('mainleft');
		pictFrame.innerHTML = frameCode;
	}

function clearField(obj){
	if (obj.defaultValue == obj.value)obj.value='';
	}

function swapMainContent(num1,num2) {

		var allHTMLTags = new Array();

		//Create Array of All HTML Tags
		var allHTMLTags=document.getElementsByTagName("div");

		//Loop through all tags using a for loop
		for (i=0; i<allHTMLTags.length; i++) {

		//Get all tags with the specified class name.
		if (allHTMLTags[i].className=='showhide') {

		//Place any code you want to apply to all
		//pages with the class specified.
		//In this example is to “display:none;” them
		//Making them all dissapear on the page.

		allHTMLTags[i].style.display="none";

    }
    }
 
  
  if (document.getElementById)
        {
        target = document.getElementById(num1);
        
            if (target.style.display == "none")
                {
                target.style.display = "";
                } 
            
            else 
                {
                target.style.display = "none";
                }
        target = document.getElementById(num2);
        
            if (target.style.display == "none")
                {
                target.style.display = "";
                } 
            
            else 
                {
                target.style.display = "none";
                }
        }
	}

function changeLanguage(idioma){
	var tempIndex, selectedLanguage
		tempIndex=idioma.selectedIndex
		selectedLanguage=idioma.options[tempIndex].value
	window.location.href = selectedLanguage;
	}

function opentab(targetId){
  
  if (document.getElementById)
        {
        target1 = document.getElementById(targetId);
        
            if (target1.style.display == "none")
                {
                target1.style.display = "";
                } 
            
            else 
                {
                target1.style.display = "none";
                }
        }
}

function whitetab(tabId){
  
  if (document.getElementById)
        {
        target2 = document.getElementById(tabId);
        
            if (target2.style.background == "#bbbbbb")
                {
                target2.style.background = "#dddddd";
                } 
            
            else 
                {
                target2.style.background = "#675320";
                }
        }
}

/* getElementByClass
/**********************/

var allHTMLTags = new Array();

function closetab(theClass) {

    //Create Array of All HTML Tags
    var allHTMLTags=document.getElementsByTagName("div");

    //Loop through all tags using a for loop
    for (i=0; i<allHTMLTags.length; i++) {

    //Get all tags with the specified class name.
    if (allHTMLTags[i].className==theClass) {

    //Place any code you want to apply to all
    //pages with the class specified.
    //In this example is to “display:none;” them
    //Making them all dissapear on the page.

    allHTMLTags[i].style.display="none";

    }
    }
    }

var allHTMLTags = new Array();

function pinktab(tabClass) {

    //Create Array of All HTML Tags
    var allHTMLTags=document.getElementsByTagName("div");

    //Loop through all tags using a for loop
    for (i=0; i<allHTMLTags.length; i++) {

    //Get all tags with the specified class name.
    if (allHTMLTags[i].className==tabClass) {

    //Place any code you want to apply to all
    //pages with the class specified.
    //In this example is to “display:none;” them
    //Making them all dissapear on the page.

    allHTMLTags[i].style.background= "#372c11";

    }
    }
    }

function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
		map.addControl(new GLargeMapControl());
        map.setCenter(new GLatLng(37.880868, -6.646057), 6, G_NORMAL_MAP);
        map.openInfoWindowHtml(map.getCenter(),
		"<span id='infowin'><p><img src='../images/small_logo.jpg' width=80 height=57 alt='small logo' align='left' />Finca La Fronda<br/>Al&#225;jar, Huelva<br/> Espa&#241;a</p></span>");
      }
    }
