// JavaScript Document function menuOver(x) { x.className = "menu_item_over"; } function menuOut(x) { x.className = "menu_item"; } function menuClick(x) { var frm = document.forms["MenuForm"]; //frm.location.value = x; //frm.submit(); window.location.href = "index.php?location="+x; } function openWindow(url){ window.open(url,"","width=800,height=600,scrollbars=yes"); } function goTo(url){ document.forms[0].location.value = ""; window.location.href=url; } // Shopping cart script function doCartAdd(id) { var frm = document.forms["ShoppingCart"]; frm.product_id.value = id; frm.product_amount.value = document.getElementById("quantity"+id).value; frm.submit(); } function doCartClear(){ var frm = document.forms["ShoppingCart"]; frm.cart_action.value = "clear"; frm.submit(); } function doCartSubmit(){ var res = confirm("This will submit your order for processing & clear the shopping cart.\n If you wish to continue click 'OK'."); if (res) { var frm = document.forms["ShoppingCart"]; frm.cart_action.value = "submit"; frm.submit(); } } function doCartRemove(id){ var frm = document.forms["ShoppingCart"]; frm.product_id.value = id; frm.cart_action.value = "remove"; frm.submit(); } function doCartUpdate(id){ var frm = document.forms["ShoppingCart"]; frm.cart_action.value = "update"; frm.product_id.value = id; frm.product_amount.value = document.getElementById("quantity"+id).value; frm.submit(); } function doContactSubmit(){ var frm = document.contactForm; var tmp = frm.from.value; if ((tmp != "") && (tmp.indexOf("@") != -1)) frm.submit(); else alert("Please enter your email address"); } function doArticleJump(x) { var url = x.options[x.selectedIndex].value; location.href = url; } function doLogin() { var frm = document.forms["loginForm"]; frm.action.value = "login"; frm.submit(); } function doLogout() { var frm = document.forms["loginForm"]; frm.action.value = "logout"; frm.submit(); } function doRegister(){ window.open("renders/register.php","Register","height=500,width=500"); } /*** Routes DB Functions */ function doAction(action,id) { var frm = document.actionForm; frm.action.value = action; frm.record_id.value = id; frm.submit(); } function doSave() { var frm = document.editForm; frm.submit(); }