function confirm_del() { var reply = confirm("This will permanantly delete this record! You can\'t restore it in future."); if (reply) { return true; } else { return false; } } function popUpImg(url, pageWidth, pageHeight, title) { var args = "width=" + (pageWidth + 20) + ",height=" + (pageHeight + 10) + ""; var date = new Date(); var now = date.getTime(); var name = (now).toString(10); _w = window.open('',name,args); _w.document.open(); _w.document.write("\n" + title + "\n"); _w.document.write("\n"); _w.document.write("\n"); _w.document.write("\n"); _w.document.write("\n"); _w.document.write("\n"); _w.document.write("\n\n"); _w.document.write("
\n"); _w.document.write("Click to close\n"); _w.document.write("
\n"); _w.document.write("\n"); _w.document.close(); } opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false; ie = (document.all && !opera)? true : false; dom = (document.getElementById && !ie && !opera)? true : false; var expiration = new Date(); expiration.setTime(expiration.getTime() + 3600*3600*3600); function doPreview(param1, param2) { if (dom) { var src = document.getElementById(param1).value; } else if (ie) { var src = document.all[param1].value; } if (src.charAt(1)==":") src = "file:/" + src; if (dom) { document.getElementById(param2).src=src; } else if (ie) { document.all[param2].src = src; } } function showtranscript(elemId,displayValue) { if (dom) { if (displayValue) { document.getElementById(elemId).style.display = displayValue; return 0; } if (document.getElementById(elemId).style.display == "none") { document.getElementById(elemId).style.display = "block"; } else if (document.getElementById(elemId).style.display == "block") { document.getElementById(elemId).style.display = "none"; } } else if (ie) { if (displayValue) { document.all[elemId].style.display = displayValue; return 0; } if (document.all[elemId].style.display == "block") { document.all[elemId].style.display = "none"; } else if (document.all[elemId].style.display == "none") { document.all[elemId].style.display = "block"; } } } function display(cookie_name, id) { var template_category_cookie; template_category_cookie = GetCookie(cookie_name); if (template_category_cookie) { SetCookie(cookie_name, "1", expiration, "", "","") showtranscript(id, 'block'); } else { SetCookie(cookie_name, "", expiration, "", "","") showtranscript(id, 'none'); } return true; } function onCookieChange(cookie_name, id) { if (dom) { if (document.getElementById(id).style.display == "none") { SetCookie(cookie_name, "", expiration, "", "","") } else if (document.getElementById(id).style.display == "block") { SetCookie(cookie_name, "1", expiration, "", "","") } } else if (ie) { if (document.all[id].style.display == "block") { SetCookie(cookie_name, "1", expiration, "", "","") } else if (document.all[id].style.display == "none") { SetCookie(cookie_name, "", expiration, "", "","") } } } function SetCookie(name, value, expires, path, domain, secure) { var mycookie = name + "=" + escape(value); var myexpires = new Date(); myexpires.setTime(myexpires.getTime() + 5000); mycookie = mycookie + "; myexpires=" + myexpires.toGMTString(); document.cookie = mycookie; } function GetCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function MM_ClickImage() { //v3.0 var i,j=0,x,a=MM_ClickImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){ document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2]; } if ((y=MM_findObj('item_ref1'))!=null){ y.href='item.php?id='+a[4]; } if ((y=MM_findObj('item_ref2'))!=null){ y.href='item.php?id='+a[4]; } } function openWin($url) { msgWindow= window.open($url,"displayWindow","width=780,height=600,status=no,toolbar=no,menubar=no,scrollbars=yes"); } function closeIt(){ window.close(); } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function viewform(m, w, h) { var scroll = 'yes'; var settings; var LeftPosition; var TopPosition; var win; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll; settings = settings + ',resizable=no,maximize=no,status=no,toolbar=no,directories=no,menubar=no,location=no'; win = window.open(m, 'pre', settings); win.name = 'name'; win.focus(); } function viewformclose(m, w, h) { var scroll = 'yes'; var settings; var LeftPosition; var TopPosition; var win; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll; settings = settings + ',resizable=no,maximize=no,status=no,toolbar=no,directories=no,menubar=no,location=no'; win = window.open(m, 'pre', settings); win.name = 'name'; win.focus(); win.alert('!!!!!'); win.document.write('window.close();'); } function viewform2(m, w, h) { // var w = 300; // var h = 380; var scroll = 'yes'; var settings; var LeftPosition; var TopPosition; var win; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll; settings = settings + ',resizable=no,maximize=no,status=no,toolbar=no,directories=no,menubar=no,location=no'; win = window.open(m, 'pre', settings); win.name = 'name'; win.focus(); } function viewformi(m, w, h,r) { var scroll = 'yes'; var settings; var LeftPosition; var TopPosition; var win; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; if (r='') r='no'; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll; settings = settings + ',resizable='+ r + ',maximize=no,status=no,toolbar=no,directories=no,menubar=no,location=no'; win = window.open(m, 'pre', settings); win.name = 'name'; win.focus(); } function ViewOtherImg(name,main) { tmp_src = document.images[main].src; document.images[main].src = document.images[name].src; document.images[name].src = tmp_src; } function conf() { var reply = confirm("This will permanantly delete this record! You can\'t restore it in future."); if(reply) { return true; } else { return false; } } function inputComment(frm) { var prefix0 = 'get_'; var input_array = new Array('name','email','comment'); var error_array = new Array('Name','Email Address','Comment'); for (var i=0; i 10)) { alert('Please enter a password 6-10 characters long using only letters or numbers.'); frm.elements['get_password_1'].focus(); return false; } if (frm.elements['get_password_2'].value.length == 0) { alert('Please enter a Re-Password.'); frm.elements['get_password_2'].focus(); return false; } if (frm.elements['get_password_1'].value != frm.elements['get_password_2'].value) { alert('Your password confirmation does not match the original password'); frm.elements['get_password_2'].focus(); return false; } for (var i=0; i 10)) { alert('Please enter a password 6-10 characters long using only letters or numbers.'); frm.elements['get_password_1'].focus(); return false; } if (frm.elements['get_password_2'].value.length == 0) { alert('Please enter a Re-Password.'); frm.elements['get_password_2'].focus(); return false; } if (frm.elements['get_password_1'].value != frm.elements['get_password_2'].value) { alert('Your password confirmation does not match the original password'); frm.elements['get_password_2'].focus(); return false; } return true; } function inputEmail(frm) { if (!(validEmail(frm.elements['get_email'].value))) { alert('Please enter a valid email address in the form of email@host.tag.'); frm.elements['get_email'].focus(); return false; } return true; } function validEmail(email) { invalidChars = " /:,;"; if (email == "") { return false; } for (i=0; i -1) { return false; } } atPos = email.indexOf("@",1); if (atPos == -1) { return false; } if (email.indexOf("@",atPos+1) > -1) { return false; } periodPos = email.indexOf(".",atPos); if (periodPos == -1) { return false; } if (periodPos+3 > email.length) { return false; } return true; } function resize() { var i=0; var LeftPosition; var TopPosition; var w; var h; if (navigator.appName == 'Netscape') i=40; if (document.images[0]) { w = document.images[0].width+100; h = document.images[0].height+115-i; window.resizeTo(w, h); LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; window.moveTo(LeftPosition, TopPosition); } self.focus(); } function useCustomInfo2(chck, frm, prefix, prefix2) { var prefix0 = 'get_'; var input_array = new Array('firstname','lastname','email','address','city','zip_code','phone'); var select_array = new Array('ref_country', 'ref_state'); if (chck.checked) { for (var i=0; i 0 ) frm.submit(); exit; } alert('Please calculate order'); return false; } */ function inputOrderInfo(frm) { var prefix0 = 'get_'; var input_array = new Array('billing_firstname','billing_lastname','billing_email','billing_address','billing_city','billing_zip_code', 'shipping_firstname','shipping_lastname','shipping_email','shipping_address','shipping_city','shipping_zip_code' ); var error_array = new Array('Billing First Name','Billing Last Name','Billing Email Address', 'Billing Street Address','Billing City','Billing Zip Code', 'Shipping First Name','Shipping Last Name','Shipping Email Address', 'Shipping Street Address','Shipping City','Shipping Zip Code' ); for (var i=0; i