//make all external links open in a new window, should be called at the end of the page
function extLinksPop() 
{
	var hostname = window.location.hostname;
	hostname = hostname.replace("www.","").toLowerCase();
	var a = document.getElementsByTagName("a");	
	this.check = function(obj){
		var href = obj.href.toLowerCase();
		return (href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? true : false;				
	}
	this.set = function(obj){
		obj.target = "_blank";
		obj.className = "external";
	}	
	for (var i=0;i<a.length;i++)
		if(check(a[i])) set(a[i]);		
}

function embed(filename, width, height)
{
  document.write('<embed src="' + filename + '" height="' + height+ '" width="' +width + '" content-type="application/x-shockwave-flash">');
}
