function quickSearchSwitch(){
	if($('quickSearch_Website').style.fontWeight == 'bold'){
		$('quickSearch_Website').style.fontWeight = 'normal';
		$('quickSearch_Internet').style.fontWeight = 'bold';
	} else {
		$('quickSearch_Website').style.fontWeight = 'bold';
		$('quickSearch_Internet').style.fontWeight = 'normal';
	}
}

window.onscroll = function (e) {
  sizeNpos();
}
window.onresize = function (e) {
  sizeNpos();
}

function sizeNpos(){
	if($('imageOverlay').getStyle("display") != 'none'){
		var windowScroll = WindowUtilities.getWindowScroll();    
		$('blankOverlay').setStyle({top: windowScroll.top + 'px'});
		$('blankOverlay').setStyle({left: windowScroll.left + 'px'});
		
		$('imageOverlay').setStyle({top: Math.round(windowScroll.height/2) - Math.round((($('imageOverlay').getStyle("height")).split("px").shift())/2) + windowScroll.top + 'px'});
		$('imageOverlay').setStyle({left: Math.round(windowScroll.width/2) - Math.round((($('imageOverlay').getStyle("width")).split("px").shift())/2) + windowScroll.left + 'px'});
	}
}

var imageSrc;

function openImage(title,author,description,src,width,height){
  imageSrc = src;
  
  $('imgTitle').innerHTML = title;
  $('imgAuthor').innerHTML = author;
  $('imgDescription').innerHTML = description;
  $('imgDescription').setStyle({width: width+'px'});
  
  $('imageLoader').setStyle({width: width+'px'});
  $('imageLoader').setStyle({height: height+'px'});
  
  $('blankOverlay').setStyle({display: ''});
  $('imageOverlay').setStyle({display: ''});
  sizeNpos();
  setTimeout("loadImage()",100);
}

function closeImage(){
  $('blankOverlay').setStyle({display: 'none'});
  $('imageOverlay').setStyle({display: 'none'});
  $('imageLoader').src = '';
}

function loadImage(){
  $('imageLoader').src = imageSrc;
  sizeNpos();
}