function newImage(ID,file) {
	document.getElementById(ID).src='/images/'+file;
}

function open_window(URL,name,left,top,width,height,menubar){
	 rp=window.open(URL,name,"top="+top+",left="+left+",height="+height+",width="+width+",menubar="+menubar+",scrollbars=1,resizable=1,status=1");
	 rp.focus();
	 return(false);
}

function redirectRelative(rURL){
   window.location = rURL;
}

function searchResult(){
    window.location="/DK/copydan/Search.aspx?search="+document.form1.search.value;  
}

window.addEvent('domready', function() {

	/*
	$('globalsearchfield').onkeydown = function(event) {
		var event = new Event(event);
		if (event.key == 'enter') {
			event.stop();
			searchResult();
		}
	};
	*/

	// hover
	$$('.list-boxes h3.title').addEvents({
		'mouseenter': function(){
			/// alert("aa");
			var theParent = this.getParent();
			this.getNext('.info').setStyle('display', 'block');
		},
		'mouseleave': function(){
			var theParent = this.getParent();
			this.getNext('.info').setStyle('display', 'none');
		}
	});

	// hover
	$$('.info').addEvents({
		'mouseenter': function(){
			/// alert("aa");
			this.setStyle('display', 'block');
		},
		'mouseleave': function(){
			var theParent = this.getParent();
			this.setStyle('display', 'none');
		}
	});

});

function OpenTellAFriend(pageURL){
    window.open (pageURL,"mywindow","location=0,status=0,scrollbars=0,width=405,height=240").focus();
}
function attachCSS(file){
	var cssNode = document.createElement('link'); 
	cssNode.setAttribute('rel', 'stylesheet'); 
	cssNode.setAttribute('type', 'text/css'); 
	cssNode.setAttribute('href', file); 
	document.getElementsByTagName('head')[0].appendChild(cssNode); 
}
