function OpenInNewWindow(url){

	var external = false;
	var host = this.location.hostname.replace(/www./, '');	
			
		
		//Check if the link is to the current hosted site
		if (url.indexOf(host) != -1)
		{
			//Valid link
			external = false;
		}
		else{
			//Loop through the excluded sites
			for (x = 0; x < excluded.length; x++)
			{
				if (url.indexOf(excluded[x]) != -1){
					//Valid link
					external = false;
					break;
				}
				else{
					external = true;
				}
			}

		}

		if (external){
			//External link, so apply popup
			checkExternalLink(url);
		}

	//Finally, open the window.
	window.open(url,'Sunset','resizable=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,fullscreen=no,dependent=no,width=900,height=600,status');
}