/*rollover*/
function initRollOverImages(){
	var image_cache = new Object();//preload images
	$("img.btn").each(function(i){
	var imgsrc = this.src;
	var dot = this.src.lastIndexOf('.');
	var imgsrc_on = this.src.substr(0, dot) + '_ov' + this.src.substr(dot, 4);
	image_cache[this.src] = new Image();
	image_cache[this.src].src = imgsrc_on;
	$(this).hover(
		function(){ this.src = imgsrc_on; },
		function(){ this.src = imgsrc; });
	});
}
$(document).ready(initRollOverImages);




/*external link*/
function initOpenNewWindow(){
	var popupEvent = function(event){
		window.open(this.href);
		event.preventDefault();
		event.stopPropagation();
	}
	$("a.externalLink").each(function(i) {
		$(this).click(popupEvent);
		$(this).keypress(popupEvent);
	});
}
$(document).ready(initOpenNewWindow);




/*popup*/
function getFullscreen(thePage){
	var theWidth = screen.availWidth;
	var theHeight = screen.availHeight;
	window.open(thePage,"test01","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes,left=0,top=0,width="+theWidth+",height="+theHeight);
}
