﻿// JScript 文件
var msgs = new Array();
msgs[0] = "<img src='/images/ask.gif' alt='' /> You can can search the products by input the Code#, Name,Alias, Cas#, Molecular Formula, Molecular Weight, Product description and product sort catalogue.";
msgs[1] = "<img src='/images/ask.gif' alt='' /> Press <img src='/images/right.gif' alt='' /> ,you can examine the product specification and packing information. Press <b>the name of product</b>, you can examine the products details, press <b>code</b>, you can examine the specification details. Press the <b>RFQ</b> behind of the specification, you can inquiry.It is necessary to login if make enquiry.";
msgs[2] = "<img src='/images/ask.gif' alt='' /> Press <img src='/images/right.gif' alt='' /> ,you can examine the packing information. Press <b>code</b>, you can examine the specification details. Press the <b>RFQ</b> behind of the specification, you can inquiry. It is necessary to login if make enquiry.";
msgs[3] = "";

function showHelpMag(_helpType, _infoid, _span_msg)
{
    var msg_index;
    document.getElementById(_infoid).style.display = "block";
    switch(_helpType)
    {
        case "searchHelp":
            msg_index = 0;
            break;
        case "specExpandHelp":
            msg_index = 1;
            break;
        case "specDetailHelp":
            msg_index = 2;
            break;
        default:
            msg_index = 3;
            break;
    }
    document.getElementById(_span_msg).innerHTML = msgs[msg_index];
}

function hiddenMsg(_infoid)
{
    document.getElementById(_infoid).style.display = "none";
}

function hiddenHelp(_span_outer_id, _cookieName, _helpType)
{
    document.getElementById(_span_outer_id).style.display = "none";
    SetCookie(_cookieName, _helpType);
}    

function SetCookie(name, cookieData) 
{
    var expires = new Date ();
    expires.setTime(expires.getTime() + 10 * 365 * (24 * 60 * 60 * 1000));
    document.cookie = name + "=" + escape(cookieData) + "; expires=" + expires.toGMTString();
} 
