function init(){
	//call open in new window script
	dynamiclink();
	
	var linkPrefix = ""
	for(i=0; i<dirLevel; i++){
		linkPrefix +="../";
	}
	var imageLink = linkPrefix +"images/blank.gif";
	//Main Menu items:
	menus[0] = new menu(22, "horizontal", "20%", 105, 0, 0, "", "#FFFFFF", "Arial, Verdana,Helvetica", 9, 
		"bold", "bold", "#FFFFFF", "#003798", 0, "#DC241F", 2, "", false, true, true, true, 12, false, 0, 0, "#FFFFFF");
	menus[0].addItem(linkPrefix+"buyThyroShield.htm", 126, "left", "&nbsp;Buy ThyroShield", 0);
	menus[0].addItem("#", 180, "left", "&nbsp;What is ThyroShield?", 1);
	menus[0].addItem("#", 150, "left", "&nbsp;The Nuclear Threat", 2);
	menus[0].addItem("#", 150, "left", "&nbsp;Resources", 3);

//Sub Menu What is ThyroShield Oral Solution?
	menus[1] = new menu(260, "vertical", 0, 0, -5, -5, "#FFFFFF", "#DC241F", "Arial, Verdana,Helvetica", 9, "bold", 
		"bold", "#003798", "#FFFFFF", 1, "#CCCCCC", 2, 62, false, true, false, true, 6, true, 4, 4, "#000066");
	menus[1].addItem(linkPrefix+"WhatIs/WhyFamiliesNeed.htm", 22, "left", "&nbsp;Why Families Need ThyroShield", 0);
	menus[1].addItem(linkPrefix+"WhatIs/HowToUse.htm", 22, "left", "&nbsp;How to Use ThyroShield", 0);
	menus[1].addItem(linkPrefix+"WhatIs/Advantages.htm", 22, "left", "&nbsp;Advantages of Liquid vs. Tablets", 0);
	menus[1].addItem(linkPrefix+"WhatIs/faq.htm", 22, "left", "&nbsp;Questions and Answers about ThyroShield", 0);
//Sub Menu The Nuclear Threat
	menus[2] = new menu(210, "vertical", 0, 0, 0, 0, "#FFFFFF", "#DC241F", "Arial, Verdana,Helvetica", 9, "bold", 
		"bold", "#003798", "#FFFFFF", 1, "#CCCCCC", 2, "rollover:"+imageLink+":"+imageLink, false, true, false, false, 0, true, 4, 4, "000066");
	menus[2].addItem(linkPrefix+"NuclearThreat/Understanding.htm", 22, "left", "&nbsp;Understanding the Nuclear Threat", 0);
	menus[2].addItem(linkPrefix+"NuclearThreat/TheRole.htm", 22, "left", "&nbsp;The Role ThyroShield Plays", 0);
//Sub Menu Literature Resources
	menus[3] = new menu(280, "vertical", 0, 0, 0, 0, "#FFFFFF", "#DC241F", "Arial, Verdana,Helvetica", 9, "bold", 
		"bold", "#003798", "#FFFFFF", 1, "#CCCCCC", 2, "rollover:"+imageLink+":"+imageLink, false, true, false, false, 0, true, 4, 4, "000066");
	menus[3].addItem(linkPrefix+"Literature/PatientInsert.htm", 22, "left", "&nbsp;ThyroShield Consumer Package Insert", 0);
	menus[3].addItem(linkPrefix+"Literature/PressRelease.htm", 22, "left", "&nbsp;ThyroShield Press Release", 0);
	menus[3].addItem(linkPrefix+"Literature/Recommendations.htm", 22, "left", "&nbsp;Government & Medical Community Resources", 0);
}

var excludedomains=["staniam.com", "thyroshield.com", "f080inf"] //, "flemingcompany.com"

var excludedomains=excludedomains.join("|")
rexcludedomains=new RegExp(excludedomains, "i")


function dynamiclink(){
	for (i=0; i<=(document.links.length-1); i++) {
		if (document.links[i].hostname.search(rexcludedomains)==-1&&document.links[i].href.indexOf("http:")!=-1&&document.links[i].href.indexOf("thyroshield")==-1)
			document.links[i].href = "javascript:newSite('"+document.links[i].href+"')";
	}
}
function newSite(URL){
	var msg = 	"The browser window that is about to open is not associated with Fleming & Company, Pharmaceuticals.  Links to other sites are provided as a convenience to you.  By clicking on OK below, you agree that  Fleming & Company shall have no responsibility for the content of linked sites."
	if ((URL.search("flemingcompany.com")!=-1) || (URL.search("thyroshield.com")!=-1)){
		openWindow(URL);		
	} else if(confirm(msg)){
		openWindow(URL);
	}
}

function openWindow(URL){
	var subWindow = window.open(URL, "newwindow", "width=600, height=400, resizable, directories, menubar, scrollbars, toolbar");	
	subWindow.focus();
}
