//################################################################### //SWITCH TO HTTPS //################################################################### function js_goSSL() { if (location.protocol.toLowerCase() =='http:') location.href = location.href.replace('http:','https:'); } //################################################################### //VIEW/HIDE CUSTOMER EDIT FORM //################################################################### function js_viewCustomerEditForm() { var customer_edit_form_table = document.getElementById('customer_edit_form_table'); if (customer_edit_form_table.style.display != '') { customer_edit_form_table.style.display = ''; } else { customer_edit_form_table.style.display = 'none'; } } //################################################################### //VIEW/HIDE DOWNLOAD INFO AND LINK //################################################################### function js_viewDownloadInfo(products_virtual_id) { var download_product_tr = document.getElementById('download_product_tr_' + products_virtual_id); if (download_product_tr.style.display != '') { download_product_tr.style.display = ''; } else { download_product_tr.style.display = 'none'; } } //################################################################### //CHANGES CURRENT PRODUCT IMAGE //################################################################### function js_setCurrentProductImage(image) { var currentImage = document.getElementById('current_product_image'); currentImage.src = '/images/shops/' + image; } //################################################################### //USER ALERTS //################################################################### function user_alert(type,text) { i = document.getElementById("user_alert"); x = document.getElementById("user_alert_ok"); y = document.getElementById("user_alert_error"); z = document.getElementById("user_alert_none"); if (x) i.removeChild(x); if (y) i.removeChild(y); if (z) i.removeChild(z); var alert_div = document.createElement("DIV"); alert_div.id = type; var alert_text = document.createTextNode(text); alert_div.appendChild(alert_text); i.appendChild(alert_div); } //################################################################### //SHOW CVN SAMPLE //################################################################### function js_showCVNImage() { var image = document.getElementById("cvn_image"); if (image.style.display == 'none') { image.style.display = 'block'; } else { image.style.display = 'none'; } }