// CHANGE LOG //
// 20100923 15:38 JS: Rewrote conditional logic in banner function to determine default width/height of banner
// 20100923 15:38 JS: Adjusted default banner tr height from a static value of 80 to picheight

document.write('		<script language="javascript" src="/js-css/milonic_src.js" type="text\/javascript"><\/script>');
document.write('			<script language="javascript" src="/js-css/mmenudom.js" type="text/javascript"><\/script>');
//			if(ns4) _d.write("<scr"+"ipt language=\"javascript\" src=\"js-css/mmenuns4.js\" type=\"text/javascript\"><\/scr"+"ipt>");
//			else _d.write("<scr"+"ipt language=\"javascript\" src=\"js-css/mmenudom.js\" type=\"text/javascript\"><\/scr"+"ipt>");

function header()
{//alert("execute header");
	document.write('<map name="Map" id="Map"><area shape="rect" coords="177,1,318,23" href="http://www.worldpac.ca/" alt="WORLDPAC Canada" title="WORLDPAC Canada" />')
	document.write('<area shape="rect" coords="20,0,165,23" href="http://www.redlineweber.com/" alt="WORLDPAC - REDLINE Division" title="WORLDPAC - REDLINE Division" />')
	document.write('</map>')
				   
	document.write('<table border="0" cellspacing="0" cellpadding="0" width="734">');
	document.write('	  <tr>');
	document.write('		<td valign="bottom" align="left"><a href="/index.html"><img src="/images/logo_hp.gif" alt="WORLDPAC, Inc." title="WORLDPAC, Inc." width="388" height="43" hspace="0" vspace="0" border="0" /></a></td>');
//	document.write('		<td align="right" valign="bottom" class="upper_right_links" style="margin-bottom:10px"><a href="/fr/index.html"><img src="/images/canada.gif" alt="WORLDPAC Canada (Fran&ccedil;ais)" title="WORLDPAC Canada (Fran&ccedil;ais)" width="249" height="24" vspace="4" border="0" /><a/><br />');
	document.write('		<td align="right" valign="bottom" class="upper_right_links" style="margin-bottom:10px"><img src="/images/canada.gif" usemap="#Map" width="319" height="24" vspace="4" border="0" /><br />');
	document.write('		  <span class="upper_right_links"><a href="/news.html">News&nbsp;&amp;&nbsp;Events</a> | <a href="/promotions.html">Promotions</a> | <a href="/careers/">Careers</a> | <a href="/contactus.html">Contact Us</a></span>');
	document.write('		  </td>');
	document.write('	  </tr>');
	document.write('	  <tr>');
	document.write('	  <td colspan="2" height="10">');
	document.write('	  </td>');
	document.write('	  </tr>');

	document.write('   <tr>');
	document.write('     <td  colspan="2"><div id="head"> ');
	document.write('           <!--BANNER START-->');
	document.write('           <table id="nav1">');
	document.write(' 			<tr valign="middle">');
	document.write(' 				<td width="221" id="searchCell">');
	document.write(' 				<!--search start -->');
	document.write(' 					<form method="get" action="http://worldpac.com/search/search.pl" name="sform">	');	
//	document.write(' 					<form action="alert(\'Search unavailable at this time.\');" method="post" id="searchForm" name="searchForm" onsubmit="JavaScript:submitSearch();">	');	
	document.write(' 							<table>');
	document.write(' 								<tr>');
	document.write(' 									<td>');
    document.writeln('<input name="Terms" id="fdse_TermsEx" />');
//  document.writeln('<input title="search" type="text" value="" class="globalInput" id="homeSearch" name="homeSearch" size="15" />');
	document.writeln('<input title="search" type="hidden" id="searchinput" name="searchinput" />');
	document.write(' 										<noscript>');
	document.write(' 											<input title="search" type="text" id="searchinput" name="searchinput"/>');
	document.write(' 										</noscript>				</td>');
	document.write(' 									<td>&nbsp;&nbsp;&nbsp;');
	document.writeln ('<a href="javascript:document.sform.submit()">SEARCH</a>');
	document.write(' 										<noscript>');
	document.write(' 											<input type="submit" value="Search"/>');
	document.write(' 										</noscript>				</td>');
	document.write(' 								</tr>');
	document.write(' 							</table>');
	document.write(' 					</form>');
	document.write(' 			  <!--search end -->			  </td>');
	document.write('				<td width="527" align="left">');

}

function dropdown_menu(){
	document.write('				   <script src="/js-css/hp_menu_data.js" type="text/javascript"></script>');
}

function banner(bnr_image, title, picwidth, picheight){
	picheight = picheight ? picheight : "400";
	picwidth = picwidth ? picwidth : "40";
//	if (picwidth == null && picheight == null) {picwidth="400"; picheight="40"} 

	document.write(' 			</tr>');
	document.write(' </table> ');
	document.write(' 	</div></td>');
	document.write('   </tr>');
	document.write('</table>');
	document.write('<table cellpadding="0" cellspacing="0" id="layout" border="0">');
/*	document.write('	<tr valign="top">');
	document.write('	<td>&nbsp;</td>');
	document.write('	</tr>');
*/	document.write('	<tr valign="top">');
	document.write('	  <td>');
	document.write('<table cellpadding="0" cellspacing="0" id="layout" border="0">');
/*	document.write('	<tr valign="top">');
	document.write('	<td>&nbsp;</td>');
	document.write('	</tr>');
*/	document.write('	<tr valign="top">');
	document.write('	  <td><table width="734" border="0" cellpadding="0" cellspacing="0">');
/*	document.write('        <tr>');
	document.write('          <td width="205" align="top">&nbsp;</td>');
	document.write('          <td colspan="3" valign="top">&nbsp;</td>');
	document.write('        </tr>');
*/	document.write('        <tr height="'+picheight+'">');
/*	document.write('          <td width="205" valign="top">&nbsp;</td>');
	document.write('          <td colspan="3" valign="top"><p>&nbsp;</p>');
*/	document.write('          <td colspan="4" valign="top">');
	document.write('            <img src="' + bnr_image + '" alt="' + title + '" title="' + title + '" width="' + picwidth + '" height="' + picheight + '" name="bannerPic" /></td>');
//	document.write('        <hr size="1" noshade="noshade" />');
	document.write('        </tr>');
	document.write('      </table>');
}

function footer() {
	document.write('</td>');
	document.write('	</tr>');
	document.write('	<tr valign="top">');
	document.write('	<td>');
	document.write('	<div id="foot">');
	document.write('		<p align="right" id="copy">&copy; <span id="copyright-year">2012</span> WORLDPAC, Inc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/privacy.html">Privacy Policy</a> | <a href="/t_c.html">Terms &amp; Conditions</a> | <a href="/contactus.html">Contact Us</a> </p>');
	document.write('	</div>	</td>');
	document.write('	</tr>');
	document.write('</table>');
	// update the copyright year to the current year.
	var today = new Date();
	var year = today.getFullYear();
	var copyrightYearElem = document.getElementById('copyright-year');
	if ( copyrightYearElem ) copyrightYearElem.innerHTML = year;
}

