Aguarde.... Em breve, novo site da Gas Expert.





Telefones: 5588-3375 / 5021-4627 - Endereco: Rua Getulio Vargas Filho, 301 - Sao Paulo - SP - Cep: 04318-030
_________________________________________________________________________________________________________________________ if (typeof wm_indiv_stats == 'undefined') { wm_indiv_stats = new Object(); // object to add the individual parameters } (function(){ /** * Creates the wiredminds literal object and returns it. * * @return object */ function getWiredMinds() { var wiredminds = { getlist : "", www_server : "www.count.carrierzone.com", app_server : "www.count.carrierzone.com", cnt_server : "count.carrierzone.com", app_server_proto : "", cnt_server_proto : "", numberOfCalls : 0, wm_track_url : "", wm_track_alt : "", wm_cvid : 0, placeOverlay : false, placeHeatmap : false, placeOverlayMenu : false, overlayKeyLength : 32, wm_page_name_value : null, ovk : null, overlayScriptUrl : '', validateUrl : '', still_alive_interval : 5000, // msecs! still_alive_time_max : 30*60*1000, // msecs! still_alive_time_remaining : 0, still_alive_request : false, use_image_container : true, wm_use_ic : 0, cntParamContainer: {}, getOverlayScriptUrl : function (){ var proto = wiredminds.getProtoApp(); return proto+'//' + wiredminds.app_server + '/app/frontend/Ajax/overlay/OverlayManager.php?objMethod=loadScript'; }, getValidateUrl : function (){ var proto = wiredminds.getProtoApp(); return proto+'//' + wiredminds.app_server + '/app/frontend/Ajax/overlay/OverlayManager.php?objMethod=validateExternalKey'; }, createRandomKey : function () { var keyLenght = 16; var now = new Date(); var outputStr = ''; var inputNum = now.getTime(); inputNum = inputNum.toString(); var newInputNum = 0; var conStr = ''; var partition = 3; while (outputStr.length < keyLenght) { // Add random value if (inputNum.length==0) { do { newInputNum = Math.round(Math.random()*123); } while (newInputNum<48 || newInputNum>57 && newInputNum<65 || newInputNum>80 && newInputNum<97 || newInputNum>122); inputNum = newInputNum.toString(); } // Separate numbers out of string partition = 3; do { conStr = parseInt(inputNum.substr(0, partition)); partition--; } while ((conStr<48 || conStr>57 && conStr<65 || conStr>80 && conStr<97 || conStr>122) && partition>0); inputNum = inputNum.substr(partition+1); // Convert and add new character if (conStr<48 || conStr>57 && conStr<65 || conStr>80 && conStr<97 || conStr>122) { outputStr += conStr.toString(); } else { outputStr += String.fromCharCode(conStr); } } if (outputStr.length > keyLenght) { outputStr = outputStr.substr(0, keyLenght); } return outputStr; }, get_GET_value:function ( get_param_name ) { if (!window) {return '';} if (!window.location) {return '';} if (!window.location.search) {return '';} var search=window.location.search.substr(1); var assignments=search.split('&'); for( var i=0; i 0) || wiredminds.use_image_container ) { var CT_container=new Image(); CT_container.src=WMCT_URL; } else { //NOTE: Important to first insert the node before assigning innerHTML, because IE(6) would count twice otherwise! var ndDiv=document.createElement('div'); var bodyEl = document.getElementsByTagName('body')[0]; ndDiv = bodyEl.insertBefore(ndDiv, bodyEl.firstChild); ndDiv.innerHTML='' + wiredminds.wm_track_alt + ''; } wiredminds.numberOfCalls++; }, countpix : function (pixcode) { wiredminds.setTrackParam('wm_pixelcode', pixcode); wiredminds.count(); }, count_flash : function (flashArgs) { if ( typeof(flashArgs) != 'string') { return; } if ( flashArgs == '') { return; } if ( flashArgs.substr(0,1) == '&') { flashArgs='t2=1'+flashArgs; } wiredminds.count_URL(flashArgs); }, getPageName : function (ext){ // auto-detect page name, if necessary if (wiredminds.getTrackParam('wm_page_name') === null) { //Decode to make sure it does not get double encoded var wm_page_name_value = decodeURIComponent(document.location.pathname); // replace '/' with '|' wm_page_name_value = wm_page_name_value.replace(/^\/*/, ''); wm_page_name_value = wm_page_name_value.replace(/\/*$/, ''); wm_page_name_value = wm_page_name_value.replace(/\//g, '|'); } else { var wm_page_name_value = wiredminds.getTrackParam('wm_page_name'); } if (typeof(ext) == 'string') { wm_page_name_value+='|'+ext; } return wm_page_name_value; }, internalCount : function (ext) { //If wm_use_ic is greater than 0, it was set and ic should be stored if ((wiredminds.getInternParam("wm_use_ic") > 0)) { //So first check if the IC snippet was included try { if ((typeof ic_options !== 'undefined')) { if ((typeof ic !== 'undefined') && (typeof ic.pagetrackId !== 'undefined')) { //IC snippet is loaded and got a visitor id, so store it to defined indiv param var icParamVal = ic.clientInfo.company.name+'#user:'+ic.gUsers[ic.activeUserId].login; wiredminds.setIndivParam('wm_visit_'+wiredminds.getInternParam("wm_use_ic"), icParamVal); } else { //Wait a while for IC snippet if (isNaN(ic_options.wired_minds_count)) { ic_options.wired_minds_count = 0; } ic_options.wired_minds_count++; // We give IC 1000ms to load if (ic_options.wired_minds_count <= 5) { setTimeout(function() { wiredminds.internalCount(ext); }, 200); return; } } } } catch (e) { //Ignore and go on } } var myDate = new Date(); wiredminds.getlist="t="+myDate.getTime(); // Clear/Initialize the get list. // NOTE: Clearing the getlist is a must! // Otherwise subsequent calls to count // (e.g. by using onClick="") would // append their values to the old get list. // First the required parameters if ( wiredminds.getTrackParam('wm_custnum') !== null) { wiredminds.add_to_list('custnum',wiredminds.getTrackParam('wm_custnum')); } else { return; // no customer number given, do nothing } // auto-detect sname, if necessary if ( wiredminds.getTrackParam('wm_sname') === null ) { wiredminds.setTrackParam('wm_sname', document.location.hostname); } wiredminds.add_to_list('sname',wiredminds.getTrackParam('wm_sname')); wiredminds.add_to_list('pagename',this.getPageName(ext)); // auto-detect group name, if necessary // only auto-detect if no group AND page name was explicitly set, // if a page name was set, the group name will be derrived from it in the ctin.php if ((wiredminds.getTrackParam('wm_group_name') === null) && (wiredminds.getTrackParam('wm_page_name') === null)) { //Decode to make sure it does not get double encoded wiredminds.setTrackParam('wm_group_name', decodeURIComponent(document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')))); } if (wiredminds.getTrackParam('wm_group_name') !== null) { wiredminds.add_to_list('group', wiredminds.getTrackParam('wm_group_name')); } if ( this.still_alive_request == true) { wiredminds.add_to_list('still_alive',1); } // Then the optional parameters // Note: The optional parameters first get collected and added // afterwards to the getlist to better control their order. if (wiredminds.getTrackParam('wm_version') === null) { wiredminds.setTrackParam('wm_version', '$Rev: 7840 $'); } if (wiredminds.getTrackParam('wm_resolution') === null) { wiredminds.setTrackParam('wm_resolution', screen.width + "x" + screen.height); } if (wiredminds.getTrackParam('wm_color_depth') === null) { var wm_color_depth = navigator.appName != 'Netscape' ? screen.colorDepth : screen.pixelDepth; wiredminds.setTrackParam('wm_color_depth', wm_color_depth); } if (wiredminds.getTrackParam('wm_plugin_list') === null) { var wm_plugin_list = ""; for( var i=0; i 0) { setTimeout("wiredminds.sendStillAlive()", this.still_alive_interval); } } }, activateStillAlive : function() { if(this.placeOverlayMenu == false){ this.still_alive_time_remaining=this.still_alive_time_max; setTimeout("wiredminds.sendStillAlive()", this.still_alive_interval); } }, /** * Event Tracking * @param string eventStr */ trackEvent: function(eventStr){ if(this.placeOverlayMenu == false){ if ((typeof(eventStr) == 'undefined') && (eventStr != '')){ return; // no event string given, do nothing } var myDate = new Date(); wiredminds.getlist = "t="+myDate.getTime(); // Clear/Initialize the get list. // NOTE: Clearing the getlist is a must! // Otherwise subsequent calls to count // (e.g. by using onClick="") would // append their values to the old get list. // First the required parameters if (wiredminds.getTrackParam('wm_custnum') !== null) { wiredminds.add_to_list('custnum',wiredminds.getTrackParam('wm_custnum')); } else { return; // no customer number given, do nothing } wiredminds.add_to_list('wm_event', eventStr); wiredminds.count_URL(wiredminds.getlist); } }, /** * Sets param into the cntParamContainer dataset used for tracking. * * @param string paramName The paramName to set * @param mixed paramValue The paramValue to set * @return void */ setTrackParam: function(paramName, paramValue) { wiredminds['cntParamContainer'][paramName] = paramValue; }, /** * Gets param from the cntParamContainer dataset used for tracking. * * @param string paramName The paramName to get * @return mixed */ getTrackParam: function(paramName) { //First check if the param is set internally if (typeof wiredminds['cntParamContainer'][paramName] != 'undefined') { return wiredminds['cntParamContainer'][paramName]; } //To be backwards compatible, also check for global variable if (typeof window[paramName] != 'undefined') { return window[paramName]; } return null; }, /** * Sets internal params directly in the wiredminds object. * * @param string paramName The paramName to set * @param mixed paramValue The paramValue to set * @return void */ setInternParam: function(paramName, paramValue) { wiredminds[paramName] = paramValue; }, /** * Gets internal params directly from the wiredminds object. * * @param string paramName The paramName to get * @return mixed */ getInternParam: function(paramName) { if (typeof wiredminds[paramName] != 'undefined') { return wiredminds[paramName]; } return null; }, /** * Sets the given param for the indiv stats. * * @param string paramName The paramName to set * @param mixed paramValue The paramValue to set * @return void */ setIndivParam: function(paramName, paramValue) { //Create object if it does not yet exist if (typeof wiredminds['cntParamContainer']['wm_indiv_stats'] != 'object') { wiredminds['cntParamContainer']['wm_indiv_stats'] = new Object(); // object to add the individual parameters } wiredminds['cntParamContainer']['wm_indiv_stats'][paramName] = paramValue; }, /** * Gets the given param from the indiv stats. * * @param string paramName The paramName to get * @return mixed */ getIndivParam: function(paramName) { //First check if the param is set internally if ((typeof wiredminds['cntParamContainer']['wm_indiv_stats'] == 'object') && (typeof wiredminds['cntParamContainer']['wm_indiv_stats'][paramName] != 'undefined')) { return wiredminds['cntParamContainer']['wm_indiv_stats'][paramName]; } //To be backwards compatible, also check for global variable if ((typeof window['wm_indiv_stats'] != 'undefined') && (typeof window['wm_indiv_stats'][paramName] != 'undefined')) { return window['wm_indiv_stats'][paramName]; } return null; }, /** * Mimics Array.push function, but instead of adding the given arguments to an array, * it checks if a function for value at pos 0 exists and if so, it calls it and * applies the other elements as arguments to it. * NOTE: Expects an array to be given, other data types will be ignored. * Example: push(['functionName', param1, param2]) * * @return integer */ push: function() { var called = 0; var args = arguments; if (args.length > 0) { for (var i=0; i client_h) && (click_x > (client_w - scrollbarWidth))) { return; } // Add the width/height of scroll to coordinate click_x = click_x + scrollx; click_y = click_y + scrolly; /** * If wm_content_width provided content is centered, we need to calculate the mouse position relative to content width. * Else content is left aligned, no need to modify mouse position. */ var click_x_orig = click_x; var wm_content_width = wiredminds.getTrackParam('wm_content_width'); if (wm_content_width !== null){ wm_content_width = parseInt(wm_content_width); if (!isNaN(wm_content_width) && (wm_content_width <= body_w)){ click_x = (click_x - (body_w - wm_content_width)/2 ); } } var page_name = wiredminds.getPageName(); var params = new Array( 'custnum=' + wiredminds.getTrackParam('wm_custnum'), 'pagename=' + encodeURIComponent(page_name), 'cx=' + Math.round(click_x), 'cy=' + Math.round(click_y), 'body_height=' + Math.round(body_h), 'browser=' + browser ); if (wm_content_width !== null){ if (!isNaN(wm_content_width) && (wm_content_width > 0)){ max_allowed_x = ((body_w - wm_content_width)/2) + wm_content_width; params.push('content=' + parseInt(wm_content_width)); } } // send request if ((click_x > 0) && (click_x_orig < max_allowed_x)){ var proto = wiredminds.getProto(); var count_heat_URL = proto + '//' + wiredminds.cnt_server + wiredminds.cnt_path; var heatmap_container = new Image(); heatmap_container.src=count_heat_URL + '?' + params.join('&'); } }, /** * Get the width of scrollbar * */ getScrollbarWidth: function() { var scr = null; var inn = null; var wNoScroll = 0; var wScroll = 0; // Outer scrolling div scr = document.createElement('div'); scr.style.position = 'absolute'; scr.style.top = '-1000px'; scr.style.left = '-1000px'; scr.style.width = '100px'; scr.style.height = '50px'; // Start with no scrollbar scr.style.overflow = 'hidden'; // Inner content div inn = document.createElement('div'); inn.style.width = '100%'; inn.style.height = '200px'; // Put the inner div in the scrolling div scr.appendChild(inn); // Append the scrolling div to the doc document.body.appendChild(scr); // Width of the inner div sans scrollbar wNoScroll = inn.offsetWidth; // Add the scrollbar var browser = wiredminds.getBrowser(); if (browser.search(/IE/) != -1) { scr.style.overflow = 'scroll'; } else { scr.style.overflow = 'auto'; } // Width of the inner div width scrollbar wScroll = inn.offsetWidth; // Remove the scrolling div from the doc document.body.removeChild(document.body.lastChild); // Pixel width of the scroller return (wNoScroll - wScroll); }, /** * Register heatmaps getClick event to given event type. */ registerHeatmapEvent: function(eventType) { var eventHandlerName = 'getClick'; if (typeof wiredminds[eventHandlerName] === 'function') { if (document.addEventListener) { document.addEventListener(eventType, wiredminds[eventHandlerName], false); } else if (document.attachEvent){ var ieEventType = 'on'+eventType; document.attachEvent(ieEventType, wiredminds[eventHandlerName]); } } }, /** * Detect the browsers the clickers used to view page. * TODO: Moment take care the function only 4 Browsers: IE6/IE7/IE8/IE9/FF */ getBrowser: function() { var version = navigator.appVersion; if (version.search(/MSIE 6/i) != -1) return "IE6"; if (version.search(/MSIE 7/i) != -1) return "IE7"; if (version.search(/MSIE 8/i) != -1) return "IE8"; if (version.search(/MSIE 9/i) != -1) return "IE9"; if (version.search(/MSIE/i) == -1) return "Others"; } /**** END HEATMAP PART ****/ }; return wiredminds; } /** * Initializes the wiredminds object if an wiredminds array exists */ function initWMObj() { //If it is not yet our object, but an array. Then save the array, create our object and pass the array to our push function. if (typeof wiredminds != 'undefined' && typeof wiredminds.push=="function" && wiredminds.constructor==Array) { var wiredmindsObj = getWiredMinds(); wiredmindsObj.push.apply(wiredmindsObj, wiredminds); wiredminds = wiredmindsObj; } else { if (typeof wiredminds == 'undefined') { wiredminds = getWiredMinds(); } } } //Init the object initWMObj(); })(); function click_track(ext) { wiredminds.push(['count', ext]); } /** * Catch click for Heatmap * */ var getClick = function(e){ wiredminds.push(['getClick', e]); }