/* ----------------------------------------------------------------------
 *
 * Aesthetia Designs                        IMMMI MMMMMM7               
 * Copyright 2007                        7MMMMMMI  MMMMMMMMMM           
 *                                     +MMM   MMI  MMM   $MMMMM        
 *                                    MMM     MMI  MMM      $MMMM       
 * For information, contact          MMMMMMMMMMMI  MMM        DMMM      
 * Tyler Potter                     MM8       MMI  MMM          MMM    
 * Technical Director              MMM        MMI  MMM           MMM    
 * tyler@aesthetia.net            8MM         MMI  MMM            MMO   
 *                                MM          MMI  MMM             MM   
 *                               DMM          MMI  MMM             $MM  
 *                               MM7          MMI  MMM              MM  
 *                               MMM          MMI  MMMMMMMMMMMMMMMMMMM     
 *                                         AESTHETIA DESIGNS
 * ------------File Info-------------------------------------------------
 * Name: divToggle.js
 *
 * Use: Div Showing, Hiding, etc functions
 *
 *
 */
 
 
	var last = null;
	var saved = null;

	function toggleMe(a){
	var e=document.getElementById(a);
	if(!e) return;

	if(e.style.display=="block"){
	e.style.display="none"
	} else {
	e.style.display="block"
	}

	}

	function showMe(a){
	var e=document.getElementById(a);
	if(!e) return;

	e.style.display="block"

	}

	function hideMe(a){
	var e=document.getElementById(a);
	if(!e) return;

	e.style.display="none"

	}
	function hideMeRestore(a){

		hideMe(a);

		if ( saved != null ) {
			showMe(saved);
			last = saved;
			saved = null;
		}

		
	}


	function showJustMe(a){

	var e=document.getElementById(a);
	if(!e) return;

	
	
	if (last == a) {
		hideMe(a);
		last = null;
		return;
	}
	
	if (last != null)
		hideMe(last);
	
	if(e.style.display=="block")
		last = null;
	else
		last = a;

	toggleMe(a);	


	}
	

	function showJustMeSave(a){
	
		saved = last;
		
		showJustMe(a);

		
    function setFocus(a) {
    	var e=document.getElementById(a);
		if(!e) return;
	    
		e.focus()
    }
    
	}	