var xtime;
var confirmMsg  = ' ';
function checkform() {
 if ( document.getElementById('firstname').value!="" &&
     document.getElementById('lastname').value!="" &&
     document.getElementById('address1').value!="" &&
     document.getElementById('city').value!="" &&
     document.getElementById('state').value!="" &&
     document.getElementById('zip').value!="" &&
     document.getElementById('email').value!="" &&
     document.getElementById('phone1').value!="" &&
     document.getElementById('phone2').value!="" &&
     document.getElementById('phone3').value!="" &&
     document.getElementById('quantity').value>0 )
       { return true;   }
     else {
        alert('Required field not completed');
        return false;
             }



}

function showmenu(x, y) {

    xget = document.getElementById(x);
    xx = findposx(y);
    yy = findposy(y);
    xget.style.left = xx+2;
    xget.style.top = yy + 18;
    xget.style.visibility="visible";
    if (xtime) {
        clearTimeout(xtime);
    }


}

function hidemenu(x) {




xtime = setTimeout('hide_m("'+x+'")',500);
}


function hide_m(x) {

    xget = document.getElementById(x);

    xget.style.visibility="hidden";

        }

function findposx(x) {

    xget1 = document.getElementById("posi1");
    xget2 = document.getElementById("posi2");
    xget3 = document.getElementById(x);
    xgetx = xget1.offsetLeft+xget2.offsetLeft+xget3.offsetLeft;
    xgety = xget1.offsetTop+xget2.offsetTop+xget3.offsetTop;
    //alert('x: '+xgetx+' y: '+xgety);
    return xgetx+15;
}

function findposy(x) {

    xget1 = document.getElementById("posi1");
    xget2 = document.getElementById("posi2");
    xget3 = document.getElementById(x);
    xgetx = xget1.offsetLeft+xget2.offsetLeft+xget3.offsetLeft;
    xgety = xget1.offsetTop+xget2.offsetTop+xget3.offsetTop;
    //alert('x: '+xgetx+' y: '+xgety);

    return xgety;
}


function openw(https,wid,hei){
shopWin = open(https, "Foto", "scrollbars=no,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }

function openw2(https,wid,hei){
shopWin = open(https, "Foto2", "scrollbars=yes,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }

function openw4(https,wid,hei){
shopWin = open(https, "Foto4", "scrollbars=yes,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }
function openw5(https,wid,hei){
shopWin = open(https, "Foto5", "scrollbars=yes,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }
function openw6(https,wid,hei){
shopWin = open(https, "Foto6", "scrollbars=yes,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }
function openw7(https,wid,hei){
shopWin = open(https, "Foto6", "scrollbars=no,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }
function openw8(https,wid,hei){
shopWin = open(https, "Foto6", "scrollbars=no,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }
function openw3(https,wid,hei){
shopWin = open(https, "Foto3", "scrollbars=no,resizable=no,width="+wid+",height="+hei+"");
        shopWin.focus();

        }
function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' \n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
}


function movein2(which, which2, html){
if (html == menu) return 1;
document.getElementById(which).style.background='#3B507D';
document.getElementById(which2).style.background='#EDEDEF';
}
function moveout2(which, which2,  html){
if (html == menu) return 1;
document.getElementById(which).style.background='#DFE0E2';
document.getElementById(which2).style.background='#FFFFFF';
}


function movein(which, colors, html){
document.getElementById(which).style.background = colors;
}


function change_im(id, image){
document.getElementById(id).src=image;
}

function changefont(id, image){

 //alert(image);
document.getElementById(id).src = image;
}

function changefontb(id, image) {


  //alert(id);

//document.getElementById(id).src = image;
//xtime2 = setTimeout("changefontbb('"+id+"','"+image+"')",0);

}


function changefontbb(id, image) {

//alert('aa');
document.getElementById(id).src = image;

 }
