/* HOVERMAP */
function mapa() {
	var ar = [];
   var ma=document.getElementById('map-cz');
   if( ma )
   	ar=ma.getElementsByTagName('area');

   for(var i=0;i<ar.length;i++){
      ar[i].setAttribute('rel',i+1);
      ar[i].onmouseover=function(){
         this.setAttribute('alt',this.getAttribute('title'));
         if(this.getAttribute('rel')<8){
            document.getElementById('map-cz').style.backgroundPosition = "0 -"+(this.getAttribute('rel')*250)+"px";
         }
         else{
            document.getElementById('map-cz').style.backgroundPosition = "-404px -"+((this.getAttribute('rel')-7)*250)+"px";
         }
         
      }
      ar[i].onmouseout=function(){
         document.getElementById('map-cz').style.backgroundPosition="0 0";
         
      }
      ar[i].onfocus=function(){
         this.setAttribute('alt',this.getAttribute('title'));
         if(this.getAttribute('rel')<8){
            document.getElementById('map-cz').style.backgroundPosition = "0 -"+(this.getAttribute('rel')*250)+"px";
         }
         else{
            document.getElementById('map-cz').style.backgroundPosition = "-404px -"+((this.getAttribute('rel')-7)*250)+"px";
         }
         
      }
      ar[i].onblur=function(){
         document.getElementById('map-cz').style.backgroundPosition="0 0";
         
      }       
   }
}

mapa();

function addEvent(obj,evType,fn){
   if(obj.addEventListener){
      obj.addEventListener(evType,fn,true);
      return true;
   }else if(obj.attachEvent){
      var r=obj.attachEvent("on"+evType,fn);
      return r;
   }else{
      return false;
   }
}

addEvent(window,'load',mapa);

