// gets the size of the window, with the offset included
var EXTLINKPOPUPSIZE = 425;
var extLinkID = "extLinkPopUp";

function confirm_extlink_popup(url){
	window.open(url);
	hide_extlink_popup();
}

function show_extlink_popup(extLink, disclaimerFile){
	var popup = document.getElementById(extLinkID);
	if (popup == null) {
		var popupNode = document.createElement('div');
		popupNode.setAttribute('id', extLinkID);
//		popupNode.setAttribute('class', 'flash bad');

		document.getElementsByTagName('BODY')[0].appendChild(popupNode);
//		popupNode.style.display = "none";
	}
	base_ajax(extLinkID, disclaimerFile, 'url='+extLink, 'link_tracker_init()');
	popup = document.getElementById(extLinkID); //redefine

	var windowSize = get_window_size();
	var offset = get_window_offset();
	popup.style.zIndex = "10000";
	popup.style.top = ((windowSize.h / 2) - (EXTLINKPOPUPSIZE / 2)) + offset.h + "px"; //windowSize.h + "px";//
	popup.style.left = ((windowSize.w / 2) - (EXTLINKPOPUPSIZE / 2)) + offset.w + "px";
	popup.style.width = EXTLINKPOPUPSIZE + "px";
	
	popup.style.display = "block";
}

function hide_extlink_popup(){
	var popup = document.getElementById(extLinkID);
	popup.style.display = "none";
}

function get_window_size(){
	var w,h;
	
	var offset = get_window_offset();
	
	if (self.innerHeight){// all except Explorer
		w = self.innerWidth;
		h = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight){
		// Explorer 6 Strict Mode
		w = document.documentElement.clientWidth;
		h = document.documentElement.clientHeight;
	}
	else if (document.body){ // other Explorers
		w = document.body.clientWidth;
		h = document.body.clientHeight;
	}
	var ar = new Array();
	ar.w = w;
	ar.h = h;
	
	return ar;
}

// gets the offset of the window
function get_window_offset(){
	var x,y;
	if (self.pageYOffset){ // all except Explorer
		x = self.pageXOffset;
		y = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop){
		// Explorer 6 Strict
		x = document.documentElement.scrollLeft;
		y = document.documentElement.scrollTop;
	}
	else if (document.body){ // all other Explorers
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
	}
	var ar = new Object();
	ar.w = x;
	ar.h = y;
	
	return ar;
}


	
<!-- Begin
function popUp(URL,width,height) {
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	var size = "width=" + width + ", height=" + height +" ,left=" + left + " ,top="+ top;
	insert_window = window.open(URL, 'insert_window', 'toolbar=0,scrollbars=1,statusbar=0,menubar=0,resizable=1,'+size);
//	insert_window = window.open(URL, 'insert_window', 'toolbar=1,scrollbars=1,statusbar=1,menubar=1,resizable=1,'+size);
	insert_window.focus();
	}

function popUpnoScroll(URL,width,height) {
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	var size = "width=" + width + ", height=" + height +" ,left=" + left + " ,top="+ top;
	insert_window = window.open(URL, 'insert_window', 'toolbar=0,scrollbars=0,statusbar=0,menubar=0,resizable=0,'+size);
//	insert_window = window.open(URL, 'insert_window', 'toolbar=1,scrollbars=1,statusbar=1,menubar=1,resizable=1,'+size);
	insert_window.focus();
	}

function popUpexp(URL,width,height) {
	var mheight = height + 150;
	var left = (screen.width - width) / 2;
	var top = (screen.height - mheight) / 2;
	//alert(screen.width + " -> " + screen.height + " -> " + left + " -> " + top );
	var size = "width=" + width + ", height=" + height +" ,left=" + left + " ,top="+ top;
	insert_window = window.open(URL, 'insert_window', 'toolbar=1,scrollbars=1,statusbar=1,menubar=1,resizable=1,location=1,'+size);
//	insert_window = window.open(URL, 'insert_window', 'toolbar=1,scrollbars=1,statusbar=1,menubar=1,resizable=1,'+size);
	insert_window.focus();
	}
// End -->
