/*
THIS EXPANDABLE MENU ITEM USES JAVASCRIPT INCLUDED IN expMenuContactSidebar.js:
* function HideIt
* vicor.widget.CountryFilter

This script requires these variables to be defined by the application using it:
loggedOn         (boolean)
linkLogOn        (string)
linkLogOff       (string)
linkMyDesigns    (string)
linkRegisterNew  (string)
linkRegisterEdit (string)
*/

if (!window.loggedOn)         loggedOn         = false;
if (!window.linkLogOn)        linkLogOn        = "javascript:alert(\"Missing \\\"Log On\\\" link!\");";
if (!window.linkLogOff)       linkLogOff       = "javascript:alert(\"Missing \\\"Log Off\\\" link!\");";
if (!window.linkMyDesigns)    linkMyDesigns    = "javascript:alert(\"Missing \\\"My Designs\\\" link!\");";
if (!window.linkRegisterNew)  linkRegisterNew  = "javascript:alert(\"Missing \\\"Register New User\\\" link!\");";
if (!window.linkRegisterEdit) linkRegisterEdit = "javascript:alert(\"Missing \\\"Edit User Profile\\\" link!\");";


document.write("" + 
"<table class='exp' width='220' border='0' cellspacing='0' cellpadding='0'>" +
"<tr>" +
"    <td class='menuHdr' style='cursor:pointer;' onclick='return HideIt(\"expandMyDesigns\");'>" +
"        <img src='http://www.vicorpower.com/secure_website_template/images/expPlus.gif' width='7' height='7' border='0' id='expandMyDesignsImg' />" +
"        &nbsp;" +
"        My Designs" +
"    </td>" +
"</tr>" +
"<tr style='display:none;' id='expandMyDesigns'>" +
"    <td class='menuContents'>" +
"");

if (loggedOn) {
    document.write("" + 
    "<!--=== LOGGED ON =============================================-->" +
    "You are currently logged on to<br />My Designs.<br /><br />" +
    "<div style='line-height:20px;'>" + 
    "<span class='bodyLink'><a class='bodyLink' href='" + linkMyDesigns + "'>Go to My Designs account</a>&nbsp;&raquo;</span><br />" +
    "<span class='bodyLink'><a class='bodyLink' href='" + linkRegisterEdit + "'>Edit user profile</a>&nbsp;&raquo;</span><br />" +
    "<span class='bodyLink'><a class='bodyLink' href='" + linkLogOff + "'>Log off My Designs account</a>&nbsp;&raquo;</span>" +
    "</div>");
}
else {
    document.write("" + 
    "<!--=== LOGGED OFF ============================================-->" +
    "My Designs allows you to save and<br />" +
    "access the designs you create.<br />" +
    "<span class='bodyLink'><a class='bodyLink' href='" + linkLogOn + "'>Log on to My Designs account</a>&nbsp;&raquo;</span>" +
    "<br /><br />" +
    "Don't have an account?<br />" +
    "<span class='bodyLink'><a class='bodyLink' href='" + linkRegisterNew + "'>Register for a new account</a>&nbsp;&raquo;</span>" +
    "");
}

document.write("" + 
"        <div style='width:95%; height:12px; border-bottom: 1px dotted #999999; margin-bottom:10px;'></div>" +
"        <div style='line-height:20px;' class='bodyLink'>" +
"        <a class='bodyLink' href='http://www.vicorpower.com/cms/home/technical_resources/online-help'>Frequently Asked Questions</a>&nbsp;&raquo;<br />" +
"        <a class='bodyLink' href='http://www.vicorpower.com/cms/home/technical_resources/application-engineering'>Send Us Your Comments</a>&nbsp;&raquo;<br />" +
"        </div>" +

"    </td>" +
"</tr>" +
"</table>" +
"");

