function o_wrap(){
var url = document.URL;	
var home = "on";
var obits = "off";
var business = "off";
var sports = "off";
var world = "off";
var entertainment = "off";

if (url.match("Obituaries"))
{
	obits = "on";
	home = "off";
}
else if (url.match("business") || url.match("realestate") || url.match("publicrecords"))
{
	business = "on";
	home = "off";
}
else if (url.match("golf"))
{
	sports = "on";
	home = "off";
}
else if (url.match("world"))
{
	world = "on";
	home = "off";
}
else if (url.match("nightlife"))
{
	entertainment = "on";
	home = "off";
}
	
	
var str='';
str+='<noscript><div class="accent" style="align:center; margin:5px">Your browser either has JavaScript disabled, or does not support it.<\/div><\/noscript>';
str+='<!--Header-->';
str+='<div id="head_wrapper">';
str+='<div class="pub_address">The Herald-Dispatch | 946 5th Ave, Huntington WV., 25701<\/div>';
str+='<form action="http:\/\/crow.herald-dispatch.com\/Z4M\/site_search.php" method="post">';
str+='<div><input type="hidden" name="loc" value="Huntington, WV" \/>';
str+='<input type="hidden" name="domain" value="herald-dispatch.com" \/>';
str+='<input type="hidden" name="id" value="herald-disaptch" \/><\/div>';
str+='<div id="search_small">';
str+='		<div class="top_row">';
str+='		<label><span class="accent">search<\/span> <span>herald-dispatch.com<\/span> ';
str+='		<img alt=""';
str+='       src="http:\/\/static.hd.zope.net\/icons\/icon_search.png" \/>';
str+='		<\/label>';
str+='		<input type="text" name="kwor" onclick="javascript:ShowHide(\'search_exp\');" \/>';
str+='		<input name="submit" value="Search" alt="" type="image"';
str+='         src="http:\/\/static.hd.zope.net\/icons\/icon_goButton.png" \/>';
str+='		<\/div><!--close class top_row-->';
str+='	<div id="search_exp" style="display:none">';
str+='		<div class="top"><\/div>';
str+='		<div class="center">';
str+='			<h3 style="border-bottom:1px solid #e2e2e2">Advanced Search Options<\/h3>';
str+='			<div class="adv_opt">';
str+='				<input name="engine" type="radio" value="ext" style="float:left;" \/>';
str+='				<img alt="" style="float:left; padding:0 5px"';
str+='         src="http:\/\/static.hd.zope.net\/logos\/tl_logo.jpg" \/>';
str+='				<div class="accent">Yellow Pages<\/div>';
str+='				<label>Find whatever you\'re looking for with the Totally Local Yellow Pages. Search provided by <a href="http:\/\/corp.premierguide.com">Premiere Guide<\/a><\/label>';
str+='			<\/div>';
str+='			<div class="adv_opt">';
str+='				<input name="engine" type="radio" checked="checked" style="float:left" value="int" \/>';
str+='				<img alt="" style="float:left; padding:0 5px"';
str+='         src="http:\/\/static.hd.zope.net\/logos\/rfd_icon.jpg" \/>';
str+='				<div class="accent">herald-dispatch.com | The Herald-Dispatch<\/div>';
str+='				<label>Search <span>herald-dispatch.com<\/span> for stories, multimedia, obituaries, and archived content<\/label>';
str+='			<\/div>';
str+='			<div style="margin:0 2px 0px 0; text-align:right"><a href="javascript:ShowHide(\'search_exp\');"><img';
str+='    alt=""';
str+='    src="http:\/\/static.hd.zope.net\/icons\/icon_close.gif" \/><\/a><\/div>';
str+='		<\/div><!--close div center-->';
str+='		<div class="bottom"><\/div>';
str+='	<\/div><!--close ID search_exp-->';
str+='<\/div><!--close ID search_small-->';
str+='<\/form>';

str+='<\/div><!--close head_wrapper-->';
str+='<div id="nav"><!--begin header navigation-->';
str+='<ul>';
str+='	<li class="'+home+'" style="margin-left:0"><a href="http:\/\/www.herald-dispatch.com">Home<\/a><\/li>';
str+='	<li class="off"><a href="http:\/\/www.herald-dispatch.com\/news">News<\/a><\/li>';
str+='	<li class="'+sports+'"><a href="http:\/\/www.herald-dispatch.com\/sports">Sports<\/a><\/li>';
str+='	<li class="'+business+'"><a href="http:\/\/www.herald-dispatch.com\/business">Business<\/a><\/li>';
str+='	<li class="'+entertainment+'"><a href="http:\/\/www.herald-dispatch.com\/entertainment">Entertainment<\/a><\/li>';
str+='	<li class="'+world+'"><a href="http:\/\/www.herald-dispatch.com\/life">Life<\/a><\/li>';
str+='	<li class="off"><a href="http:\/\/www.herald-dispatch.com\/opinions">Opinions<\/a><\/li>';
str+='	<li class="'+obits+'"><a href="http:\/\/media.herald-dispatch.com\/obituaries\/index.php">Obituaries<\/a><\/li>';
str+='	<li class="off" style="margin-left:2px"><a';
str+='    href="http:\/\/www.herald-dispatch.com\/multimedia">Multimedia<\/a><\/li>';
str+='<\/ul>';
str+='<\/div><!--close header navigation-->';
str+='	<div class="header_subnav">';
str+='	';
str+='<div class="header_subnav_date" style="text-align:right"><script type="text\/javascript">writeToday();<\/script><\/div>';
str+='			';
str+='	<\/div><!--close header_subnav-->';


//vertical standalone sub-nav added//
str+='<div id="verts">';
str+='	<ul>';
str+='		<li class="first">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_weather.png" \/><a href="http:\/\/media.herald-dispatch.com\/weather\/index.html">Weather<\/a>';
str+='		<\/li>';
		<!-- close define object-->

str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_calendar.png" \/><a href="http:\/\/crow.herald-dispatch.com\/Calendar\/search.php?id=1">Calendar<\/a>';
str+='		<\/li>';
		<!-- close define object-->
		
str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net/icons/icon_jobs.png" \/><a href="http:\/\/media.herald-dispatch.com\/hotjobs\/index.html">Jobs<\/a>';
str+='		<\/li>';
		<!-- close define object-->

str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_cars.png" \/><a href="http:\/\/www.cars.com\/herdisp">Cars.com<\/a>';
str+='		<\/li>';
		<!-- close define object-->
		
str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_realestate.png" \/><a href="http:\/\/hdhomes.2.homescape.com\/SCS\/index_advanced.jsp">Real Estate<\/a>';
str+='		<\/li>';
		<!-- close define object-->
		
	
str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_class.png" \/><a href="http:\/\/www.hdclassifieds.com\/">Classifieds<\/a>';
str+='		<\/li>';
		<!-- close define object-->
		
str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_placead.png" \/><a href="https:\/\/adw.herald-dispatch.com\/AdWebster\/placead.jsp">Place an Ad<\/a>';
str+='		<\/li>';
		<!-- close define object-->
		
str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_contactus.png" \/><a href="http:\/\/media.herald-dispatch.com\/forms\/Services\/index_customercare.html">Services<\/a>';
str+='		<\/li>';
		<!-- close define object-->
		
str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/icon_paper.png" \/><a href="http:\/\/media.herald-dispatch.com\/forms\/hdinfo\/subscribehere.html">Subscribe<\/a>';
str+='		<\/li>';
		<!-- close define object-->

str+='		<li class="False">';
str+='		<img alt="" src="http:\/\/static.hd.zope.net\/icons\/YP_fingers.png" \/><a href="http:\/\/yellowpages.herald-dispatch.com\/">Yellow Pages<\/a>';
str+='		<\/li>';
		<!-- close define object-->
str+='	<\/ul>';	
str+='	<\/div>';
<!--close ID verts-->
	
//vertical standalone sub-nav added//

document.write(str);
}
o_wrap();