function addToFavorites() {
	var bookmarkurl=document.location;
	var bookmarktitle=document.title;

	if (document.all)	window.external.AddFavorite(bookmarkurl, bookmarktitle)

	if (navigator.appName == "Netscape"){
		if (confirm("Press CTRL+D to bookmark this page\nor press OK now to add this page\nto your Side Bar"))	{
			if (window.sidebar&&window.sidebar.addPanel)	window.sidebar.addPanel("Codeine Information","http://codeinepub.tripod.com/misc/sidebar.html","");
			else alert("You need NS 6 to use\nthis particular feature.")
		}
	}
}

function printDoc() {
	if (!window.print){
		alert("To use Print function, you need to use\nNetscape 4, Internet Explorer 5,\nor newer versions of these browsers.\n\nYou can still use the 'Print' option\nin your browser's menu.");
		return
	}
	window.print();
}

function siteSearch() {
		var exp;
		var config='toolbar=no,location=no,directories=no,status=no,menubar=no,width=350,height=150';

		exp = window.open("", "exp", config);

		exp.document.write('<HTML>');

		exp.document.write('<HEAD>');
		exp.document.write('<TITLE>Site Search</TITLE>');
		exp.document.write('<LINK REL="stylesheet" TITLE="Default Style Sheet" HREF="/styles/black.css" TYPE="text/css">');
		exp.document.write('</HEAD>');

		exp.document.write('<BODY>');
		exp.document.write('<!-- Begin siteLevel HTML Searchbox Code -->');
		exp.document.write('<form target="_blank" method="GET" action="http://sitelevel.whatUseek.com/query.go" name="searchbox">');
		exp.document.write('<table cellpadding="0" cellspacing="0" border="0"><tr><td align="left"><nobr><b>Search</b> </nobr></td><td><img SRC="http://i.whatuseek.com/mysearch/i/arrow_black.gif" valign="middle" hspace="5" width="7" height="7"></td><td><input name="query" size="14" maxlength="800"></td><td><input type="image" src="http://i.whatuseek.com/mysearch/i/ls-go.gif" border="0" hspace="4" alt="Go!" name="submit" width="35" height="18"></td><td><div align="left"><select name=slice_title><option selected>This Site</option><option>Products</option></select><input type=hidden name=crid value=3f295c9075af2f3d></form></td></tr>');
		exp.document.write('<tr><td colspan="5" height="20"></td></tr>');
		exp.document.write('<!-- End siteLevel HTML Searchbox Code -->');
		exp.document.write('<tr><td><B>This Site</B></td><td width="20"></td><td colspan="3">Search the whole <B>Codeine Information</B></td></tr>');
		exp.document.write('<tr><td><B>Products</B></td><td width="20"></td><td colspan="3">Search pharmaceuticals</td></tr>');
		exp.document.write('</table></BODY>');
}


function loadDocument() {
	window.location=document.naviBar.List.options[document.naviBar.List.selectedIndex].value
}

function insertNaviBar(text) {
	locationText = text.replace(/(\s>\s)/, ' <img src="/images/bullets/arrow_right_green.gif"> ');
	locationText = locationText.replace(/(\s>\s)/, ' <img src="/images/bullets/arrow_right_green.gif"> ');
	
	document.write('<table class="transp" width="100%"><tr>');

	document.write('<td valign="top" align="left">');

	document.write('<img src="http://sm6.sitemeter.com/meter.asp?site=sm6codeinepub" alt="" border=0 width="0" height="0">');

	document.write('<form class="naviMenu" name="naviBar" action="javascript:loadDocument();">');
	document.write('<select class="naviMenu" name="List" onChange="loadDocument();">');
	document.write('<option value="#">- Select Document -</option>');
	document.write('<option value="/home.html">Home</option>');
	document.write('<option value="/misc/about.html">About this Website</option>');
	document.write('<option value="#">-------------------------</option>');
	document.write('<option value="/info/facts.html">Facts</option>');
	document.write('<option value="/info/extraction.html">Extractions and Reactions</option>');
	document.write('<option value="/info/sideeffects.html">Dealing with Side Effects</option>');
	document.write('<option value="/info/addiction.html">Dependency & Tolerance</option>');
	document.write('<option value="#">-------------------------</option>');
	document.write('<option value="/info/articles.html">Articles</option>');
	document.write('<option value="/msds/msds.html">Toxicology</option>');
	document.write('<option value="/products/products.html">Pharmaceuticals</option>');
	document.write('<option value="/other/other.html">Other Drugs</option>');
	document.write('<option value="#">-------------------------</option>');
	document.write('<option value="/misc/extras.html">Extras</option>');
	document.write('<option value="http://codeinepub.mail.everyone.net">CodeineMail</option>');
	document.write('<option value="/misc/chat.html">CodeineChat</option>');
	document.write('<option value="#">-------------------------</option>');
       	document.write('<option value="http://www.aimoo.com/forum/freeboard.cfm?id=411200">Forum</option>');
        document.write('<option value="/misc/feedback.html">Contact</option>');
	document.write('<option value="/misc/weblinks.html">Links</option>');
	document.write('<option value="/misc/sitemap.html">Site Map</option>');
	document.write('</select>');
	document.write('</form>');
	document.write('</td>');

	document.write('<td align="right">');
	document.write('<A CLASS="menuL" HREF="javascript:addToFavorites();">Bookmark</A> <FONT CLASS="invisible"> | </FONT> <A CLASS="menuL" HREF="javascript:printDoc()">Print</A> <FONT CLASS="invisible"> | </FONT> <A CLASS="menuL" HREF="mailto:?SUBJECT=' + document.title + '&BODY=Hi! Go see this site: [' + escape(location.href) + '] It\'s the best source of information on codeine, dhc, oxy, and hydrocodone on the net!">Tell a friend</A> <FONT CLASS="invisible"> | </FONT> <A CLASS="menuL" HREF="http://codeinepub.mail.everyone.net">Check Mail</A> <FONT CLASS="invisible"> | </FONT><A CLASS="menuL" HREF="http://groups.google.com/groups?q=alt.drugs&hl=en" target="_blank">Forum</A> <FONT CLASS="invisible"> | </FONT> <A CLASS="menuL" HREF="/misc/feedback.html">Contact</A> <FONT CLASS="invisible"> | </FONT> <A CLASS="menuL" HREF="/misc/sitemap.html" TARGET="_new">Map</A> <FONT CLASS="invisible"> | </FONT> <A CLASS="menuL" HREF="javascript:siteSearch();">Search</A>');
	document.write('</td>');

	document.write('<td valign="top" align="right">');
	document.write('<form NAME="urlform" ACTION="http://fets3.freetranslation.com:5081/" METHOD="get">');
	document.write('<input type="hidden" name="Sequence" value="core">');
	document.write('<select CLASS="naviMenu" NAME="Language" onChange="this.form.submit();">');
	document.write('<option SELECTED VALUE="None">English</option>');
	document.write('<option VALUE="English/Spanish">Español</option>');
	document.write('<option VALUE="English/French">Français</option>');
	document.write('<option VALUE="English/German">Deutsch</option>');
	document.write('<option VALUE="English/Italian">Italiano</option>');
	document.write('<option VALUE="English/Norwegian">Norsk</option>');
	document.write('<option VALUE="English/Portuguese">Português</option>');
	document.write('</select>');
	document.write('<input TYPE="hidden" NAME="Url" VALUE="' + document.location + '">');
	document.write('</form>');
	document.write('</td>');
	
	document.writeln('</tr>');
	document.writeln('<tr>');

	document.write('<td valign="top" align="left" colspan="2">');
	document.write(locationText);
	document.write('</td>');

	document.write('<td valign="top" align="right">');
//	document.write('<a href="http://codeinepub.mail.everyone.net"><img src="/images/icons/mailbox.gif" alt="Check Email"></a>');
//	document.write('<FONT CLASS="invisible"> | </FONT><a href="/misc/feedback.html"><img src="/images/icons/compose.gif" alt="Contact Bongoman"></a>');
//	document.write('<FONT CLASS="invisible"> | </FONT><a href="/misc/sitemap.html"><img src="/images/icons/info.gif" alt="Site Map"></a>');
	document.write('</td>');

	document.writeln('</tr></table>');
}
