
/**
 * Class containing all functions to manage the map of Switzerland of the 
 * homepage. 
 */


function cMap(){

	this.sBrowser = navigator.appName
	this.sPath = "";
	this.sMapName = "map_switzerland";
	this.sPathMapDefault = "images/map/" + this.sMapName + ".jpg";

	if(this.sBrowser == "Microsoft Internet Explorer"){
		this.sBrowser = "IE";
	}
	else {
		this.sBrowser = "NT";
	}

	return;

}

cMap.prototype.DisplayArea = function(sArea){

	var pThis = ocMap;
	pThis.sPath = "images/map/map_" + sArea + ".jpg";

	if(pThis.sBrowser == "IE" && document.all[pThis.sMapName].src != pThis.sPath){
			document.all[pThis.sMapName].src = pThis.sPath;	
	}
	
	else if(document.getElementById(pThis.sMapName).src != pThis.sPath){
			document.getElementById(pThis.sMapName).src = pThis.sPath;
	}


	return;
	
}
			
cMap.prototype.HiddenArea = function(){

	var pThis = ocMap;

	if(pThis.sBrowser == "IE"){
		document.all[pThis.sMapName].src = pThis.sPathMapDefault;
	}
	else {
		document.getElementById(pThis.sMapName).src = pThis.sPathMapDefault;
	}

	return;
	
}

var ocMap = new cMap();



