/* taken from http://msx.kowabunga.net/1.js.php 4/7/2008 */
function Vc(service_url, debug_level, dev_stage){if(typeof(vc_track_run) == 'undefined'){vc_track_run = true;this.debug_level = (debug_level > 1) ? debug_level : 0;this.debug = (this.debug_level > 1) ? true: false;this.dev_stage = (dev_stage) ? dev_stage : 'live';if(this.debug){try{this.js_debug = new Js_Debug(this.debug_level, this.dev_stage);}catch(e){this.js_debug = null;this.debug = false;alert('Vc: Debug is turned on, but Js_Debug class is not available.\n\nTurning debug off.');}}this.idk = 'guid';var d = new Date();this.init_time = d.getTime();this.imp_code = this.init_time.toString() + '_' + Math.random().toString().substr(2);this.init = false;this.event_list = [];this.mv = false;this.mouse_trail = new Array();this.mo_reg = new Array();this.mc_reg = new Array();vc_inst = this;mmv_Event = function(){vc_inst.mouse_trail[vc_inst.mouse_trail.length] = this.clientX + ',' + this.clientY;if(vc_inst.init){vc_inst.mv = true;}};this._add_Event(document, 'mousemove', mmv_Event);this.service_url = service_url;this.call_q = new Object();this._init();}};Vc.prototype._init = function(){if(!this.init){var uids = this._get_Ids();if(uids.length > 0){try{this._send({'ids' : uids, 'win' : this._win_Size(), 'referrer' : this._referrer(), 'pwin' : this._parent_Title(), 'cookie' : this._cookie()});this.init = true;}catch(e){}}else{}}};Vc.prototype._reg = function(link_obj){var success = false;if(this.init && this.mv){var id = v9_GetVCLinkGuid(link_obj);if(!this._is_Event_Fired(id, this.mc_reg) && !this._is_Event_Fired(id, this.mo_reg)){try{if(!this._send({'mo' : id})){}else{success = true;this._event_Fired(id, this.mo_reg);this._remove_Event(link_obj, 'mouseover', mo_Event);}}catch(e){}}}return success;};Vc.prototype.Mc = function(link_obj){var success = false;if(this.init && this.mv){var id = v9_GetVCLinkGuid(link_obj);if(!this._is_Event_Fired(id, this.mc_reg)){try{if(!this._send({'mc' : id})){}else{success = true;this._event_Fired(id, this.mc_reg);}}catch(e){}}}return success;};Vc.prototype._get_Ids = function(){var link_ids = new Array();var vc_inst = this;mo_Event = function(){vc_inst._reg(this);};var link_length = vcLinkArray.length;for(var i = 0; i < link_length; i++){link_ids[link_ids.length] = vcLinkArray[i][1];this._add_Event(vcLinkArray[i][0], 'mouseover', mo_Event);}if(link_ids.length > 0){}return link_ids;};Vc.prototype._document_Title = function(){return document.title;};Vc.prototype._parent_Title = function(){return parent.document.title;};Vc.prototype._user_Agent = function(){return navigator.userAgent.toLowerCase();};Vc.prototype._href = function(){return window.location.href;};Vc.prototype._referrer = function(){return document.referrer;};Vc.prototype._win_Size = function(){var w = 0, h = 0;var doc = document;var win = window;if(typeof(win.innerWidth) == 'number'){with(parent.window){w = innerWidth;h = innerHeight;}}else{var doc_body = null;if(doc.documentElement){doc_body = doc.documentElement;}else if(doc.body){doc_body = doc.body;}if(doc_body !== null){if(doc_body.clientWidth || doc_body.clientHeight){with(doc_body){w = clientWidth;h = clientHeight;}}}}var hw = w + ',' + h;return hw;};Vc.prototype._cookie = function(){var make_c = SetNoEscapeCookie('ct', 'zif', null, null, null, null);DeleteCookie('ct');if(make_c){return 1;}else{return 0;}};Vc.prototype._event_Fired = function(id, reg){reg[reg.length] = id;};Vc.prototype._is_Event_Fired = function(id, reg){var fired = false;for(var i = 0; i < reg.length; i++){if(id == reg[i]){fired = true;break;}}return fired;};Vc.prototype._add_Event = function(obj, event_name, handler_func, event_handler_uid){var event_handler_id = null;try{if(obj.addEventListener){obj.addEventListener(event_name, handler_func, false);}else if(obj.attachEvent){obj['e' + event_name + handler_func] = handler_func;obj[event_name + handler_func] = function(){obj['e' + event_name + handler_func](window.event);};obj.attachEvent('on' + event_name, obj[event_name + handler_func]);}else{obj['on' + event_name] = obj['e' + event_name + handler_func];}if(event_handler_uid == null){var d = new Date();try{event_handler_id = btoa(d.getTime().toString() + event_name + Math.random());}catch(e){event_handler_id = d.getTime().toString() + event_name + Math.random();}}else{event_handler_id = event_handler_uid;}arguments[3] = event_handler_id;this.event_list.push(arguments);}catch(e){}return event_handler_id;};Vc.prototype._remove_Event = function(obj, event_name, handler_func){var success = false;try{for(var i in this.event_list){var item = this.event_list[i];if((item[0] == obj) && (item[1] == event_name) && (handler_func == item[2])){if(item[0].removeEventListener){item[0].removeEventListener(item[1], item[2], false);}if(item[1].substring(0, 2) != 'on'){item[1] = 'on' + item[1];}if(item[0].detachEvent){item[0].detachEvent(item[1], item[2]);}item[0][item[1]] = null;this.event_list.splice(i, 1);success = true;}}}catch(e){}return success;};Vc.prototype._send = function(var_obj, resp){var success = true;var date = new Date();var scr_id = 'vc_' + date.getTime();var_obj.imp = this.imp_code;var get_array = new Array();for(v in var_obj){get_array[get_array.length] = v + '=' + escape(var_obj[v]);}var get_str = get_array.join('&');var url = this.service_url + '?' + get_str;try{if(document.images){var img = new Image();img.id = scr_id;vc_inst = this;img.onload = function(){if(vc_inst.call_q[scr_id] && (vc_inst.call_q[scr_id].responder != null)){try{eval(vc_inst.call_q[scr_id].responder + "(); ");}catch(e){}}vc_inst._remove_From_Q(scr_id);};try{this._add_To_Q(scr_id, resp);img.src = url;}catch(e){success = false;}}else{throw new Exception('document.images not supported');}}catch(e){success = false;}return success;};Vc.prototype._add_To_Q = function(img_id, resp){this.call_q[img_id] = new Object();this.call_q[img_id].active = true;this.call_q[img_id].responder = resp;return true;};Vc.prototype._remove_From_Q = function(img_id){if((this.call_q[img_id]) && (this.call_q[img_id].active)){this.call_q[img_id].active = false;}return true;};Vc.prototype._debug_out = function(msg, type){if(this.debug){this.js_debug.debug_Out('VC', msg, type);}};function ModifyDomainIfTest(domain){if (typeof(bvtTrackingUrl) != 'undefined'){return bvtTrackingUrl + '?Type=gif&From=Affiliate:ValidClick&Tag=' + domain;}return domain;};