

function loadCosmoHeader() {		

	var html = "		{{{AGILITY_SCRIPT}}}					{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}<div class=\"TopSection\">{{{AGILITY_SCRIPT}}}    <div class=\"LeaderboardAd\">{{{AGILITY_SCRIPT}}}        <iframe src='http://www.cosmotv.ca/Pages/LeaderboardScript.aspx' name=\"LeaderboardScript\"{{{AGILITY_SCRIPT}}}            allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\" width=\"728px\" height=\"90px\"></iframe>{{{AGILITY_SCRIPT}}}    </div>{{{AGILITY_SCRIPT}}}    <div class=\"SearchBar\">{{{AGILITY_SCRIPT}}}		{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}<div class=\"SearchBox\">{{{AGILITY_SCRIPT}}}    <div>{{{AGILITY_SCRIPT}}}        <input name=\"ctl01$ctl00$txtSearchFor\" type=\"text\" id=\"ctl01_ctl00_txtSearchFor\" value=\"type your search here\" onclick=\"SearchClick();\" onblur=\"FillSearchBox();\" class=\"Text\" onkeypress=\"return submitOnEnter(event);\" />{{{AGILITY_SCRIPT}}}        <input src=\"http://www.cosmotv.ca/Images/Buttons/Search.gif\" name=\"ctl01$ctl00$btnSearch\" type=\"image\" id=\"ctl01_ctl00_btnSearch\" class=\"Search\" onclick=\"submitSearch(); return false;\" />{{{AGILITY_SCRIPT}}}        <div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}    </div>{{{AGILITY_SCRIPT}}}</div>{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}<script type=\"text/javascript\">{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}    var SearchBoxWatermarkMessage = 'type your search here';{{{AGILITY_SCRIPT}}}    {{{AGILITY_SCRIPT}}}    function submitOnEnter(oEvent) {{{{AGILITY_SCRIPT}}}        if ((oEvent.keyCode && oEvent.keyCode == 13) || (oEvent.which && oEvent.which == 13)) {{{{AGILITY_SCRIPT}}}            $('#ctl01_ctl00_btnSearch').trigger('click');{{{AGILITY_SCRIPT}}}            return false;{{{AGILITY_SCRIPT}}}        }{{{AGILITY_SCRIPT}}}        return true;{{{AGILITY_SCRIPT}}}    }{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}    function submitSearch() {{{{AGILITY_SCRIPT}}}        var txtSearchFor = $('#ctl01_ctl00_txtSearchFor');{{{AGILITY_SCRIPT}}}        if (txtSearchFor.val() != '' && txtSearchFor.val() != SearchBoxWatermarkMessage) {{{{AGILITY_SCRIPT}}}            window.location = 'http://www.cosmotv.ca/Search-Global.aspx?q=' + txtSearchFor.val();{{{AGILITY_SCRIPT}}}        }{{{AGILITY_SCRIPT}}}    }{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}    function SearchClick() {{{{AGILITY_SCRIPT}}}        var txtBox = $('#ctl01_ctl00_txtSearchFor');{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}        if (txtBox.val() == SearchBoxWatermarkMessage) {{{{AGILITY_SCRIPT}}}            txtBox.val(\"\"){{{AGILITY_SCRIPT}}}        }{{{AGILITY_SCRIPT}}}    }{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}    function FillSearchBox() {{{{AGILITY_SCRIPT}}}        var txtBox = $('#ctl01_ctl00_txtSearchFor');{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}        if (txtBox.val() == \"\") {{{{AGILITY_SCRIPT}}}            txtBox.val(SearchBoxWatermarkMessage){{{AGILITY_SCRIPT}}}        }{{{AGILITY_SCRIPT}}}    }{{{AGILITY_SCRIPT}}}</script>{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}    </div>{{{AGILITY_SCRIPT}}}    <div class=\"MenuContainer\" style=\"background-image: url(http://www.cosmotv.ca/Images/Theme/Menu-BG.png)\">{{{AGILITY_SCRIPT}}}        <div class=\"LoginContainer\">{{{AGILITY_SCRIPT}}}            <iframe src='http://www.cosmotv.ca/Pages/ExternalLogin.aspx' name=\"ExternalLogin\"{{{AGILITY_SCRIPT}}}				allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\" width=\"226px\" height=\"90px\"></iframe>{{{AGILITY_SCRIPT}}}        </div>{{{AGILITY_SCRIPT}}}        <div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}        {{{AGILITY_SCRIPT}}}        <div class=\"NavContainer\">{{{AGILITY_SCRIPT}}}            <div class=\"MainNav\">{{{AGILITY_SCRIPT}}}                <a id=\"ctl01_mhlHome\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/CosmoTV-Logo.png')\" href=\"http://www.cosmotv.ca/Home.aspx\"><img src=\"http://www.cosmotv.ca/Images/CosmoTV-Logo.png\" alt=\"Cosmopolitan TV\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                <a id=\"ctl01_mhlHotGuys\" class=\"HotGuysLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Hot-Guys.png')\" onmouseover=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Hot-Guys-On.png')\" href=\"http://www.cosmotv.ca/Hot-Guys.aspx\"><img src=\"http://www.cosmotv.ca/Images/Menu/Hot-Guys.png\" alt=\"Hot Guys\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                <a id=\"ctl01_mhlSexAndDating\" class=\"SexAndDatingLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Sex-And-Dating.png')\" onmouseover=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Sex-And-Dating-On.png')\" href=\"http://www.cosmotv.ca/Sex-And-Dating.aspx\"><img src=\"http://www.cosmotv.ca/Images/Menu/Sex-And-Dating.png\" alt=\"Sex &amp; Dating\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                <a id=\"ctl01_mhlFashionAndBeauty\" class=\"FashionAndBeautyLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Fashion-And-Beauty.png')\" onmouseover=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Fashion-And-Beauty-On.png')\" href=\"http://www.cosmotv.ca/Fashion-And-Beauty.aspx\"><img src=\"http://www.cosmotv.ca/Images/Menu/Fashion-And-Beauty.png\" alt=\"Fashion &amp; Beauty\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                <a id=\"ctl01_mhlGirlTalk\" class=\"GirlTalkLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Girl-Talk.png')\" onmouseover=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Menu/Girl-Talk-On.png')\" href=\"http://www.cosmotv.ca/GirlTalk.aspx\"><img src=\"http://www.cosmotv.ca/Images/Menu/Girl-Talk.png\" alt=\"Girl Talk\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                <div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}            </div>{{{AGILITY_SCRIPT}}}            <div class=\"AltNavContainer\">{{{AGILITY_SCRIPT}}}                {{{AGILITY_SCRIPT}}}                <div class=\"AltNav\">{{{AGILITY_SCRIPT}}}                    <a id=\"ctl01_mhlVideoLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Alt-Menu/Video.png')\" onmouseover=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Alt-Menu/Video-on.png')\" href=\"http://www.cosmotv.ca/Video.aspx\"><img src=\"http://www.cosmotv.ca/Images/Alt-Menu/Video.png\" alt=\"Video\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                    <a id=\"ctl01_mhlContestsLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Alt-Menu/Contests.png')\" onmouseover=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Alt-Menu/Contests-on.png')\" href=\"http://www.cosmotv.ca/Fun-Stuff/Contests.aspx\"><img src=\"http://www.cosmotv.ca/Images/Alt-Menu/Contests.png\" alt=\"Contests\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                    <a id=\"ctl01_mhlFunStuffLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Alt-Menu/Fun-Stuff.png')\" onmouseover=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Alt-Menu/Fun-Stuff-on.png')\" href=\"http://www.cosmotv.ca/Fun-Stuff.aspx\"><img src=\"http://www.cosmotv.ca/Images/Alt-Menu/Fun-Stuff.png\" alt=\"Fun Stuff\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                    <div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}                </div>{{{AGILITY_SCRIPT}}}                <a id=\"ctl01_mhlOnTV\" class=\"OnTVLink\" onmouseout=\"MegaHyperLink_SwapImage(this, 'http://www.cosmotv.ca/Images/Alt-Menu/On-TV.png')\" href=\"http://www.cosmotv.ca/On-TV/All-Shows.aspx\"><img src=\"http://www.cosmotv.ca/Images/Alt-Menu/On-TV.png\" alt=\"On TV\" style=\"border-width:0px;\" /></a>{{{AGILITY_SCRIPT}}}                <div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}            </div>{{{AGILITY_SCRIPT}}}            <div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}        </div>{{{AGILITY_SCRIPT}}}        <div class=\"OnNowContainer\">{{{AGILITY_SCRIPT}}}            <a href=\"http://www.cosmotv.ca/On-TV/Full-Schedule.aspx\" class=\"ScheduleLink\">Full Schedule</a>{{{AGILITY_SCRIPT}}}            <span class=\"Divider\">|</span>{{{AGILITY_SCRIPT}}}            <span id=\"WhatsOnNow\"></span>{{{AGILITY_SCRIPT}}}            <img src=\"http://www.cosmotv.ca/Images/On-Now.gif\" alt=\"On Now\" class=\"OnNowImage\" />{{{AGILITY_SCRIPT}}}        </div>{{{AGILITY_SCRIPT}}}    </div>{{{AGILITY_SCRIPT}}}</div>{{{AGILITY_SCRIPT}}}<script type=\"text/javascript\">{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}	function MegaHyperLink_SwapImage(elem, src) {{{{AGILITY_SCRIPT}}}		if (elem.firstChild) {{{{AGILITY_SCRIPT}}}			elem.firstChild.src = src;{{{AGILITY_SCRIPT}}}		}{{{AGILITY_SCRIPT}}}	}{{{AGILITY_SCRIPT}}}	{{{AGILITY_SCRIPT}}}	function MegaImageButton_SwapImage(elem, src) {{{{AGILITY_SCRIPT}}}		elem.src = src;{{{AGILITY_SCRIPT}}}	}{{{AGILITY_SCRIPT}}}	{{{AGILITY_SCRIPT}}}</script>{{{AGILITY_SCRIPT}}}				";
	
	html = html.replace(/{{{AGILITY_SCRIPT}}}/g, "\n");
    html = '<div align="center"><div style="width:946px;" align="left">' + html + "</div></div>";
    document.write(html);
}


function loadCosmoFooter() {		
	var html = "		{{{AGILITY_SCRIPT}}}					{{{AGILITY_SCRIPT}}}{{{AGILITY_SCRIPT}}}<div class=\"Footer\">{{{AGILITY_SCRIPT}}}    <div class=\"Border Left\"></div>{{{AGILITY_SCRIPT}}}    <div class=\"Content Left\">{{{AGILITY_SCRIPT}}}       <div class=\"CorusLogo Left\"><a href=\"http://www.corusent.com\" target=\"_blank\"><img alt=\"\" style=\"border: 0px solid ;\" src=\"http://cache.cosmotv.ca/Corus-Logo.gif\" /></a></div>{{{AGILITY_SCRIPT}}}<div class=\"VLine\"></div>{{{AGILITY_SCRIPT}}}<div class=\"CorusWomen Left\"><img alt=\"\" style=\"border: 0px solid ; width: 305px; height: 50px;\" src=\"http://cache.cosmotv.ca.s3.amazonaws.com/Corus-Women.jpg\" usemap=\"#rade_img_map_1242914801129\" /></div>{{{AGILITY_SCRIPT}}}<div class=\"Disclaimer Left\">{{{AGILITY_SCRIPT}}}<p>Cosmopolitan TV™ and  COSMO TV™ are trademarks of Hearst Communications, Inc., used by Cosmopolitan Television Canada Company under licence. </p>{{{AGILITY_SCRIPT}}}<p>&nbsp;</p>{{{AGILITY_SCRIPT}}}<p>©2010 Corus® Entertainment Inc. All rights reserved.</p>{{{AGILITY_SCRIPT}}}<p></p>{{{AGILITY_SCRIPT}}}<p>&nbsp;</p>{{{AGILITY_SCRIPT}}}<p></p>{{{AGILITY_SCRIPT}}}<p><strong>More CosmoTV Information:</strong> &nbsp;{{{AGILITY_SCRIPT}}}<a href=\"http://cosmotv.ca/Privacy.aspx\">Privacy Policy</a>&nbsp; |&nbsp; <a href=\"http://cosmotv.ca/Terms-of-Use.aspx\">Terms of Use</a>&nbsp; |&nbsp; <a href=\"http://cosmotv.ca/Contact-Us.aspx\">Contact Us</a></p>{{{AGILITY_SCRIPT}}}<p></p>{{{AGILITY_SCRIPT}}}<p><a href=\"http://cosmotv.ca/How-to-Subscribe.aspx\">How to Subscribe</a>&nbsp; |&nbsp;<a target=\"_blank\" href=\"http://www.corusmedia.com/w/corus_gets_women\">Sales + Marketing</a>&nbsp; |&nbsp;<a target=\"_blank\" href=\"http://www.corusent.com/home/Default.aspx\">Publicity</a></p>{{{AGILITY_SCRIPT}}}<p>&nbsp;</p>{{{AGILITY_SCRIPT}}}<p><strong>Other Corus Sites:</strong><br />{{{AGILITY_SCRIPT}}}<strong>Corus kids:</strong> <a href=\"http://ytv.com/\" target=\"_blank\">YTV.com</a>&nbsp; |&nbsp; <a href=\"http://treehousetv.com/\" target=\"_blank\">TreehouseTV.com (kids)</a>&nbsp; |&nbsp; <a href=\"http://discoverykids.ca/\" target=\"_blank\">DiscoveryKids.ca</a><br />{{{AGILITY_SCRIPT}}}<strong>Corus family:</strong> <a href=\"http://treehousetv.com/\" target=\"_blank\">TreehouseTV.com (parents)<br />{{{AGILITY_SCRIPT}}}</a><strong>More sites:</strong> <a href=\"http://cmt.ca/\" target=\"_blank\">CMT.ca</a>&nbsp; |&nbsp; <a class=\"ApplyClass\" href=\"http://duskTV.ca/\" target=\"_blank\">DuskTV.ca</a>&nbsp; |&nbsp; <a href=\"http://moviecentral.ca/\" target=\"_blank\">MovieCentral.ca</a>&nbsp; |&nbsp; <a href=\"http://encoreavenue.ca/\" target=\"_blank\">EncoreAvenue.ca&nbsp; |&nbsp; </a><a href=\"http://sundancechannel.ca/\" target=\"_blank\">SunDanceChannel.ca </a></p>{{{AGILITY_SCRIPT}}}</div>{{{AGILITY_SCRIPT}}}<map id=\"rade_img_map_1242914801129\" name=\"rade_img_map_1242914801129\">{{{AGILITY_SCRIPT}}}<area shape=\"RECT\" coords=\"70,10,171,41\" href=\"http://wnetwork.com\" target=\"_blank\" />{{{AGILITY_SCRIPT}}}<area shape=\"RECT\" coords=\"0,0,1,1\" />{{{AGILITY_SCRIPT}}}<area shape=\"RECT\" coords=\"0,0,1,1\" />{{{AGILITY_SCRIPT}}}<area shape=\"RECT\" coords=\"0,10,66,39\" href=\"http://cosmotv.ca\" target=\"_self\" />{{{AGILITY_SCRIPT}}}<area shape=\"RECT\" coords=\"0,0,1,1\" />{{{AGILITY_SCRIPT}}}<area shape=\"RECT\" coords=\"178,13,236,38\" href=\"http://myviva.ca\" target=\"_blank\" />{{{AGILITY_SCRIPT}}}<area shape=\"RECT\" coords=\"242,8,305,50\" href=\"http://wnetwork.com/Movies/WMovies.aspx\" target=\"_blank\" /></map>{{{AGILITY_SCRIPT}}}    </div>{{{AGILITY_SCRIPT}}}    <div class=\"Border Left\"></div>{{{AGILITY_SCRIPT}}}    <div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}</div>{{{AGILITY_SCRIPT}}}<div class=\"Clear\"></div>{{{AGILITY_SCRIPT}}}				";
	
	html = html.replace(/{{{AGILITY_SCRIPT}}}/g, "\n");
    html = '<div align="center"><div style="width:946px;" align="left">' + html + "</div></div>";
    
	document.write(html);
}