//here you place the ids of every element you want.
    var ids=new Array('a1','a2','a3','thiscanbeanything');

    function switchid(id){
        try{	
	    hideallids();
	    showdiv(id);
	    }catch(ex){}
    }

    function hideallids(){
        try{
	    //loop through the array and hide each element by id
	    for (var i=0;i<ids.length;i++){
		    hidediv(ids[i]);
	    }	
	    }catch(ex){}	  
    }

    function hidediv(id) {
        try{
	    //safe function to hide an element with a specified id
	    if (document.getElementById) { // DOM3 = IE5, NS6
		    document.getElementById(id).style.display = 'none';
	    }
	    else {
		    if (document.layers) { // Netscape 4
			    document.id.display = 'none';
		    }
		    else { // IE 4
			    document.all.id.style.display = 'none';
		    }
	    }
	    }catch(ex){}
    }

    function showdiv(id) {
        try{
	    //safe function to show an element with a specified id
    		  
	    if (document.getElementById) { // DOM3 = IE5, NS6
		    document.getElementById(id).style.display = 'block';
	    }
	    else {
		    if (document.layers) { // Netscape 4
			    document.id.display = 'block';
		    }
		    else { // IE 4
			    document.all.id.style.display = 'block';
		    }
	    }
	    }catch(ex){}
    }


    function submitit(evt,buttonToClick)
    {
        try{
	    if(window.event)
	    {
		    key=evt.keyCode;
    		
	    }
	    else
	    {
		    key=evt.which;
    		
	    }
	    if(key==13)
	    {

		    document.getElementById(buttonToClick).focus();
		    document.getElementById(buttonToClick).click();
		    return true;
	    }
	    return false;
	    }catch(ex){}
    }
    
    
    function SetFocusPassword(divPassMain,divPass,txtPass)
    {            
        try{            
        showdiv(divPassMain);
        hidediv(divPass);
        document.getElementById(txtPass).focus();
        }catch(ex){}
    }
    
    function txtPasswordOnBlure(control,divPasswordMain,divPassword)
    {
        try{
        if(control.value=='')
        {
            hidediv(divPasswordMain);
            showdiv(divPassword);
        }        
        else
        {
            showdiv(divPasswordMain);
            hidediv(divPassword);
        }    
        }catch(ex){}            
    } 
    
    function downDiv(id) {
        try{
	    //safe function to hide an element with a specified id
	    if (document.getElementById) { // DOM3 = IE5, NS6
		    document.getElementById(id).style.zIndex = -5;
		    document.getElementById(id).style.position="absolute";
	    }
	    else {
		    if (document.layers) { // Netscape 4
			    document.id.zIndex = -5;
			    document.id.position="absolute";
		    }
		    else { // IE 4
			    document.all.id.style.zIndex = -5;
			    document.all.id.style.position="absolute";
		    }
	    }
	    }catch(ex){}
    }

    function upDiv(id) 
    {
        try{
	    //safe function to show an element with a specified id
    		  
	    if (document.getElementById) { // DOM3 = IE5, NS6
		    document.getElementById(id).style.zIndex = 500;
	        document.getElementById(id).style.position="absolute";
	    }
	    else {
		    if (document.layers) { // Netscape 4
			    document.id.style.zIndex = 500;
			    document.id.style.position="absolute";
		    }
		    else { // IE 4
			    document.all.id.style.style.zIndex = 500;
			    document.all.id.style.style.position="absolute";
		    }
	    }
	    }catch(ex){}
    }
    
