
// Pop-up window javascript:

function popup(url,win,w,h){
	if (!win) win = 'popup';
	if (!w) w = '750';
	if (!h) h = '550';	
	var opts = 'height=' + h + ',width=' + w;
	window.open(url,win,opts);
	return false;
}


/* ===============================================

Javascript to open external links in a new window
while bypassing the use of the "target" attribute.
for more info: http://www.sitepoint.com/print/1041

=============================================== */
function externalLinks(){
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
			anchor.target = "_blank";
        }
    }
}

/* Load the page and initialize the scripts */
function loadScripts(){
	externalLinks;
}
if ((document.getElementById || document.all) && document.images){
	window.onload = externalLinks;
}


