﻿function OnMouseOverHeader($1) {
    $1.style.backgroundColor = "#DC0000";
}

function OnMouseOutHeader($1) {
    $1.style.backgroundColor = "#7C7C7C";
}

function OnClickHeader($1) {
    document.location.href = $1;
}

function WriteHeader(){
    document.write("<table class='MainBorder' cellspacing='0' cellpadding='0'>" +
                    "    <tr>" +
                    "        <td>" +
                    "            <table width='970' border='0' cellspacing='0' cellpadding='0'>" +
                    "            	<tr height='93'>" +
                    "		                <td width='12'></td>" +
                    "		                <td align='left'>" +
                    "			                <table border='0' cellspacing='0' cellpadding='0'>" +
                    "			                    <tr height='12'><td></td></tr>" +
                    "				                <tr><td><a href='Index.htm'><img src='Images/CadClips.png' border='0'></a></td></tr>" +
                    "				                <tr height='12'><td></td></tr>" +
                    "			                </table>" +
                    "		                </td>" +
		                            "		<td width='300'></td>" +
                            "               <td align='right' class='HeaderText'>" +
                            "	                <table border='0' cellspacing='0' cellpadding='0'>" +
                            "	                    <tr><td>Your CAD, REVIT & BIM Enterprise Wide Training Experts!</td></tr>" +
                            "	                </table>" +
                            "               </td>" +
                    "		                <td width='15'></td>" +
                    "	                </tr>" +
                    "           </table>" +
                    "           <table width='970' border='0' cellspacing='0' cellpadding='0'>" +
                    "			    <tr>" +
                    "		            <td width='30' style='background-color:#DC0000;'></td>" +
                    "		            <td width='30' style='background-color:#7C7C7C;'></td>" +
                    "			        <td width='66' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('Index.htm')>&nbsp;&nbsp;Home</td>" +
                    "			        <td width='80' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('Benefits.htm')>&nbsp;&nbsp;Benefits</td>" +
                    "			        <td width='105' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('ProductTour.htm')>&nbsp;&nbsp;Product Tour</td>" +
                    "			        <td width='112' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('FreeCADclips.htm')>&nbsp;&nbsp;Free CADclips</td>" +
                    "			        <td width='120' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('http://www.myvbooks.com/cadclipsstore/stores/1/index.jsp')>&nbsp;&nbsp;CADclips Store</td>" +
                    "			        <td width='85' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('About.htm')>&nbsp;&nbsp;About Us</td>" +
                    "			        <td width='90' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('Contact.htm')>&nbsp;&nbsp;Contact Us</td>" +
                    "                   <td width='40' class='HeaderTabText'></td>");


    if (readCookie("CADclipsLoginID") == null) {
        document.write("<td width='112' class='HeaderTabText'></td>");
    }
    else {
        document.write("<td width='112' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('Subscription.htm')>&nbsp;&nbsp;Download/View</td>");
    }

    document.write(" 		            <td width='70' class='HeaderTabText' onmouseover=OnMouseOverHeader(this) onmouseout=OnMouseOutHeader(this) onclick=OnClickHeader('SignIn.aspx')>&nbsp;&nbsp;Sign In</td>" +
                    "			        <td width='30' style='background-color:#7C7C7C;'></td>" +
                    "		 	    </tr>" +
                    "		        <tr height='10'>" +
                    "			  	    <td colspan='13'></td>" +
                    "		        </tr>" +
		            "               <tr>" +
			        "                   <td colspan='13'><a tagert='_self' href='http://www.myvbooks.com/cadclipsstore/stores/1/Full_Revit_Access_C29.jsp'><img src='Images/Banner.gif' border='0' /></a></td>" +
		            "               </tr>" +
		            "               <tr height='10'>" +
			        "                   <td colspan='13'></td>" +
		            "               </tr>" +
		            "               <tr height='15'>" +
			        "                   <td width='30' style='background-color:#DC0000;'></td>" +
		            "                   <td width='30' style='background-color:#7C7C7C;' colspan='12'></td>" +
		            "               </tr>" +
		            "               <tr height='10'>" +
			        "                   <td colspan='13'></td>" +
		            "               </tr>" +
                    "		</table>");

}


function WriteFooter() {
    document.write("            <table width='970' border='0' cellspacing='0' cellpadding='0'>" +
                    "               <tr>" +
                    "                   <td width='720' class='FooterText'>© Copyright 2009 CADclips Corporation All rights reserved</td>" +
                    "                   <td width='250' style='background-color:#7C7C7C;'></td>" +
                    "               </tr>" +
                    "           </table>" +
                    "       </td>" +
                    "   </tr>" +
                    "</table>");

}


function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }

    return null;
}