//window.onload = function () {
	//choose one of these options
	//option 1 - no auto-child-collapse
	//compactMenu('odo',false,'&plusmn; ');
	//option 2 - auto-child-collapse
//	compactMenu('odo',true,' ');
//}

function shToggle(content) {
	if (document.getElementById(content).style.display == "none")
		document.getElementById(content).style.display = "block"
	else
		document.getElementById(content).style.display = "none"
}

menu_status = new Array();
function showHide(theid){
	 
	
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
};

//// Contact form show/hide
//var showme = new Object();
//    showme['d1'] = 'INB';
//    showme['d2'] = 'OTH';
//
//function display(selval) {
//     for (divs in showme)
//          if (showme[divs] == selval) 
//               document.getElementById(divs).style.display = 'block';
//          else document.getElementById(divs).style.display = 'none';
//}


var actDiv;
function chklayer(v) {
  if (actDiv) {
    actDiv.style.display="none";
  }
  if(v>0){
    actDiv = document.getElementById("Layer"+v);
    actDiv.style.display="block";
  }
}


// Validate contact form
function checkform (form)
{
		var filter = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

   	if (form.name.value == "") {
        alert( "Name field is required." );
        form.name.focus();
        return false ;
    }
		
   	if (form.address.value == "") {
        alert( "Address field is required." );
        form.address.focus();
        return false;
    }
		
//   	if (form.state.value == "") {
//        alert( "All fields are required." );
//        form.state.focus();
//        return false;
//    }
		
   	if (form.city.value == "") {
        alert( "City field is required." );
        form.city.focus();
        return false;
    }
		
   	if (form.phone.value == "") {
        alert( "Phone field is required." );
        form.phone.focus();
        return false;
    }
		
   	if (form.zip.value == "") {
        alert( "Zip code field is required." );
        form.zip.focus();
        return false;
    }
		
		if (form.email.value == "") {
        //alert( "All fields are required." );
        form.email.focus();
        return false ;
    } else {
				if (!filter.test(form.email.value)){
				alert("Invalid E-mail Address! Please re-enter.");
				return false;
				}
    }
}
		