﻿// JavaScript Document
function setupNav(){
	var currURL = window.location;
	currURL = currURL.toString();
	appName = navigator.appName;
	appName = appName.toString()
	appVer = navigator.appVersion;
	bName = 'Microsoft Internet Explorer';
	bVer = 4;
	var hitURL="";
	
	if (document.getElementById('sepaNav')){
		var leftNavigation = document.getElementById('sepaNav');
		var b = leftNavigation.getElementsByTagName('li');
		b = b.length;
		for (x=0;x<=b-1;x++){
			if ((appName != bName) && (appVer != bVer)){
				hitURL = leftNavigation.getElementsByTagName('li')[x].firstChild.href;
			} else {
				hitURL = leftNavigation.getElementsByTagName('li')[x].childNodes[0].href;
			}
			try {hitURL = hitURL.toString();}
			catch (error){}
			if (currURL.indexOf(hitURL) > -1 ){
				if (hitURL.length == currURL.length){
					leftNavigation.getElementsByTagName('li')[x].className = 'current';
					break;
				}
			}
		}
	}
}

  $(document).ready(function(){
  $("div#leftbottom").hide();		
  $("a#action").click(function () {
  $("div#leftbottom").hide();		
	
  if($("#country").val() != "Select a country or location")
  {
	$("div#leftbottom").slideToggle("slow");					  
  }
  });
});


function toggle(country){
	var i=1;
	var id;
	
	document.getElementById("main_1").className="bodyCopy noBranding toggle tool active";
	while(document.getElementById('country').options[i] != null)
	{
		id=document.getElementById('country').options[i].id;
		document.getElementById(id+"_1").className="inactive";
		i++;
	}
	id = document.getElementById('country').options[document.getElementById('country').selectedIndex].id;
	//if(id !=null && id!='main')
	if(id !=null && document.getElementById('country').selectedIndex > 0)
	{
		document.getElementById(id+"_1").className="active";
		
	}
	
}

