function searchFocus(){
    document.getElementById("search").value='';
}

function searchBlur(){
    var srch = document.getElementById("search").value;
    if(srch.value=='')srch.value='Search';
}

var header='<table cellpadding="0" cellspacing="0" id="headerWrap"><tr><td>'+
'<div id="header">'+
	'<form id="frmSearch" action="http://www.naias.com/search-results.aspx" method="post">'+
		'<a href="http://www.naias.com/home.aspx"><img src="http://www.naias.com/media/4683/logolink.gif" id="logo" alt="North American International Auto Show" /></a>'+
		'<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4ac22136171ad467"><img src="http://www.naias.com/media/55549/addthis.jpg" width="50" height="15" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4ac22136171ad467"></script>'+

	    	'<div id="headerLinks">'+
			'<a href="http://www.naias.com/media/naias-information.aspx" id="mediaAccess">Media Access</a><a href="http://www.naias.com/exhibitor-access.aspx" id="exhibitorAccess">Exhibitor Access</a><a href="http://www.naias.com/sponsor-access.aspx" id="sponsorAccess">Sponsor Access</a><a href="http://www.naias.com/show-radio.aspx" id="showRadio">Show Radio</a>'+
			'<input type="text" name="search" id="search" value="Search" onfocus="searchFocus()" onblur="searchBlur()" />'+
			'<input type="image" src="http://www.naias.com/media/13539/searchbtn.gif" id="searchBtn" />'+
		'</div>'+
	'</form>'+
'</div>'+
'</td></tr></table>';

var strHref = window.location.href;

if(strHref.indexOf("naias.mediaroom") > 0){
	header = header + '<link rel="stylesheet" href="http://www.naias.com/css/mediaroomfix.css" type="text/css" />';
}

document.write(header);

var onColor = "#bd0000";
if(strHref.indexOf("/media/") > 0){ document.getElementById("mediaAccess").style.color=onColor; }
if(strHref.indexOf("/exhibitor-access") > 0){ document.getElementById("exhibitorAccess").style.color=onColor; }
if(strHref.indexOf("/sponsor-access") > 0){ document.getElementById("sponsorAccess").style.color=onColor; }
if(strHref.indexOf("/show-radio") > 0){ document.getElementById("showRadio").style.color=onColor; }
