// JavaScript Document


//tmtC_cssOnResolution
if (window.screen){
  var w = screen.width;
  tmt_css_640 = "style_saneplanet.css";
  tmt_css_800 = "style_saneplanet.css";
  tmt_css_1024 = "style_saneplanet.css";
  if(w<740){
    document.write("<link rel='stylesheet' href='" + tmt_css_640 + "' type='text/css'>");
  }
  if(w>=740 & w<835){
    document.write("<link rel='stylesheet' href='" + tmt_css_800 + "' type='text/css'>");
  }
  if(w>=835){
    document.write("<link rel='stylesheet' href='" + tmt_css_1024 + "' type='text/css'>");
  }
}//tmtC_cssOnResolutionEnd


//-block display


var supported = (document.getElementById || document.all);

if (supported)
{
	document.write("<STYLE TYPE='text/css'>");
	document.write(".display {display: none}");
	document.write("</STYLE>");

	var max = 7;
	var shown = new Array();
	for (var i=1;i<=max;i++)
	{
		shown[i+1] = false;
	}

}

function blocking(i)
{
	if (!supported)
	{
		alert('This link does not work in your browser.');
		return;
	}
	shown[i] = (shown[i]) ? false : true;
	current = (shown[i]) ? 'block' : 'none';
	if (document.getElementById)
	{
		document.getElementById('number'+i).style.display = current;
	}
	else if (document.all)
	{
		document.all['number'+i].style.display = current;
	}
}
//-script to match height of wrapper to height of sideLeft sidebar for those pages that has very little text, otherwise at least in firefox, the bottom of wrapper goes higher than the bottom of the sidebar

function setH()
{
   var maxH = Math.max(document.getElementById('wrapper').offsetHeight,document.getElementById('SideLeft').offsetHeight);
   document.getElementById('wrapper').style.height=maxH+'px';
   document.getElementById('SideLeft').style.height=maxH+'px';
}
onload=setH;


//-preload images

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



//--->

