// JavaScript Document

// function to hide/show elements on mouse click
<!--
function Toggle(item) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   
   if (visible) {
     obj.style.display="none";
     key.innerHTML="<img src=/images/plus.gif alt=Show title=Show border=0 />";
   } else {
      obj.style.display="block";
      key.innerHTML="<img src=/images/minus.gif alt=Hide title=Hide border=0 />";
   }
}
//-->

<!--
    var openDiv = '';
    function showHide(div) {
        var d = document.getElementById(div);
        if (d != 'undefined') {
            if (div == openDiv) {
                // Same div clicked, no problem, code will handle show/hide below
                openDiv = ''; // No open divs
                key = document.getElementById("x" + div);
                key.innerHTML="<img src=/images/plus.gif alt=Show title=Show border=0 />";    
                
            } else {
                // Different div
                                  
                if (openDiv != '') {
                    // Close the currently open div
                    var x = document.getElementById(openDiv);                 
                    x.style.display = 'none';
                    
                    key = document.getElementById("x" + openDiv);
                    key.innerHTML="<img src=/images/plus.gif alt=Show title=Show border=0 />";
                } 
                // Set the new div as the open div
                openDiv = div;
                
                key = document.getElementById("x" + openDiv);
                key.innerHTML="<img src=/images/minus.gif alt=Hide title=Hide border=0 />";
                
            }
            d.style.display = (d.style.display == 'block' ? 'none' : 'block');
  
  
  
        }
    }
//-->


// Functions to provide show and hide functionality for the brochures page

	last_tab = 'tab1';
	function show(layerName) {
		document.getElementById(layerName).style.display = '';
	}
	
	function hide(layerName) {
		document.getElementById(layerName).style.display = 'none';
	}
	
	function show_next(tab_name) {
		document.getElementById(last_tab).className = 'tab';
		var curr = document.getElementById(tab_name);
		curr.className='tab_hover';
		hide(last_tab+'_data');
		show(tab_name+'_data');
		last_tab=tab_name;
	}


// Javascript function to apply the css style change to input buttons
// which are fired by the OnMouseOver / OnMouseOut events.
<!--
function buttonhover(loc,cls)
{
    if(loc.className)
    loc.className=cls;
}
//-->


// ****   ASP.net Custom Validation Functions   ****

//validate empty asp.net textbox
<!--
function ASPNET_ValidateEmptyField(sender, args)
{
if(args.Value == "")
    {
        args.IsValid  = false; 
    }  
else
    {
        args.IsValid  = true;   
    } 

}
//->

//validate email address in an asp.net textbox
<!--
function ASPNET_isValidEmail(sender, args) 
{
var str=args.Value      
//alert('We iz in da funky-tion now!')
if (str.lastIndexOf(".") + 1 >= str.length - 3 && str.lastIndexOf(".") + 1 <= str.length - 2 && str.indexOf("@") > 0)
    {
        args.IsValid = true;
    }
else
    {
        args.IsValid = false;
    }
}
//-->