
if(navigator.userAgent.indexOf("Mac") !=-1){ var is_mac=true;}
if(navigator.userAgent.indexOf("MSIE") !=-1){ var is_ie=true;}
if(is_mac && is_ie){ document.write("<link rel='stylesheet' type='text/css' media='all' href='css/mac_ie.css' />"); }

	function initRoleoverAreas(){
    	//get input array on screen
		var hotArticles = document.getElementsByTagName('div');
		var hotspotsMap = document.getElementsByTagName('area');
		// set hover state events
		for (var i=0; i < hotArticles.length; i++) {
			if (hotArticles[i].id == "story1" || hotArticles[i].id == "story2" || hotArticles[i].id == "story3") {
				hotArticles[i].onmouseover = function(){ hotArticlesState(this,'On'); }
				hotArticles[i].onfocus = function(){ hotArticlesState(this,'On'); }
            }
		}
		for (var j=0; j < hotspotsMap.length; j++) {
			hotspotsMap[j].onmouseover = function(){ hotspotsMapState(hotspotsMap, this); }
			hotspotsMap[j].onfocus = function(){ hotspotsMapState(hotspotsMap, this); }
		}
	}
	function hotArticlesState(obj, state){
		for(var i=1; i<4; i++){ document.getElementById("story"+i).className="story"; }
		obj.className = "storyOn";
	}
	function hotspotsMapState(arr,obj){ 
		document.getElementById("selectReg0").style.display="none";
		for(var i=1; i<=arr.length; i++){ 
			document.getElementById("region"+i).style.display="none";
			document.getElementById("selectReg"+i).style.display="none";
		}
		if(obj.className == "west"){ document.getElementById("region1").style.display="block"; document.getElementById("selectReg1").style.display="block"; }
		if(obj.className == "north"){ document.getElementById("region2").style.display="block"; document.getElementById("selectReg2").style.display="block"; }
		if(obj.className == "east"){ document.getElementById("region3").style.display="block"; document.getElementById("selectReg3").style.display="block"; }
		if(obj.className == "south"){ document.getElementById("region4").style.display="block"; document.getElementById("selectReg4").style.display="block"; }
	}
	
	// this function is needed to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }
  
  function stripe() {
    var even = false;
	
    var evenColor = arguments[1] ? arguments[1] : "#F8FBE8";
    var oddColor = arguments[2] ? arguments[2] : "#ffffff";

    var table = document.getElementsByTagName("table");
    if (! table) { return; }
	
	for(var g=0; g<table.length; g++){  //for all tables
   		var tbodies = table[g].getElementsByTagName("tbody"); //get child tags
	    for (var h = 0; h < tbodies.length; h++) {
	    	var trs = tbodies[h].getElementsByTagName("tr");
			for (var i = 0; i < trs.length; i++) {
        		// avoid rows that have a class attribute
        		// or backgroundColor style
        		if (! hasClass(trs[i]) && ! trs[i].style.backgroundColor) {  // get all the cells in this row...
      	    		var tds = trs[i].getElementsByTagName("td");
        	  		for (var j = 0; j < tds.length; j++) {         // and iterate through them...
            			var mytd = tds[j];
            			// avoid cells that have a class attribute
           		 		// or backgroundColor style
            			if (! hasClass(mytd) && ! mytd.style.backgroundColor) {
              				mytd.style.backgroundColor =
                			even ? evenColor : oddColor;
            			}
          			}
        		}
        		// flip from odd to even, or vice-versa
        		even =  ! even;
      		}
    	}
	}
  }	