﻿

function cart(x) {

    switch (x) {
        case 'c1':

            gname = "Crochet_Dish_Cloth/Face_Cloth";
            gprice = "2.00";
            productID = "CRfacecloth";
            break;

        case 'c2':
            alert("Dish_Towel/Hand_Towel");
            gprice = "3.00";
            productID = "CRhand";
            break;

        case 'c3':
            alert("COFFEE_CUP_MUFF");
            gprice = "2.00";
            productID = "CRmuff";
            break;

        


    }

    var action = "Add";
    add(action);

}


//========================================================================================

function openindex(x) {
    //  scrollbars="+scroll+",
    OpenWindow = window.open("doilies.htm", "newwin", "fullscreen=yes,scrollbars=yes,toolbar=no,menubar=no");
    OpenWindow.document.write("<script type='text/javascript' src='jscript/sidebar.js'>");
    OpenWindow.document.write("var isNS = (navigator.appName == 'Netscape') ? 1 : 0;");
    OpenWindow.document.write("var EnableRightClick = 0;");
    OpenWindow.document.write("if(isNS)");
    OpenWindow.document.write("document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);");
    OpenWindow.document.write("function mischandler(){");
    OpenWindow.document.write("if(EnableRightClick==1){ return true; }");
    OpenWindow.document.write("else {return false; }}");

    OpenWindow.document.write("function mousehandler(e){");
    OpenWindow.document.write("if(EnableRightClick==1){ return true; }");
    OpenWindow.document.write("var myevent = (isNS) ? e : event;");
    OpenWindow.document.write("var eventbutton = (isNS) ? myevent.which : myevent.button;");
    OpenWindow.document.write("if((eventbutton==2)||(eventbutton==3)) return false;}");

    OpenWindow.document.write("function keyhandler(e) {");
    OpenWindow.document.write("var myevent = (isNS) ? e : window.event;");
    OpenWindow.document.write("if (myevent.keyCode==96)");
    OpenWindow.document.write("EnableRightClick = 1;");
    OpenWindow.document.write("return;}");

    OpenWindow.document.write("document.oncontextmenu = mischandler;");
    OpenWindow.document.write("document.onkeypress = keyhandler;");
    OpenWindow.document.write("document.onmousedown = mousehandler;");
    OpenWindow.document.write("document.onmouseup = mousehandler;");
    OpenWindow.document.write("</script>");

    switch (x) {
        case '1':

            OpenWindow.document.write("<TITLE>not sure</TITLE>");

            OpenWindow.document.write("<BODY style='background-color:  rgb(178,194,248)'>");

            OpenWindow.document.write("<a href='javascript:window.close()'><img src='doilies/doilie1.jpg' /></a>");
            OpenWindow.document.write("</BODY>");
            OpenWindow.document.write("</HTML>");

            OpenWindow.document.close();
            self.name = "main";
            break;

        case '2':
            OpenWindow.document.write("<TITLE>not sure</TITLE>");

            OpenWindow.document.write("<BODY style='background-color:  rgb(178,194,248)'>");

            OpenWindow.document.write("<a href='javascript:window.close()'><img src='doilies/doilie2.jpg' /></a>");
            OpenWindow.document.write("</BODY>");
            OpenWindow.document.write("</HTML>");

            OpenWindow.document.close();
            self.name = "main";
            break;


        case '3':
            OpenWindow.document.write("<TITLE>not sure</TITLE>");

            OpenWindow.document.write("<BODY style='background-color:  rgb(178,194,248)'>");

            OpenWindow.document.write("<a href='javascript:window.close()'><img src='doilies/doilie3.jpg' /></a>");
            OpenWindow.document.write("</BODY>");
            OpenWindow.document.write("</HTML>");

            OpenWindow.document.close();
            self.name = "main";
            break;

        case '4':
            OpenWindow.document.write("<TITLE>not sure</TITLE>");

            OpenWindow.document.write("<BODY style='background-color:  rgb(178,194,248)'>");

            OpenWindow.document.write("<a href='javascript:window.close()'><img src='doilies/doilie4.jpg' /></a>");
            OpenWindow.document.write("</BODY>");
            OpenWindow.document.write("</HTML>");

            OpenWindow.document.close();
            self.name = "main";
            break;
    } 
}

