var mnuIcon = new Image(); var SpacerIcon = new Image(); mnuIcon.src = "/proimages/mnuIcon.gif"; SpacerIcon.src = "/proimages/spacer.gif"; var CheckMenu = 0; function onChangeLoadImg(id) { document.getElementById('mnuIcon_' + id).src = mnuIcon.src; } function onChangeLoadOutImg(id) { document.getElementById('mnuIcon_' + id).src = SpacerIcon.src; } function ChangeImage(id) { document.getElementById('mnuIcon_' + id).src = mnuIcon.src; } function showHideDiv(id, status){ var divObj = document.getElementById(id); if(status) { divObj.style.visibility = "visible"; divObj.style.display = "block"; }else{ divObj.style.visibility = "hidden"; divObj.style.display = "none"; } } function checkNum(Obj){ if(isNaN(Obj.value)) { Obj.value = 20; } } function order(field, url){ url += "?"; url += "&order=" + field; location.href = url; } function changeOrder(idObj, move){ id = idObj.id.replace('a_', ''); var vals = id.split('_'); switch(move) { case "down": var nextOrder = parseInt(vals[vals.length - 1], 10); nextOrder++; var upperDivId = 'div_' + vals[0] + '_' + vals[1]; var lowerDivId = 'div_' + vals[0] + '_' + nextOrder; break; case "up": var prevOrder = parseInt(vals[vals.length - 1], 10); prevOrder--; var upperDivId = 'div_' + vals[0] + '_' + prevOrder; var lowerDivId = 'div_' + vals[0] + '_' + vals[1]; break; } var upperdivObj = document.getElementById(upperDivId); var lowerdivObj = document.getElementById(lowerDivId); if(upperdivObj) { var upperHTML = lowerdivObj.innerHTML;} if(lowerdivObj) { var lowerHTML = upperdivObj.innerHTML; } if(upperdivObj) { upperdivObj.innerHTML = upperHTML; } if(lowerdivObj) { lowerdivObj.innerHTML = lowerHTML; } } function openBrowse(check, divId) { divObj = document.getElementById('tbl_' + divId); fileObj = document.getElementById('imagefile_' + divId); if(check.checked) { divObj.style.visibility = "visible"; }else{ divObj.style.visibility = "hidden"; fileObj.value = ''; } } function changeOpac(opacity, obj) { obj.style.opacity = (opacity / 100); obj.style.MozOpacity = (opacity / 100); obj.style.KhtmlOpacity = (opacity / 100); obj.style.filter = "alpha(opacity=" + opacity + ")"; } function update_preview(obj, img_no, img_width, img_height) { // Delete off earlier cropping parameters. This is incase cropping values are saved // and then another image is uploaded store_coords(img_no, 1); div_obj = document.getElementById('previewimg_' + img_no); // Remove the old preview image if any if(div_obj.childNodes.length > 0) { div_obj.removeChild(div_obj.firstChild); } preview_img = new Image(); preview_img.src = obj.value; preview_img.name = "preview_image"; if (browser.isNS) preview_img.src = "file:///" + escape(preview_img.src.replace(/\\/g, "/")); org_width = preview_img.width; org_height = preview_img.height; // Check if image is smaller than prescribed width or height if(preview_img.width < img_width || preview_img.height < img_height) { return; } // find the ratio to understand we need to resize on width or height var previewratio = preview_img.width/preview_img.height; var imgratio = img_width/img_height; if (previewratio < imgratio) { // this means width is less derived_height = (img_width/preview_img.width)*preview_img.height; derived_height = parseInt(derived_height, 10); preview_img.height = derived_height; preview_img.style.height = derived_height; preview_img.width = img_width; preview_img.style.width = img_width; } else { // Get the derived width derived_width = (img_height/preview_img.height)*preview_img.width; derived_width = parseInt(derived_width, 10); preview_img.width = derived_width; preview_img.style.width = derived_width; preview_img.height = img_height; preview_img.style.height = img_height; } document.getElementById('previewtext_' + img_no).style.width = preview_img.width; // Set the scale factors vis-a-vis original and preview image. This is to scale the x and y positions before form submission document.getElementById('scalex_' + img_no).value = org_width/preview_img.width; document.getElementById('scaley_' + img_no).value = org_height/preview_img.height; // Make preview image visible document.getElementById('preview_' + img_no).style.visibility = "visible"; document.getElementById('preview_' + img_no).style.display = "block"; document.getElementById('previewimg_' + img_no).style.visibility = "visible"; document.getElementById('previewimg_' + img_no).style.display = "block"; div_obj.appendChild(preview_img); //div_obj.insertBefore(preview_img,div_obj.firstChild); // Make cropper tool visible. Put same image in cropper tool also div_obj = document.getElementById('cropbox_' + img_no); div_obj.style.visibility = "visible"; div_obj.style.display = "block"; div_obj.style.overflow = "hidden"; div_obj.innerHTML = ""; div_obj.style.left = findPosX(document.getElementById('previewimg_' + img_no)); div_obj.style.top = findPosY(document.getElementById('previewimg_' + img_no)); changeOpac(40, preview_img); } var browser = new Browser(); var dragObj = new Object(); var DivWidth = 380; var dragFlag = false; var dragStartFlag = false; function replace_tr(val,my_name,my_email){ var oldTR = ''; // oldTR += '
'; oldTR += ''; oldTR += ''; oldTR += ''; oldTR += ''; oldTR += ''; oldTR += ''; oldTR += ''; oldTR += ''; oldTR += '
Friends Name:
Friends Email:
'; oldTR += '  
'; oldTR += ''; // oldTR += '
'; document.getElementById('hideMailTR').innerHTML=oldTR; if (val == 1){ document.getElementById('name').value=''; document.getElementById('email').value=''; slideup('hideMailTR','6','2'); } } function Browser() { var ua, s, i; this.isIE = false; this.isNS = false; this.version = null; ua = navigator.userAgent; s = "MSIE"; if ((i = ua.indexOf(s)) >= 0) { this.isIE = true; this.version = parseFloat(ua.substr(i + s.length)); return; } s = "Netscape6/"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = parseFloat(ua.substr(i + s.length)); return; } s = "Gecko"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true; this.version = 6.1; return; } } function crop_dragStart(event, id) { current_image_crop_id = "previewimg" + id.substring(7,(id.length)); current_id = id.substring(7,(id.length)); if((dragStartFlag == false) && (dragFlag == false)) { dragStartFlag = true; var el; var x, y; if (id) { dragObj.elNode = document.getElementById(id); }else { if (browser.isIE) dragObj.elNode = window.event.srcElement; if (browser.isNS) dragObj.elNode = event.target; if (dragObj.elNode.nodeType == 3) dragObj.elNode = dragObj.elNode.parentNode; } if (browser.isIE) { x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop; } if (browser.isNS) { x = event.clientX + window.scrollX; y = event.clientY + window.scrollY; } dragObj.cursorStartX = x; dragObj.cursorStartY = y; dragObj.elStartLeft = parseInt(dragObj.elNode.style.left, 10); dragObj.elStartTop = parseInt(dragObj.elNode.style.top, 10); if (isNaN(dragObj.elStartLeft)) dragObj.elStartLeft = 0; if (isNaN(dragObj.elStartTop)) dragObj.elStartTop = 0; dragObj.elNode.style.zIndex = ++dragObj.zIndex; if (browser.isIE) { document.attachEvent("onmousemove", crop_dragGo); document.attachEvent("onmouseup", crop_dragStop); window.event.cancelBubble = true; window.event.returnValue = false; } if (browser.isNS) { document.addEventListener("mousemove", crop_dragGo, true); document.addEventListener("mouseup", crop_dragStop, true); event.preventDefault(); } } } function crop_dragGo(event) { var x, y; if (browser.isIE) { x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop; } if (browser.isNS) { x = event.clientX + window.scrollX; y = event.clientY + window.scrollY; } var current_drag_point_x = (dragObj.elStartLeft + x - dragObj.cursorStartX); var current_preview_image_x = findPosX(document.getElementById(current_image_crop_id)); var current_drag_point_y = (dragObj.elStartTop + y - dragObj.cursorStartY); var current_preview_image_y = findPosY(document.getElementById(current_image_crop_id)); var current_preview_image_width = preview_img.width; //document.getElementById('updatemsg').innerHTML = (current_drag_point_x + ", " + current_preview_image_x + "," + current_preview_image_width); if ( current_drag_point_x < current_preview_image_x) { dragObj.elNode.style.left = current_preview_image_x + "px"; } else if (current_drag_point_x >= (current_preview_image_x + current_preview_image_width - dragObj.elNode.offsetWidth)) { dragObj.elNode.style.left = current_preview_image_x + current_preview_image_width - dragObj.elNode.offsetWidth; } else { dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px"; } if ((dragObj.elStartTop + y - dragObj.cursorStartY) <= findPosY(document.getElementById(current_image_crop_id))) { dragObj.elNode.style.top = findPosY(document.getElementById(current_image_crop_id)) + "px"; } else if ((dragObj.elStartTop + y - dragObj.cursorStartY) >= (findPosY(document.getElementById(current_image_crop_id)) + document.getElementById(current_image_crop_id).offsetHeight) - dragObj.elNode.offsetHeight) { dragObj.elNode.style.top = (findPosY(document.getElementById(current_image_crop_id)) + document.getElementById(current_image_crop_id).offsetHeight - dragObj.elNode.offsetHeight); } else { dragObj.elNode.style.top = (dragObj.elStartTop + y - dragObj.cursorStartY) + "px"; } img_obj = document.getElementById('crop_img'); cur_left = dragObj.elNode.style.left.replace("px", ""); cur_left = parseInt(cur_left, 10); cur_left = parseInt(current_preview_image_x) - cur_left; cur_top = dragObj.elNode.style.top.replace("px", ""); cur_top = parseInt(cur_top, 10); cur_top = parseInt(current_preview_image_y) - cur_top; img_obj.style.marginLeft = cur_left + "px"; img_obj.style.marginTop = cur_top + "px"; if (browser.isIE) { window.event.cancelBubble = true; window.event.returnValue = false; } if (browser.isNS) event.preventDefault(); } function crop_dragStop(event) { dragStartFlag = false; if (browser.isIE) { document.detachEvent("onmousemove", crop_dragGo); document.detachEvent("onmouseup", crop_dragStop); } if (browser.isNS) { document.removeEventListener("mousemove", crop_dragGo, true); document.removeEventListener("mouseup", crop_dragStop, true); } } function store_coords(ref_no, reset) { if(reset == 1) { document.getElementById('x_' + ref_no).value = ''; document.getElementById('y_' + ref_no).value = ''; return; } cropObj = document.getElementById('cropbox_' + ref_no); preObj = document.getElementById('previewimg_' + ref_no); x_position = (findPosX(cropObj) - findPosX(preObj))*document.getElementById('scalex_' + ref_no).value; y_position = (findPosY(cropObj) - findPosY(preObj) - 0)*document.getElementById('scaley_' + ref_no).value; document.getElementById('x_' + ref_no).value = parseInt(x_position, 10); document.getElementById('y_' + ref_no).value = parseInt(y_position, 10); hide_preview(ref_no); } function hide_preview(ref_no) { cropObj = document.getElementById('cropbox_' + ref_no); preObj = document.getElementById('preview_' + ref_no); // Close the preview window cropObj.style.visibility = "hidden"; cropObj.style.display = "none"; preObj.style.visibility = "hidden"; preObj.style.display = "none"; // reset the x and y co-ordinates to '' so that it does not crop } function unset_coords(ref_no) { document.getElementById('x_' + ref_no).value = ''; document.getElementById('y_' + ref_no).value = ''; hide_preview(ref_no); } function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) { curleft += obj.x; } return curleft; } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) { curtop += obj.y; } return curtop; } //functions for sending wishlist as a mail. function submitWish(){ var email = document.getElementById('email').value; var emailCnt = document.getElementById('email_cont').value; var msg = document.getElementById('yourmsg').value; var i=0; if(inlineValidform('mailForm')){ var emailStr = email; if(emailCnt > 1){ emailStr +="||"; for(i=1;iEmail address:"; replaceTR+=""; replaceTR+=""; document.getElementById('fillMail').innerHTML+=replaceTR; document.getElementById('replaceAddval').innerHTML=""; } function send_var_delete(tr_id,checkbx,type){ ADAjaxPostData('send_mail.php',checkbx, tr_id); } function changeLink(yesNo,OverOut){ if (yesNo==1){ if (OverOut==1){ document.getElementById('yesLink').style.textDecoration='underline'; }else{ document.getElementById('yesLink').style.textDecoration='none'; } }else{ if (OverOut==1){ document.getElementById('noLink').style.textDecoration='underline'; }else{ document.getElementById('noLink').style.textDecoration='none'; } } } function ViewMore(fullText){ document.getElementById('viewAllSent').innerHTML = fullText; } function wishBorderOver(idNo){ document.getElementById('wishDetailList'+idNo).style.border="3px solid #3f2112"; } function wishBorderOut(idNo){ document.getElementById('wishDetailList'+idNo).style.border="3px solid #FFFFFF"; } function showHideHeader(id, status){ var divObj = document.getElementById(id); if(divObj) { if(status == 1) { // document.email.label.value = "Static copy:"; divObj.style.visibility = "hidden"; divObj.style.display = "none"; }else if(status == 2){ // document.email.label.value = "Email:"; divObj.style.visibility = "visible"; divObj.style.display = "block"; } } } function showForgotPass(){ var tabObj = document.getElementById('forgotPassDiv'); var authDiv = document.getElementById('failAuth'); tabObj.style.visibility = "visible"; tabObj.style.display = "block"; authDiv.style.visibility = "hidden"; authDiv.style.display = "none"; tabObj.style.backgroundColor = "#FFFFFF"; // document.getElementById('forg_pass_err_mail').value=""; } function generateNewPassword(emlAddr){ if(emlAddr){ var emailObj = emlAddr; ADAjaxPostData('forgot_pass.php','forgot_pass=1&fpass_email=' + emailObj,'forg_pass_err_mail'); var tabObj = document.getElementById('msgDiv'); tabObj.innerHTML = "Your new password for '"+ emlAddr +"' has been emailed to you."; }else{ var emailObj = document.getElementById('login_email'); if(inlineValidform('memberlogin')){ var tabObj = document.getElementById('forgotPassDiv'); var authDiv = document.getElementById('failAuth'); tabObj.style.visibility = "visible"; tabObj.style.display = "block"; authDiv.style.visibility = "hidden"; authDiv.style.display = "none"; // tabObj.style.backgroundColor = "#4C2E1B"; tabObj.style.backgroundColor = "#FFFFFF"; ADAjaxPostData('forgot_pass.php','forgot_pass=1&fpass_email=' + emailObj.value,'forg_pass_err_mail'); }else{ return false; } } } function cancelForgotPass(){ var tabObj = document.getElementById('forgotPassDiv'); tabObj.style.visibility = "hidden"; tabObj.style.display = "none"; document.memberlogin.login_email.disabled = false; document.memberlogin.login_password.disabled = false; document.memberlogin.login_password.value = ""; document.memberlogin.login_password.focus(); } function cancelAuthFail(){ var tabObj = document.getElementById('failAuth'); tabObj.style.visibility = "hidden"; tabObj.style.display = "none"; document.memberlogin.login_email.disabled = false; document.memberlogin.login_password.disabled = false; document.memberlogin.login_password.value = ""; document.memberlogin.login_password.focus(); } function setDivLayer(divType,prodId){ if (divType==1){ var divObj = document.getElementById('fullDiv'); var innerPopFlash = document.getElementById('catDiv'); var divHeight = '1400'; var screenHeight = window.screen.height; var heightVal; if(divHeight > screenHeight){ heightVal = divHeight; }else{ heightVal = screenHeight } innerPopFlash.style.visibility = 'visible'; innerPopFlash.style.display = 'block'; innerPopFlash.style.top = '400'; innerPopFlash.style.left = '200'; divObj.style.visibility = 'visible'; divObj.style.display = 'block'; divObj.style.height = heightVal; divObj.style.width = (screen.width - 20) +'px'; divObj.style.top = '0px'; divObj.style.left = '0px'; divObj.style.filter = "Alpha(Opacity=75)"; //for IE divObj.style.opacity = "0.75"; //for FF divObj.style.backgroundColor = "#343434"; //ADAjaxPostData('admin_cat_change.php',"adminCat=" + 1 + "&productIdCat=" + prodId, catDiv); }else{ var divObj = document.getElementById('catDiv'); divObj.style.visibility = 'hidden'; divObj.style.display = 'none'; divObj.style.top = '0px'; divObj.style.left = '0px'; var mainDivObj = document.getElementById('fullDiv'); mainDivObj.style.backgroundColor = ""; } } function authenticateUser(){ var frmObj = document.memberlogin; var ajaxVar = new ajaxVars(); ajaxVar.phpFile = "/forgot_pass.php"; ajaxVar.gotoFunction = "returnAuthenication"; ajaxVar.vars['log_email'] = frmObj.login_email.value; ajaxVar.vars['productID'] = frmObj.productID.value; ajaxVar.vars['log_password'] = frmObj.login_password.value; ajaxVar.vars['wishlist'] = frmObj.wishlist.value; ajaxVar.fnVars['prev_page'] = frmObj.prevpage.value; ajaxVar.fnVars['prodURLId'] = frmObj.prodURLId.value; ajaxVar.fnVars['prodURLName'] = frmObj.prodURLName.value; ajaxVar.vars['login_fun'] = 1; ajaxVar.AjaxPostSQL(); } function returnAuthenication(data,fnvars){ if(data>0){ var keySep = (fnvars['prev_page'].indexOf('?') > -1) ? "&" : "?"; url = fnvars['prev_page']; if(fnvars['prodURLId']){ url += '&p_id='+ fnvars['prodURLId']; } if(fnvars['prodURLName']){ url += '&prodname='+ fnvars['prodURLName']; } url += keySep + "loginDone=true"; location.href = url; }else{ authFailedDiv(data); } } function authFailedDiv(data){ document.getElementById('failAuth').style.visibility = "visible"; document.getElementById('failAuth').style.display = "block"; } function hideNameSection(){ if(document.subscribe.subscriberadio.checked == true){ document.getElementById('namesection').style.visibility = "visible"; document.getElementById('namesection').style.display = "block"; }else{ document.getElementById('namesection').style.visibility = "hidden"; document.getElementById('namesection').style.display = "none"; } } function mainPopupImg(data){ var newData = data; var divObj = document.getElementById('innerImg'); while(newData.indexOf('##EQUAL##') > 0){ newData = newData.replace('##EQUAL##', '='); } divObj.align = "center"; divObj.innerHTML = newData; } function showMainImage(){ var bodyObj = document.getElementsByTagName("body")[0]; var divObj = document.createElement('DIV'); divObj.id = 'innerImg'; divObj.style.position = "absolute"; divObj.innerHTML = "Loading image please wait.."; divObj.style.top = "100px"; divObj.style.left = (screen.width/4) +'px'; //divObj.style.width = (screen.width - 22) +'px'; divObj.style.textAlign = "center"; bodyObj.appendChild(divObj); var ajaxVar = new ajaxVars(); ajaxVar.vars['action'] = 'runFunction'; ajaxVar.gotoFunction = "mainPopupImg"; ajaxVar.vars['imgID'] = document.getElementById('main_image_id').value; ajaxVar.vars['action'] = 'runFunction'; ajaxVar.vars['func'] = 'getMainImage'; ajaxVar.AjaxPostSQL(); } function showImagePopup(){ var bodyObj = document.getElementsByTagName("body")[0]; var divObj = document.createElement('DIV'); divObj.id ='lightboxDiv'; divObj.style.top = "0px"; divObj.style.left = "0px"; divObj.style.position = "absolute"; divObj.style.height = (bodyObj.offsetHeight + 200) + 'px'; divObj.style.width = (screen.width - 22) +'px'; divObj.style.filter = "Alpha(Opacity=75)"; //for IE divObj.style.opacity = "0.75"; //for FF divObj.style.backgroundColor = "#343434"; divObj.onclick = function(e){ bodyObj.removeChild(divObj); var divId = document.getElementById('innerImg'); if(divId){ bodyObj.removeChild(divId); } }; bodyObj.appendChild(divObj); showMainImage(); } function removeContentDiv(){ var bodyObj = document.getElementsByTagName("body")[0]; var divObj = document.getElementById('lightboxDiv'); bodyObj.removeChild(divObj); var divObj = document.getElementById('innerImg'); bodyObj.removeChild(divObj); } function removeEmailRow(tableID,rowID){ var tblObj = document.getElementById(tableID); var emlCnt = document.getElementById('email_cont'); var rowObj = document.getElementById(rowID); rowObj.parentNode.removeChild(rowObj); emlCnt.value = tblObj.rows.length; initForm('mailForm'); } function addNewMailAdress(tableID){ var tblObj = document.getElementById(tableID); var totRows= tblObj.rows.length; var emlCnt = document.getElementById('email_cont'); emlCnt.value = totRows; if(emlCnt>0){ document.getElementById('removeBtn').style.visibilty = "visible"; document.getElementById('removeBtn').style.display = "block"; }else{ document.getElementById('removeBtn').style.visibilty = "hidden"; document.getElementById('removeBtn').style.display = "none"; } var rowObj = tblObj.insertRow(totRows); rowObj.id = 'rowNo_' + totRows; var colObj = rowObj.insertCell(0); colObj.className = 'sendWishlistLabel'; colObj.innerHTML = "Email address*:"; rowObj.appendChild(colObj); colObj = rowObj.insertCell(1); colObj.className = 'sendWishlistLabel'; colObj.innerHTML = ""; rowObj.appendChild(colObj); colObj = rowObj.insertCell(2); colObj.className = 'sendWishlistLabel'; colObj.innerHTML = ""; rowObj.appendChild(colObj); emlCnt.value = tblObj.rows.length; initForm('mailForm'); } function createProductList(data,fnVars){ var bodyObj = document.getElementsByTagName("body")[0]; var fieldObj = eval('document.admin.' + fnVars['field_name'] + '_text'); var posX = findPosX(fieldObj); var posY = findPosY(fieldObj); var divObj = document.getElementById('prodList'); if(divObj){ bodyObj.removeChild(divObj); } var divObj = document.createElement('DIV'); divObj.id="prodList"; while(data.indexOf('##EQUAL##') > 0){ data = data.replace('##EQUAL##', '='); } divObj.style.backgroundColor = "#cccccc"; divObj.style.position = "absolute"; divObj.style.width = "300px"; divObj.style.top = parseInt(posY + 20) + 'px'; divObj.style.left= posX + 'px'; divObj.innerHTML = data bodyObj.appendChild(divObj); } function showProductsList(fieldName,event){ var fieldObj = eval('document.admin.' + fieldName + '_text'); var hiddenObj = eval('document.admin.' + fieldName); if(fieldObj.value==""){ hiddenObj.value = ""; } if(fieldObj.value==""){ hideProdList(); return false; } if(event.keyCode!=38 && event.keyCode!=40){ var ajaxVar = new ajaxVars(); ajaxVar.vars['action'] = 'runFunction'; ajaxVar.gotoFunction = "createProductList"; ajaxVar.vars['searchKey'] = fieldObj.value; ajaxVar.vars['action'] = 'runFunction'; ajaxVar.vars['field_name'] = fieldName; ajaxVar.fnVars['field_name'] = fieldName; ajaxVar.vars['func'] = 'getProductList'; ajaxVar.AjaxPostSQL(); } } function showProductsListValue(fieldName,event){ var fieldObj = document.frmsearch.search_box; var hiddenObj = eval('document.frmsearch.' + fieldName); if(fieldObj.value==""){ hiddenObj.value = ""; } if(fieldObj.value==""){ hideProdList(); return false; } if(event.keyCode!=38 && event.keyCode!=40){ var ajaxVar = new ajaxVars(); ajaxVar.vars['action'] = 'runFunction'; ajaxVar.gotoFunction = "createProductListValue"; ajaxVar.vars['searchKey'] = fieldObj.value; ajaxVar.vars['action'] = 'runFunction'; ajaxVar.vars['field_name'] = fieldName; ajaxVar.fnVars['field_name'] = fieldName; ajaxVar.vars['func'] = 'getProductListValue'; ajaxVar.AjaxPostSQL(); } } function createProductListValue(data,fnVars){ var bodyObj = document.getElementsByTagName("body")[0]; var fieldObj = document.frmsearch.search_box; var posX = findPosX(fieldObj); var posY = findPosY(fieldObj); var divObj = document.getElementById('prodList'); if(divObj){ bodyObj.removeChild(divObj); } var divObj = document.createElement('DIV'); divObj.id="prodList"; while(data.indexOf('##EQUAL##') > 0){ data = data.replace('##EQUAL##', '='); } divObj.style.backgroundColor = "#cccccc"; divObj.style.position = "absolute"; divObj.style.width = "300px"; divObj.style.top = parseInt(posY + 20) + 'px'; divObj.style.left= posX + 'px'; divObj.innerHTML = data bodyObj.appendChild(divObj); } function setProductValue(fieldName,keyID,keyValue){ var fieldObj = eval('document.admin.' + fieldName + '_text'); var hiddenObj = eval('document.admin.' + fieldName); hiddenObj.value = keyID; fieldObj.value=keyValue; } function setProductValueNew(fieldName,keyID,keyValue){ var fieldObj = document.frmsearch.search_box; var hiddenObj = document.frmsearch.search_hid_val; hiddenObj.value = keyID; fieldObj.value=keyValue; } function resetValues(fieldName){ var fieldObj = eval('document.admin.' + fieldName + '_text'); var hiddenObj = eval('document.admin.' + fieldName); hiddenObj.value = ""; fieldObj.value=""; } function resetValuesNew(fieldName){ var fieldObj = document.frmsearch.search_box; var hiddenObj = document.frmsearch.search_hid_val; hiddenObj.value = ""; fieldObj.value=""; } function hideProdList(){ var bodyObj = document.getElementsByTagName("body")[0]; var divObj = document.getElementById('prodList'); if(divObj){ bodyObj.removeChild(divObj); } } function showHelpDiv(divobjVal, objVal, totlCnt){ for(var i=0;i