// JavaScript Document


	
///////////////////////////// GENERIC DIV SWITCHES //////////////

	

function SwitchDiv(Switch,SwitchID)
	{
		if (Switch=='On')
		{
			document.getElementById(''+SwitchID).style.display = '';
			 
			
			
		
		}
		else
		{
			document.getElementById(''+SwitchID).style.display = 'none';
		}
		
	}
	
	
function SwitchLoad(Switch,SwitchID)
	{
		if (Switch=='On')
		{
			
			document.getElementById('Loading').style.display = '';
			document.getElementById('MyUpBtn').style.display = 'none';  
			
			
		
		}
		else
		{
			document.getElementById(''+SwitchID).style.display = 'none';
		}
		
	}
	
	
	
	function SwitchSelect(Switch,SwitchID)
	{
		document.getElementById(SwitchID).options[0].selected = true;
	}
	
function popup(pageref,win_name) {
	var remote = window.open(pageref,win_name,"width=690,height=550,left=10,top=10,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no");	
	if (remote.opener == null) remote.opener = window; 
	remote.opener.name = "parent_window";
	
}

/////////////////// AJAX LOADER //////////////////////

function startLoading() {
	 Element.hide('AjaxLoader');
	}
	function finishLoading() {
	  Element.show('AjaxLoader');
	}

	function loadContent(id) {
	  startLoading();
	  new Ajax.Updater('AjaxLoader', 'dx.ajaxload.php', {method: 'post', postBody:'content=' + id +''});
	  finishLoading();
	}
	
	function handleIFRAME(thestring){

	var iframe = document.getElementById('LoadFrame');
	
	
	iframe.src = 'dx.progressText.php?'+thestring;
	iframe.reload();
	document.getElementById('LoadFrame').style.height = '400px';
	
	}
	
	
	function silentErrorHandler(handIFRAME,handIFRAME2) {return true;}
	window.onerror=silentErrorHandler;
	