/* Author: BKerkez processAJAXCalls('PRICE'); function needs to be separate for each FILE!!! */ function insertBKMetaTags() { var imageTag=document.createElement('meta'); imageTag.id="FBImage"; imageTag.name = "og:image"; imageTag.property = "og:image"; imageTag.content = "http://www.shadowdeals.com/images/RoundSDLogo6.png"; document.getElementsByTagName('head')[0].appendChild(imageTag); alert("Just appended the tag here!!!"); /* document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); */ } function clearField(field) { // alert("In clearField:"+field.value+":"); field.value = ""; } function logOutAdmin() { alert("Alert: You are logging out as the administrator..."); // similar behavior as an HTTP redirect window.location.replace("../code/processDboardLogout.php"); } /*--------------------------------------------------------------------- For keeping the top CSS menu on th top of browser screen -----------------------------------------------------------------------*/ function isElementInViewport (el) { var rect = el.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */ rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */ ); } /*--------------------------------------------------------------------- For stars and ratings - to be called after stars spans are displayed to assign ratings -----------------------------------------------------------------------*/ $.fn.stars = function() { return $(this).each(function() { // Get the value var val = parseFloat($(this).html()); val = val + 0.16; val = Math.round(val * 6) / 6; // Make sure that the value is in 0 - 5 range, multiply to get width var size = Math.max(0, (Math.min(5, val))) * 16; // Create stars holder var $span = $('').width(size); // Replace the numerical value with stars $(this).html($span); }); } /*--------------------------------------------------------------------- For starting category AND subcategory show .. submits form 'categoryDisplayForm' -----------------------------------------------------------------------*/ function showCategory(e, category) { //alert("In show category: " + category); if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); document.getElementById('currentDisplayCategory').value = category; //alert("In show category...setting currentDisplayCategory to " + document.getElementById('currentDisplayCategory').value ); document.getElementById('categoryDisplayForm').submit(); } function showSubCategory(subcategory, category) { //alert("In show subcategory: " + subcategory); document.getElementById('currentDisplaySubcategory').value = subcategory; document.getElementById('currentDisplayCategory_SUB').value = category; //alert("In show category...setting currentDisplayCategory to " + document.getElementById('currentDisplayCategory').value ); document.getElementById('subcategoryDisplayForm').submit(); } // ---- END ------------------------------------------------------------------- /*--------------------------------------------------------------------- For individual store deals .. submits form 'storeDisplayForm' -----------------------------------------------------------------------*/ function showStore(e, storeName) { //alert("In show store: " + storeName); if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); //alert("In show category: " + category); document.getElementById('currentDisplayStore').value = storeName; document.getElementById('storeDisplayForm').submit(); } /*--------------------------------------------------------------------- For manufacturer deals .. submits form 'manufacturerForm' -----------------------------------------------------------------------*/ function showManufacturer(e, manufacturerName) { //alert("In show currentManufacturer: " + storeName); if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); //alert("In show category: " + category); document.getElementById('currentManufacturer').value = manufacturerName; document.getElementById('manufacturerDisplayForm').submit(); } /*--------------------------------------------------------------------- eneric call to process sort buttons -----------------------------------------------------------------------*/ function sortByParameter(buttonObject, parameterText) { //changeActiveButtonColor(buttonObject); processAJAXCalls(parameterText); } function isMobileDevice() { var isMobile = false; if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 480) { isMobile = true; } return isMobile; //return (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1); }; /******************************************************************** COOKIE SETTING STUFF *********************************************************************/ function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); //document.cookie = cname + "=" + cvalue + "; path=/; " + expires + "; domain=localhost"; document.cookie = cname + "=" + cvalue + "; path=/; " + expires + "; domain=www.shadowdeals.com"; // document.cookie = cname + "=" + cvalue + "; path=/; " + expires + "; domain=173.255.229.205"; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i img").css({"height":"inherit","padding-top":"0"}); $(".leftDealThumbnail").css({"height":"initial", "min-height":"140px"}); $(".deallist-deal-div").css({"min-width":"100%"}); $(".deallist-deal-div").css({"margin":"0 auto", "float":"none"}); $(".deallist-deal-div-left-DIV").css({"border-bottom":"none"}); $(".leftDealRightTextRibbon").css({"position":"absolute", "background":"rgba(220, 220, 220, 0.65) none repeat scroll 0 0", "height":"4em"}); $(".mainDealDisplayLeft").css({"border":"none", "box-shadow":"none", "position":"relative", "flex-direction":"column", "height":"inherit"}); $(".deallist-deal-div").css({"padding-top":"34px"}); $(".deallist-deal-div-right-headline-rating").css({"padding":"7px"}); $(".fullWrapperBottomTile").css({"height":"initial"}); /* $(".fullWrapperBottomTile").css({"flex-direction":"column"}); */ $("#mainDealsAJAXDiv").removeClass("row"); $(".mainDealDisplayLeft").addClass("col-xs-3"); $(".mainDealDisplayLeft").removeClass("col-xs-12"); $(".deallist-deal-div").removeClass("col-xs-12"); $("#deallist-deal-div-left").addClass("row"); $("#deallist-deal-div-left").addClass("row-eq-height"); /*-------------------------------------------------------- END RESET TILES VIEW ---------------------------------------------------------*/ changeCSSDisplay('mainDealDisplayLeft', 'block'); changeCSSDisplay('mainDealDisplayRightMIDDLE', 'block'); changeCSSDisplay('mainDealDisplayRightTOPSecondLine', 'block'); //changeCSSDisplay('thirdBottomCell', 'flex'); changeCSSDisplay('leftDealRightTextRibbon', 'block'); changeCSSDisplay('firstBottomCell', 'flex'); //$(".thirdBottomCell").css({"display":"flex"}); //$(".leftDealRightTextRibbon").css({"display":"block"}); //$(".firstBottomCell").css({"display":"flex"}); $(".leftDealThumbnail > img").css({"max-height":"12em"}); $(".deallist-deal-div div").css({"max-height":"initial"}); $(".deallist-deal-div div").css({"min-height":"initial"}); $(".mainDealDisplayRight").css({"max-height":"12em"}); $(".leftDealThumbnail").css({"min-height":"140px"}); $(".leftDealThumbnail").css({"float":"none"}); $(".leftDealRightTextRibbon").css({"left":"0"}); $(".leftDealRightTextRibbon").css({"position":"absolute"}); $(".leftDealRightTextRibbon").css({"border-top":"none"}); $(".mainDealDisplayRight").css({"height":"12em"}); $(".leftDealThumbnail").css({"min-width":"inherit"}); $(".mainDealDisplayRightTOP").css({"height":"33%"}); $(".mainDealDisplayRightBOTTOM").css({"height":"33%"}); $(".leftDealIconDIV").css({"text-align":"right"}); $(".leftDealsIcon > img").css({"max-height":"initial", "padding-bottom":"0px"}); $(".secondBottomCell").css({"bottom":"4px"}); $(".dailyDealsPrice").css({"font-size":"1.4em"}); $(".dealBottomIcons").css({"top":"inherit"}); $(".dailyDealsFullPrice").css({"font-size":"1em"}); $(".firstBottomCell").css({"bottom":"5px"}); $(".firstBottomCell").css({"white-space":"inherit"}); $(".deallist-deal-div").css({"padding-top":"34px"}); $(".firstBottomCellINNERDIVBOTTOM").css({"height":"1.5em","line-height":"1.5em","bottom":"0"}); $(".leftDealRightText").css({"height":"2.4em", "padding-top":"0"}); $(".deallist-deal-div-right-headline-rating").removeClass("col-xs-12").addClass("col-xs-6"); $(".leftDealIconDIV").removeClass("col-xs-12").addClass("col-xs-6"); $(".firstBottomCell").removeClass("col-xs-8").addClass("col-xs-6"); $(".firstBottomCell").addClass("col-sm-5"); $(".secondBottomCell").removeClass("col-xs-4").addClass("col-md-5"); $(".secondBottomCell").addClass("col-xs-6"); $(".secondBottomCell").addClass("col-sm-7"); $(".secondBottomCell").removeClass("col-sm-5"); $(".deallist-deal-div-right-headline-rating").removeClass("shrink50"); $(".secondBottomCellINNERTOP").removeClass("shrink75"); $(".dealBottomIcons").removeClass("shrink50"); var dealDivs = document.getElementsByClassName('deallist-deal-div'); for(i=0; i img").css({"height":"inherit","padding-top":"0"}); $(".leftDealThumbnail").css({"height":"initial", "min-height":"140px"}); $(".deallist-deal-div").css({"min-width":"100%"}); $(".deallist-deal-div").css({"margin":"0 auto", "float":"none"}); $(".deallist-deal-div-left-DIV").css({"border-bottom":"none"}); $(".leftDealRightTextRibbon").css({"position":"absolute", "background":"rgba(255, 255, 255, 0.65) none repeat scroll 0 0", "height":"4em"}); $(".leftDealRightTextRibbon").css({"border-top":"none"}); $(".mainDealDisplayLeft").css({"border":"none", "box-shadow":"none", "position":"relative", "flex-direction":"column", "height":"inherit"}); $(".deallist-deal-div").css({"padding-top":"34px"}); $(".deallist-deal-div-right-headline-rating").css({"padding":"7px"}); $(".fullWrapperBottomTile").css({"height":"initial"}); /* $(".fullWrapperBottomTile").css({"flex-direction":"column"}); */ $(".leftDealRightTextUserInfo").css({"display":"none"}); $(".leftDealRightText").css({"height":"2em", "padding-top":"1px"}); $("#mainDealsAJAXDiv").removeClass("row"); $(".mainDealDisplayLeft").addClass("col-xs-3"); $(".mainDealDisplayLeft").removeClass("col-xs-12"); $(".deallist-deal-div").removeClass("col-xs-12"); $("#deallist-deal-div-left").addClass("row"); $("#deallist-deal-div-left").addClass("row-eq-height"); /*-------------------------------------------------------- END RESET TILES VIEW ---------------------------------------------------------*/ changeCSSDisplay('mainDealDisplayRight', 'block'); changeCSSDisplay('tilesViewTitleDIV', 'none'); changeCSSDisplay('mainDealDisplayLeft', 'block'); changeCSSDisplay('mainDealDisplayRightMIDDLE', 'none'); changeCSSDisplay('mainDealDisplayRightTOPSecondLine', 'none'); $(".leftDealRightTextRibbon").css({"display":"block"}); $(".firstBottomCellINNERDIVTOP").css({"display":"inline-block"}); $(".firstBottomCell").css({"display":"block"}); $(".firstBottomCellINNERDIVBOTTOM").css({"display":"inline-block"}); //$(".leftDealThumbnail > img").css({"background-color":"red"}); $(".leftDealThumbnail > img").css({"max-height":"4em"}); $(".deallist-deal-div div").css({"max-height":"5em"}); $(".deallist-deal-div div").css({"min-height":"inherit"}); $(".mainDealDisplayRight").css({"max-height":"4em"}); $(".leftDealThumbnail").css({"min-height":"inherit"}); $(".leftDealThumbnail").css({"float":"left"}); $(".leftDealRightTextRibbon").css({"left":"inherit"}); $(".leftDealThumbnail").css({"min-width":"50%"}); $(".leftDealRightTextRibbon").css({"position":"relative"}); $(".mainDealDisplayRight").css({"height":"inherit"}); $(".mainDealDisplayRightTOP").css({"height":"50%"}); $(".mainDealDisplayRightBOTTOM").css({"height":"50%"}); $(".leftDealIconDIV").css({"text-align":"center", "padding-bottom":"8px"}); $(".leftDealsIcon > img").css({"max-height":"25px"}); $(".secondBottomCell").css({"bottom":"inherit"}); $(".dailyDealsPrice").css({"font-size":"1em"}); $(".dealBottomIcons").css({"white-space":"nowrap"}); $(".dealBottomIcons").css({"top":"0"}); $(".firstBottomCell").css({"bottom":"inherit"}); $(".firstBottomCellINNERDIVBOTTOM").css({"height":"1.1em"}); $(".firstBottomCellINNERDIVBOTTOM").css({"line-height":"1.2em"}); $(".dailyDealsFullPrice").css({"font-size":"0.8em"}); $(".firstBottomCell").css({"white-space":"nowrap"}); $(".deallist-deal-div").css({"padding-top":"14px"}); $(".leftDealIconDIV").removeClass("col-xs-6").addClass("col-xs-12"); $(".deallist-deal-div-right-headline-rating").addClass("shrink50"); $(".firstBottomCell").removeClass("col-sm-5").addClass("col-xs-8"); $(".firstBottomCell").removeClass("col-xs-6"); $(".secondBottomCell").removeClass("col-sm-5").addClass("col-xs-4"); $(".secondBottomCell").removeClass("col-xs-6"); $(".secondBottomCell").removeClass("col-sm-7"); $(".thirdBottomCell").css({"display":"none"}); $(".secondBottomCellINNERTOP").addClass("shrink75"); $(".dealBottomIcons").addClass("shrink50"); $(".deallist-deal-div-right-headline-rating").removeClass("col-xs-6").addClass("col-xs-12"); var dealDivs = document.getElementsByClassName('deallist-deal-div'); for(i=0; i img").css({"height":"90px","padding-top":"5px"}); $(".leftDealRightTextRibbon").css({"position":"absolute", "background":"#fff", "height":"3em"}); $(".leftDealRightTextRibbon").css({"border-top":"1px solid #eee"}); $(".leftDealThumbnail").css({"height":"90px", "min-height":"90px"}); $(".mainDealDisplayLeft").css({"border":"1px solid #888888", "box-shadow":"3px 2px 4px #888888", "position":"absolute", "flex-direction":"column", "height":"100%"}); $(".deallist-deal-div-left-DIV").css({"border-bottom":"none"}); $(".deallist-deal-div").css({"min-width":"inherit"}); $(".deallist-deal-div").css({"margin":"0 auto", "float":"none"}); $(".deallist-deal-div-right-headline-rating").css({"padding-top":"5px","padding-left":"5px"}); $(".fullWrapperBottomTile").css({"flex-direction":"column", "height":"100%"}); $(".deallist-deal-div").css({"padding-top":"14px"}); $(".leftDealRightTextUserInfo").css({"display":"none"}); $(".leftDealRightText").css({"height":"3em", "padding-top":"4px"}); $("#mainDealsAJAXDiv").addClass("row"); $(".mainDealDisplayLeft").removeClass("col-xs-3"); $(".mainDealDisplayLeft").addClass("col-xs-12"); $(".deallist-deal-div").addClass("col-xs-12"); $("#deallist-deal-div-left").removeClass("row"); $("#deallist-deal-div-left").removeClass("row-eq-height"); var dealDivs = document.getElementsByClassName('deallist-deal-div'); for(i=0; i img").css({"background-color":"red"}); $(".leftDealThumbnail > img").css({"max-height":"12em"}); $(".leftDealThumbnail").css({"float":"none"}); $(".deallist-deal-div div").css({"max-height":"initial"}); $(".deallist-deal-div div").css({"min-height":"initial"}); //$(".mainDealDisplayRight").css({"max-height":"4em"}); $(".leftDealThumbnail").css({"min-height":"90px"}); $(".leftDealThumbnail").css({"min-width":"inherit"}); $(".leftDealRightTextRibbon").css({"left":"0"}); $(".leftDealRightTextRibbon").css({"position":"absolute"}); $(".deallist-deal-div:hover .leftDealRightTextRibbon").css({"background":"rgba(255, 255, 255, 1.0) none repeat scroll 0 0 !important"}); $(".leftDealIconDIV").css({"text-align":"right", "padding-bottom":"0px"}); /* $(".mainDealDisplayRight").css({"height":"inherit"}); $(".mainDealDisplayRightTOP").css({"height":"50%"}); $(".mainDealDisplayRightBOTTOM").css({"height":"50%"}); $(".leftDealsIcon > img").css({"max-height":"25px"}); $(".secondBottomCell").css({"bottom":"inherit"}); $(".dailyDealsPrice").css({"font-size":"1em"}); $(".dealBottomIcons").css({"white-space":"nowrap"}); $(".dealBottomIcons").css({"top":"0"}); $(".firstBottomCell").css({"bottom":"inherit"}); $(".firstBottomCellINNERDIVBOTTOM").css({"height":"1.1em"}); $(".firstBottomCellINNERDIVBOTTOM").css({"line-height":"1.2em"}); $(".dailyDealsFullPrice").css({"font-size":"0.8em"}); $(".firstBottomCell").css({"white-space":"nowrap"}); $(".deallist-deal-div").css({"padding-top":"14px"}); */ $(".leftDealIconDIV").removeClass("col-xs-12").addClass("col-xs-6"); $(".deallist-deal-div-right-headline-rating").removeClass("shrink50"); $(".firstBottomCell").removeClass("col-xs-8").addClass("col-sm-5"); $(".firstBottomCell").addClass("col-xs-6"); $(".secondBottomCell").removeClass("col-xs-4").addClass("col-sm-5"); $(".secondBottomCell").addClass("col-xs-6"); $(".secondBottomCell").removeClass("col-sm-7"); $(".secondBottomCellINNERTOP").removeClass("shrink75"); $(".dealBottomIcons").removeClass("shrink50"); $(".deallist-deal-div-right-headline-rating").addClass("col-xs-6").removeClass("col-xs-12"); /***** END RESET ROW STUFF BELOW *****/ } else { alert ('Cannot determine the desired view! Switching to classic view now...'); } //processAJAXCalls(parameterText); } /*--------------------------------------------------------------------- For AJAX - get HTTP Request object -----------------------------------------------------------------------*/ function getXMLHTTPRequest() { var request = false; try { request = new XMLHttpRequest(); /* e.g. Firefox */ } catch(err1) { try { vrequest = new ActiveXObject("Msxml2.XMLHTTP"); /* some versions IE */ } catch(err2) { try { request = new ActiveXObject("Microsoft.XMLHTTP");/* some versions IE */ } catch(err3) { request = false; } } } return request; } /*--------------------------------------------------------------------- For sort order uttons - when changed -----------------------------------------------------------------------*/ function changeActiveButtonColor(buttonObject, direction) { buttonsArray = document.getElementsByName("sortDealsButton"); var nextToggleArrowValue = ""; var buttonText; for (var i=0; i"); if (indexOfStrong == -1) { alert ("couldn't find indexOfStrong...exiting..." + innerButtonText); return; } if (direction == "ASC") //buttonObject.innerHTML = innerButtonText.substring(0, indexOfStrong + 8) + " ↑" + innerButtonText.substring(indexOfStrong + 8); buttonObject.innerHTML = innerButtonText.substring(0, indexOfStrong + 8) + " ↑" + innerButtonText.substring(indexOfStrong + 8); else buttonObject.innerHTML = innerButtonText.substring(0, indexOfStrong + 8) + " ↓" + innerButtonText.substring(indexOfStrong + 8); /* //alert("Index of :" + indexOfStrong + ", and part b4:" + innerButtonText.substring(0, indexOfStrong + 8) + ", and part after:" + innerButtonText.substring(indexOfStrong + 8)); if (nextToggleArrowValue == "") { // check to see if it is price...ascending default sort if (buttonObject.id == "priceSortButton") buttonObject.innerHTML = innerButtonText.substring(0, indexOfStrong + 8) + " ↑" + innerButtonText.substring(indexOfStrong + 8); else buttonObject.innerHTML = innerButtonText.substring(0, indexOfStrong + 8) + " ↓" + innerButtonText.substring(indexOfStrong + 8); } else { buttonObject.innerHTML = innerButtonText.substring(0, indexOfStrong + 8) + " " + nextToggleArrowValue + innerButtonText.substring(indexOfStrong + 8); //alert(innerButtonText.substring(0, indexOfStrong + 8) + " START" + nextToggleArrowValue + "END " + innerButtonText.substring(indexOfStrong + 8)); } //buttonObject.className = "sort_button_clicked"; */ $(buttonObject).removeClass("sort_button"); $(buttonObject).addClass("sort_button_clicked"); } /*--------------------------------------------------------- For JS Validation of deal input -------------------------------------------------------------------*/ if(!String.prototype.trim){ String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g,''); }; } // If the element's string matches the regular expression it is all numbers function isNumeric(elem, helperMsg){ //alert ("isNumeric, val is:"+elem.value+":"); var numericExpression = /^-?(?:\d+|\d*\.\d+)$/;// /^[0-9]+$/; if((elem.value.trim()).match(numericExpression)){ return true; }else{ alert(helperMsg); elem.focus(); return false; } } function validateInputData123(e) { alert("In here 123!"); //e.cancelBubble=true; return false; } function validateInputData() { //alert("I validateInputData"); var introText = document.getElementById('dealDescriptionIntroTextAreaDIV').innerHTML; //var mainText = document.getElementById('dealDescriptionMainTextAreaDIV').innerHTML; // var mainText = CKEDITOR.instances.dealDescriptionMainTextAreaDIV.getData(); // CKEDITOR.instances.dealDescriptionMainTextAreaDIV.destroy(); var mainText = document.getElementById('dealDescriptionMainTextAreaDIV').innerHTML; var psElement = document.getElementById('dealDescriptionPSTextAreaDIV'); var psText = ""; if (psElement) psText = document.getElementById('dealDescriptionPSTextAreaDIV').innerHTML; //alert("intro txt:"+introText); //return false; introText = introText.split('255) { alert("Link has more than 255 characters, please fix it before proceeding any further. There are " + link.length + " characters in your link."); var res = link.focus(); return false; } var mobilelink=document.forms["processDealInputForm"]["dealMobileLink"].value.trim(); if (mobilelink==null || mobilelink=="") { alert("Mobile Link must be filled out"); mobilelink.focus(); return false; } else if (mobilelink.length>255) { alert("MobileLink has more than 255 characters, please fix it before proceeding any further. There are " + mobilelink.length + " characters in your link."); var res = mobilelink.focus(); return false; } var intro=document.forms["processDealInputForm"]["dealDescriptionIntroTextArea"].value.trim(); if (intro==null || intro=="") { alert("Intro decsription must be filled out"); return false; } var main=document.forms["processDealInputForm"]["dealDescriptionMainTextArea"].value.trim(); if (main==null || main=="") { alert("Main area must be filled out"); return false; } var expiry=document.forms["processDealInputForm"]["expirationDate"].value.trim(); if (expiry==null || expiry=="") { alert("Expiration date must be filled out"); return false; } //alert ("In valdating Input Data"); return true; } function expirationDateChanged(dateField) { // var dt = $(datefield).val(); var tmp = document.getElementById('expirationDate').value; var diff = Math.floor(( Date.parse(tmp) - (new Date()) ) / 86400000) + 1 ; //alert("Changing the expiration date to "+tmp+"; "+diff+" days from today."); var txt = " " + diff + " days from today"; document.getElementById('expirationDateLabel').value = txt; } var isMusicPlayerOn = false; function toggleMusicPlayer() { if (!isMusicPlayerOn) { $(".footerAudioPlayer").css({"display":"block"}); document.getElementById('myPlayer').play() isMusicPlayerOn = true; } else { $(".footerAudioPlayer").css({"display":"none"}); document.getElementById('myPlayer').pause() isMusicPlayerOn = false; } } function ignoreAHREFLink() { return false; } function stopEventBubble(event) { if (event.stopPropagation){ event.stopPropagation(); } else if(window.event){ window.event.cancelBubble=true; } } function openExternalDeal(e, dealID, linkToDeal, currentPageLink, pathToRoot) { linkToDeal = (linkToDeal.indexOf('://') === -1) ? 'http://' + linkToDeal: linkToDeal; window.open(linkToDeal, "_blank"); //window.location.href = linkToDeal; //alert ('Opened External Deal!!!'); if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); var dealUser = 'unknown'; // now fire up ajax request to log this deal opening dealUser = 'dr5fvikoj8aiogl1udu4ae7mc3';var userIPAddress = '18.218.234.83'; //alert("path:" + pathToRoot + "/code/logExternaDealClick.php"); $.ajax({ method: "POST", url: pathToRoot + "/code/logExternaDealClick.php", dataType: "html", data: { dealID: dealID, time: '2024-04-27 02:15:03', linkToDeal: linkToDeal, linkFrom: currentPageLink, userID: dealUser, userIP: userIPAddress } }) /*.done(function( msg ) { alert( "Data Saved: " + msg); }) .fail(function( msg ) { alert( "Data Saving failed!: " + msg.responseText);//JSON.stringify(msg)); }) */ ; return false; } function openInternalDeal(e, linkToDeal, pathToRoot, dealID) { window.open(linkToDeal, "_self"); //window.location.href = linkToDeal; //alert ('121'); if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); var dealUser = 'unknown'; // now fire up ajax request to log this deal opening dealUser = 'dr5fvikoj8aiogl1udu4ae7mc3';var userIPAddress = '18.218.234.83'; //alert("path:" + pathToRoot + "/code/logInternaDealClick.php"); $.ajax({ method: "POST", url: pathToRoot + "/code/logInternaDealClick.php", dataType: "html", data: { dealID: dealID, time: '2024-04-27 02:15:03', userID: dealUser, userIP: userIPAddress } }) /*.done(function( msg ) { alert( "Data Saved: " + msg); }) .fail(function( msg ) { alert( "Data Saving failed!: " + msg.responseText);//JSON.stringify(msg)); }) */ ; return false; } function goToDealComment(dealID, commentID, pathToRoot) { //alert("CommentID:" + commentID + ", dealID:" + dealID + ", path:" + pathToRoot); window.location.href = pathToRoot + "code/DisplayDeal.php?id=" + dealID + "#mainCommentDisplayDIV_" + commentID; }