
var MsnHeader  = {
	
	isHttp: function() {return (document.location.protocol) && (document.location.protocol.toLowerCase() == "http:");},
	
	addStyleSheet: function(stylesheetPath) {
		if(document.createStyleSheet) {
		    document.createStyleSheet(stylesheetPath);
		}
		else {
		    var linkElement = document.createElement("link");
		    linkElement.rel = "stylesheet";
		    linkElement.type = "text/css";
		    linkElement.href = stylesheetPath;
		    document.getElementsByTagName("head")[0].appendChild(linkElement);
		}
	},
	
	init:  function() {
		if(!document.msnStyleSheet) {
			document.msnStyleSheet = new Object();
    
			document.msnStyleSheet.Path = "/includes/msn/msn3/?q=css";
    
			this.addStyleSheet(document.msnStyleSheet.Path);
			this.addStyleSheet("/includes/msn/msn3/headersearch.css");
			var index = navigator.userAgent.indexOf("MSIE");
			if(index >= 0) {
				this.addStyleSheet("/includes/msn/msn3/headersearch_ie.css");
				var version = parseFloat(navigator.userAgent.substring(index + 4));
				if((version < 7) && (version > 5)) {
					this.addStyleSheet("/includes/msn/msn3/headersearch_ie6.css");
				}
			}
		}
	},

    onMsnHdrMoreClick: function(e) {
        var element;
        var header;
        if(e.headerBar === undefined) {
            e.headerBar = this.getMsnHdrBar(e);
            if(e.headerBar) {
                e.headerBar.originalClassName = e.headerBar.className;
            }
        }
        if(e.headerBar) {
            if(!e.headerBar.moreVisible) {
                e.headerBar.moreVisible = true;
                e.headerBar.className += " msnHdrShowMore"
            }
            else {
                e.headerBar.moreVisible = false;
                e.headerBar.className = e.headerBar.originalClassName
           }
        }
        return !(e.headerBar);
    },

    getMsnHdrBar: function(element) {
        var header = null;
        while((element) && (!header)) {
            if(element.className.indexOf("msnHdrBar") >= 0) {
                header = element;
            }
            element = element.parentNode;
        }
        return header;
    }
	
}
MsnHeader.init();

if(MsnHeader.isHttp()) {
	document.write('<script type="text/javascript" src="http://blstj.msn.com/br/gbl/js/2/report.js"></script>');
}
document.write(
    '<div id=\"msnHdr\" style=\"display:none;\">',
    '    <div class=\"msnHdrBar\">',
    '        <form method=\"get\" action=\"http://search.msn.com/results.aspx\"><input type=\"hidden\" name=\"cp\" value=\"1252\" /><input type=\"hidden\" name=\"FORM\" value=\"FOXSP\" /><input type=\"hidden\" name=\"q\" value=\"\" /></form>',
    '        <a class=\"msnHdrLogo\" href=\"http://www.msn.com/\"><strong>msn</strong></a>',
    '        <span class=\"msnHdrLinkSec1\"> <a href=\"http://autos.msn.com/\">autos</a> <a href=\"http://moneycentral.msn.com/\">money</a> <a href=\"http://msn.foxsports.com/\">sports</a> <a href=\"http://tech.msn.com/\">tech</a> <a class=\"msnHdrMoreLink\" onclick=\"return MsnHeader.onMsnHdrMoreClick(this)\" href=\"http://www.msn.com/\"><span>more</span> </a> </span>',
    '        <span class=\"msnHdrSearchSec\">'
);

if(MsnHeader.isHttp()) 
	document.write('<form id=\"KIEVsearch\" action=\"http://www.bing.com/search\" method=\"get\" onsubmit=\"return Msn.Report.TrackForm(this)\">');
else 
	document.write('<form id=\"KIEVsearch\" action=\"http://www.bing.com/search\" method=\"get\">');

document.write(
    '                        <div class=\"KIEVheadersearchbox\">',
    '                            <label accesskey=\"s\" for=\"q\">Live search:</label><input type=\"hidden\" name=\"FORM\" value=\"FOXSP\" /><input type=\"hidden\" name=\"cp\" value=\"1252\" />',
    '                            <div id=\"KIEVleftcorner\"></div>',
    '                            <div id=\"KIEVsearchform\">',
    '                                <div class=\"KIEVsearchinputarea\">',
    '                                    <div class=\"KIEVsearchinput\"><input type=\"text\" id=\"KIEVq\" name=\"q\" class=\"typing\" maxlength=\"215\" title=\"Search for\" /></div>',
    '                                    <div class=\"KIEVsearchsubmit\"><input type=\"image\" id=\"KIEVspyglass\" src=\"/includes/msn/msn3/decoration/searchicon_22x22.gif\" alt=\"Search\" /></div>',
    '                                </div>',
    '                            </div>',
    '                            <div id=\"KIEVntwlogo\"><input type=\"image\" id=\"KIEVlogoimg\" src=\"/includes/msn/msn3/decoration/logo_56x29.png\"alt=\"bing.com\" /></div>',
    '                            <div id=\"KIEVrightcorner\"></div>',
    '                        </div>',
    '                        <div id=\"KIEVntwscopes\"></div>',
    '                </form>',					 
	'		 </span>',
    '        <span class=\"msnHdrLinkSec2\"><a class=\"msnHdrFirstItem\" href=\"http://www.msn.com/\">MSN home</a><a href=\"http://mail.live.com/\">Mail</a><a href=\"http://my.msn.com/\">My MSN</a></span>',
    '        <div class=\"msnHdrMore\">',
    '            <span class=\"msnHdrMoreSec msnTools\"> <a href=\"http://mail.live.com\" title=\"Hotmail\"><strong>Hotmail</strong></a>  <a href=\"http://download.live.com/?sku=messenger\" title=\"Messenger\" ><strong>Messenger</strong></a>  <a href=\"http://my.msn.com\" title=\"My MSN\"><strong>My MSN</strong></a>  <a href=\"http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0403A\" title=\"Download IE8\"><strong>Download IE8</strong></a> </span>',
    '            <span class=\"msnHdrMoreSec\"> <a href="http://www.bing.com/travel/?cid=msn_navigation&amp;FORM=MSNNAV" title="Airfares &amp; Travel">Airfares &amp; Travel</a> <a href="http://autos.msn.com/default.aspx" title="Autos">Autos</a> <a href="http://careers.msn.com" title="Careers &amp; Jobs">Careers &amp; Jobs</a> <a href="http://cityguides.msn.com" title="City Guides">City Guides</a> <a href="http://msn.match.com/index.aspx?TrackingID=516163&amp;BannerID=543351%20" title="Dating &amp; Personals">Dating &amp; Personals</a> </span>',
	'            <span class=\"msnHdrMoreSec\"> <a href="http://msn.delish.com/" title="Food &amp; Entertaining">Food &amp; Entertaining</a>  <a href="http://games.msn.com" title="Games">Games</a>  <a href="http://health.msn.com" title="Health &amp; Fitness">Health &amp; Fitness</a>  <a href="http://astrocenter.astrology.msn.com/msn/DeptHoroscope.aspx?When=0&amp;Af=-1000&amp;VS" title="Horoscopes">Horoscopes</a>  <a href="http://lifestyle.msn.com/default.aspx" title="Lifestyle">Lifestyle</a> </span>',
	'            <span class=\"msnHdrMoreSec\"> <a href="http://www.bing.com/maps/default.aspx?wip=2&amp;v=2&amp;rtp=%7E&amp;FORM=MSNNAV" title="Maps &amp; Directions">Maps &amp; Directions</a>  <a href="http://moneycentral.msn.com/home.asp" title="Money">Money</a>  <a href="http://movies.msn.com/" title="Movies">Movies</a>  <a href="http://music.msn.com" title="Music">Music</a>  <a href="http://www.msnbc.msn.com/" title="News">News</a> </span>',
	'            <span class=\"msnHdrMoreSec\"> <a href="http://realestate.msn.com" title="Real Estate/Rentals">Real Estate/Rentals</a>  <a href="http://www.bing.com/shopping?FORM=SHOPH2" title="Shopping">Shopping</a>  <a href="http://msn.foxsports.com/" title="Sports">Sports</a>  <a href="http://tech.msn.com" title="Tech &amp; Gadgets">Tech &amp; Gadgets</a>  <a href="http://tv.msn.com" title="TV">TV</a></span>',
	'            <span class=\"msnHdrMoreSec\"> <a href="http://weather.msn.com" title="Weather">Weather</a>  <a href="http://msn.whitepages.com/" title="White Pages">White Pages</a>  <a href="http://www.wonderwall.com/" title="Wonderwall">Wonderwall</a>  <a href="http://yellowpages.msn.com" title="Yellow Pages">Yellow Pages</a>  <a href="http://specials.msn.com/alphabet.aspx" title="MSN Directory">MSN Directory</a> </span>',
    '            <div style=\"clear:both\"></div>',
    '        </div>',
    '    </div>',
    '</div>'
);
document.write('<script type="text/javascript" src="/includes/msn/msn3/msnsitesearch.js"></script>');

//

