/*window.addEvent('domready', function(){
	if (window.ie6) { // fix navigation li:hover for ie	
		$('navigation').getElements('li').each(function(item, index) {
			item.addEvent('mouseenter', function() {
				item.addClass('hover');
			});
			item.setStyles({
					'width': "55px"
			});	
			
			item.addEvent('mouseleave', function() {
				item.removeClass('hover');
			});	
			$('nothing').style.width="23px"
			$('nothingend').style.width="8px" //8px seems to be the max		
			$('footer_links').style.marginLeft="20px";
		});
	}
});
*/
window.addEvent('domready', function(){
	$$('a.external-link').each(function(item, index) {
	if ($defined(item.href) && item.href.length > 0) {
		item.addEvent('click', function(e) {
			e = new Event(e).stop();
			window.open(item.href, '_blank');
			return false;
		});
	}
	});
});




Element.extend({
	fix: function(){
		//if(!window.ie6)
		//	return this;
		var img;
		if(this.getTag()=='img'){
			img = "'"+this.getProperty('src')+"'";
			this.setProperty('src', '/resource/img/blank.gif');
		}else{
			var bg = this.getStyle('background-image');
			//var bgPos = this.getStyle('background-position');
			//alert(bg);
			if(bg && bg!='none')
				img = bg.match(/\(([^)]+)\)/)[1];
				
		}
		if(img){

			if(this.getStyle('display')=='inline' && !['input', 'textarea', 'button'].contains(this.getTag()))
				this.setStyles({
					'display': 'block',
					'width': this.getStyle('width')
				});
			this.setStyles({
				'background-image': '',
				//'background-position': bgPos,
				'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', src="+img+", sizingMethod='scale')"
			});
		}		
		return this;
	}
});


startList = function() {
    if (document.all&&document.getElementById) {
      cssdropdownRoot = document.getElementById("top_menu");
      for (x=0; x<cssdropdownRoot.childNodes.length; x++) {
        node = cssdropdownRoot.childNodes[x];        
        if (node.nodeName=="LI") {
          node.onmouseover=function() {
            this.className += " over";         
            //document.getElementById("search").style.display = "none";   
          }
          node.onmouseout=function() {
            this.className=this.className.replace(" over", "");
          }
        }
      }
    }
    
}

if (window.attachEvent)
window.attachEvent("onload", startList);
else
window.onload=startList;
 
 
