function load( img0, img1 ) // executes at page load time via body onload
{
	showTab(0);
}
function apply (page)
{ 	var url = page;	window.open ( url, 'Apply', 'scrollbars=yes,location=yes,resizable=yes,width=830,height=650,top=5', false );}

function getInternetExplorerVersion()// Returns the version of Internet Explorer or a -1// (indicating the use of another browser).
{  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );  }
  return rv;
}
function setCookie( value )
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+5); // cookie will last 5 days
	document.cookie = "cardimage=" + value + ";expires="+exdate.toGMTString();
}

function showTab (tabNumber)
{
	var maxTabs = 4; // just in case you want to add more than 4 tabs
	if ( ! ( tabNumber >= 0 && tabNumber <= maxTabs-1 ) ) return; // make sure it is a valid tab number
	var disp, tabContent, tab, className ;
	for ( var i = 0; i < maxTabs ; i++ )
	{
		if ( i == tabNumber ) // show
			{
				disp = "block";
				className = "selected";
			}
		else // hide
			{
				disp="none";
				className = "unselected";
			}	
		tabContent = document.getElementById("tabbedContent_" + i);
		if (tabContent)
			{
				tabContent.style.display = disp;
			}
		tab = document.getElementById("tab_" + i );
		if (tab)
			{ 
				tab.className = className;
			}
	}
}
function goToPage ( pageURL )
{
	document.location.href=pageURL
}
function doPrint() { window.print() }
function toggle ( num )
{
	var header = document.getElementById("expandableToggle_" + num);
	if (header)
	{
		var content = document.getElementById("expandableContent_" + num);
		var newHeaderClass, newContentDisplay;
		if ( header.className == "tabContentHeadingCollapsable") // hide it
			{
				newHeaderClass = "tabContentHeadingExpandable";
				newContentDisplay = "none";
			}
		else // show it
			{
				newHeaderClass = "tabContentHeadingCollapsable";
				newContentDisplay = "block";
			}
		header.className = newHeaderClass;
		content.style.display = newContentDisplay;
	}
}
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}
function previousPage (){window.history.back();}
function MM_openBrWindow(theURL,winName,features){ window.open(theURL,winName,features);}
function go(){
	var msg_old = document.URL;
    msg = msg_old.replace("idioma=esp", "idioma=eng");
	num = msg.indexOf('esp');		
    if (num == -1){
		window.location.href="/eng/";
	}
    else{			 
		var pagina = msg.substr(num+3,msg.length);
		window.location.href="/eng"+ pagina;	 	
    }     
}
function ir(){
     var msg_old = document.URL;
	 msg = msg_old.replace("idioma=eng", "idioma=esp");
     num = msg.lastIndexOf('eng');
     num2 = msg.length-num;
     var pagina = msg.substr(num+4,num2); 
     var direc = msg.substr(0,num); 
     if( (pagina == "") || (pagina == "index.html") 
		 || (pagina == "index_includes.html") || (pagina == "#")){
		 window.location.href=direc + pagina;
	 }
     else{ 
		window.location.href=direc+"esp/"+ pagina;
	 }
}