// JavaScript Document

function goTo(targeturl, targetframe) {
	if (!targetframe) {
		targetframe = self;
	}
	
	if (targetframe) {
		targetframe.location.replace(targeturl);
	}
	
	return true;
}

function pleaseWait() {
  if(!document.onstop){
	if(document.getElementById('mainMenuID'))
		document.getElementById('mainMenuID').style.visibility="hidden";
	if(document.getElementById('hidepage')) {
		pleaseWaitSetBg ();
		pleaseWaitVisible ('hidepage');
	}
  }
}

function pleaseWaitVisible (id) {
  var window_width = document.all ? document.body.clientWidth : window.innerWidth
  var window_height = document.all ? document.body.clientHeight : window.innerHeight
  if (document.getElementById) {
    with (document.getElementById(id)) {
      style.top = document.body.scrollTop;
      style.left = document.body.scrollLeft;
      style.width = window_width+'px';
  		style.height = window_height+'px';
      vista = (style.visibility == 'hidden') ? 'visible' : 'hidden';
		  style.visibility = vista;
		}
	}
}

function pleaseWaitSetBg () {
  IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
  if(IE6 && document.getElementById('hidepageback')) {
	  	document.body.scroll = 'no';
    hidepageback.style.backgroundColor = 'silver';
    hidepageback.style.filter = 'alpha(opacity=40)';
  }
}