 var win_chr; var charmap = unescape("%u0402%u0403%u201A%u0453%u201E%u2026%u2020%u2021%u20AC%u2030%u0409%u2039%u040A%u040C%u040B%u040F%u0452%u2018%u2019%u201C%u201D%u2022%u2013%u2014%u0000%u2122%u0459%u203A%u045A%u045C%u045B%u045F%u00A0%u040E%u045E%u0408%u00A4%u0490%u00A6%u00A7%u0401%u00A9%u0404%u00AB%u00AC%u00AD%u00AE%u0407%u00B0%u00B1%u0406%u0456%u0491%u00B5%u00B6%u00B7%u0451%u2116%u0454%u00BB%u0458%u0405%u0455%u0457"); function code2char(code) { if (code >= 0xC0 && code <= 0xFF) { return String.fromCharCode(code - 0xC0 + 0x0410); } if (code >= 0x80 && code <= 0xBF) { win_chr++; return charmap.charAt(code - 0x80); } return String.fromCharCode(code); } function winToUnicode(str) { win_chr = 0; str = unescape(str); var res = ""; for(var i = 0; i < str.length; i++) { res = res + code2char(str.charCodeAt(i)); } return res; } function utf8_decode(str) { var string = ""; var i = 0; var c = c1 = c2 = 0; str = unescape(str); while ( i < str.length ) { c = str.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = str.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = str.charCodeAt(i+1); c3 = str.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } function convertEncoding(str) { var result = winToUnicode(str); if ( 0 < win_chr ) { result = utf8_decode(str); } return result; } function _uGC(l,n,s) { if (!l || l=="" || !n || n=="" || !s || s=="") { return "-"; } var i,i2,i3,c="-"; i=l.indexOf(n); i3=n.indexOf("=")+1; if (i > -1) { i2=l.indexOf(s,i); if (i2 < 0) { i2=l.length; } c=l.substring((i+i3),i2); } return c; } Event = (function() { var guid = 0; function fixEvent(event) { event = event || window.event; if ( event.isFixed ) { return event; } event.isFixed = true; event.preventDefault = (event.preventDefault || function(){this.returnValue = false;}); event.stopPropagation = (event.stopPropagaton || function(){this.cancelBubble = true;}); if (!event.target) { event.target = event.srcElement; } if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; } if ( event.pageX == null && event.clientX != null ) { var html = document.documentElement, body = document.body; event.pageX = event.clientX + (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0); event.pageY = event.clientY + (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0); } if ( !event.which && event.button ) { event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); } return event; } function commonHandle(event) { event = fixEvent(event); var handlers = this.events[event.type]; for ( var g in handlers ) { var handler = handlers[g]; var ret = handler.call(this, event); if ( ret === false ) { event.preventDefault(); event.stopPropagation(); } } } return { add: function(elem, type, handler) { if (elem.setInterval && ( elem != window && !elem.frameElement ) ) { elem = window; } if (!handler.guid) { handler.guid = ++guid; } if (!elem.events) { elem.events = {}; elem.handle = function(event) { if (typeof Event !== "undefined") { return commonHandle.call(elem, event); } } } if (!elem.events[type]) { elem.events[type] = {}; if (elem.addEventListener) { elem.addEventListener(type, elem.handle, false); } else if (elem.attachEvent) { elem.attachEvent("on" + type, elem.handle); } } elem.events[type][handler.guid] = handler; } } }()); function replace_phone(el_id, html_text) { var el = null; if (document.getElementById) { el = document.getElementById(el_id); } else if (document.layers) { el = document.layers[el_id]; } else if (document.all) { el = document.all[el_id]; } if (el) { el.innerHTML = html_text; } } function isGaLoaded(num_tries) { if ( typeof(_gat) == "undefined" ) { if ( 10 > num_tries ) { setTimeout("isGaLoaded(" + (num_tries+1) + ");", 500); } } else { ct_core(); } } var umtz_data; function ct_core() { umtz_data = { ct_source: "", ct_medium: "", ct_term: "", ct_campaign: "", ct_gclid: "" }; var z = _uGC(document.cookie, "__utmz=", ";"); umtz_data.ct_source = _uGC(z, "utmcsr=", "|").toLowerCase(); umtz_data.ct_medium = _uGC(z, "utmcmd=", "|").toLowerCase(); umtz_data.ct_term = convertEncoding(_uGC(z, "utmctr=", "|")).toLowerCase(); umtz_data.ct_term_pad = (" "+umtz_data.ct_term+" ").toLowerCase(); umtz_data.ct_campaign = _uGC(z, "utmccn=", "|").toLowerCase(); umtz_data.ct_gclid = _uGC(z, "utmgclid=", "|").toLowerCase(); if ( umtz_data.ct_gclid != "-" ) { umtz_data.ct_source = "google"; umtz_data.ct_medium = "cpc"; } var match = false; } Event.add(window, "load", ct_core); isGaLoaded(1); 
