﻿
function ShowPrescriptionRequiredLearnMore() {
    var prlm = $("#prescriptionRequiredLearnMore");
    if (prlm.length == 0) {
        //Sept/14/2011 Liquan Wang added the size of div for display the box in correct position at the first request
        var element = "<div id='prescriptionRequiredLearnMore' style='display:none; width:470px; height:320px'>";
        element = element + "<img id='prescriptionRequiredLearnMoreImage' src='/images/prescriptionrequiredlearnmore.png' alt='Prescription Required - Learn More'>";
        element = element + "<div style='position:absolute;top:2px;left:400px'>";
        element = element + "<input type='image' id='closeButton' src='/images/includedpriceclose.jpg' alt='Close X' onclick='return HidePrescriptionRequiredLearnMore();'/>"
        element = element + "</div></div>";

        var body = $("body");
        prlm = $(element).appendTo(body);
    }

    $("#prescriptionRequiredLearnMore").modal({
        opacity: 50
                , overlayCss: { backgroundColor: "#555555" }
                , overlayClose: true
                , top: "60px"
    });
}
function HidePrescriptionRequiredLearnMore() {
    $.modal.close();
}

//Liquan Wang commented the below codes at Sept/16/2011, for this was moved to prescriptionNote_product_Li.ascx
//$(function () {
//    var location = document.location.toString().toLowerCase();
//    if ((location.lastIndexOf('stimula-for-men') > 0)
//        || (location.lastIndexOf('stimula-for-women') > 0)
//        || (location.lastIndexOf('stimulaforwomen') > 0)
//        || (location.lastIndexOf('stimulaformen') > 0)        
//        ) {
//        return;
//    }
//    else {
//        var prescriptionContent = $("#PrescriptionRequiredContent");
//        if (prescriptionContent.length > 0) {
//            $(prescriptionContent).html("<a href='javascript:void(0);' onclick='return ShowPrescriptionRequiredLearnMore();'>Click here to learn more</a>");
//        }
//    }
//});
