var GlobalContainer = { $PopC : null, $Pop : null, $PopUF : null, ClosePopup : function() { IF12(false); var $PopCTemp = this.$PopC; var $PopTemp = this.$Pop; this.$PopC = null; this.$Pop = null; $PopCTemp.remove(); $PopCTemp = null; $PopTemp.remove(); $PopTemp = null; if(this.$PopUF) { this.$PopUF.remove(); this.$PopUF = null; } }, BannerSource : null };  function $get(a) { return document.getElementById(a); };   function IF1() { return $.browser.msie; };   function IF2() { return $.browser.mozilla; };   function IF3(a) { if(a%4 == 0) { if(a%100 != 0) { return true; } else { if(a%400 == 0) { return true; } else { return false; } } } return false; };   function IF4(a) { if(IF1()) { document.execCommand('Stop'); } else { window.stop(); if( a == false ) { if(IF2()) { var b = window.location.toString(); window.location = b; } } } };   function IF12(a) { if(a) { $(window).bind("scroll.popup",IF13) .bind("resize.popup",IF13); } else { $(window).unbind("scroll.popup",IF13) .unbind("resize.popup",IF13); } };   function IF13() { var a = $(window).scrollTop(); var b = $(window).scrollLeft(); var c = $(window).width()+b; var d = $(window).height()+a; if(window.GlobalContainer.$PopC) { window.GlobalContainer.$PopC.css({width:c+"px",height:d+"px"}); } if(window.GlobalContainer.$PopUF) { window.GlobalContainer.$PopUF.css({width:c+"px",height:d+"px"}); } };   function GF1(a) { return eval('(' + a + ')'); };   function GF2(a) { var d; var e = 0; d= "{"; $.each(a,function(b,c) { if(e != 0) { d += ","; } if(typeof c == "string") { var f = new RegExp('"',"g"); c = c.replace(f,'\\"'); d += b+":\""+c+"\""; } else { d += b+":"+c; } e += 1; }); d += "}"; return d; };   function GF3(a) { return encodeURIComponent(a); };   function GF4(a) { var b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var c = ""; var d = 0; var div	= 1; for(var f = 0 ; f < a.length ; f++) { if(a.charAt(f) == "=" || a.charAt(f) == '\n') { break; } d = d*64 + b.indexOf(a.charAt(f)); div	= (div==1 ? 64 : div/4); if(div != 64) { c = c + String.fromCharCode(parseInt(d/div)); d	= d % div; } } return c; };   function GF5(a,b,c,d) { var f = c ? "callback.aspx" : window.location.href.replace(window.location.search,""); var g = GF2(b); var h = f+"/"+a; $.ajax({ type: "POST", url: h, data: g, contentType: "application/json; charset=utf-8", dataType: "json", success: function(e){if(d) d(e.d);} }); };   function GF6(a,b) { $.post("callback.aspx/action",a,function(c) { if(b) { b(c); } }); };   function GF7(a) { var b = a.parentNode.parentNode.getElementsByTagName('CODE')[0]; if (window.getSelection) { var c = window.getSelection(); if (c.setBaseAndExtent) { c.setBaseAndExtent(b, 0, b, b.innerText.length - 1); } else { var d = document.createRange(); d.selectNodeContents(b); c.removeAllRanges(); c.addRange(d); } } else if (document.getSelection) { var c = document.getSelection(); var d = document.createRange(); d.selectNodeContents(b); c.removeAllRanges(); c.addRange(d); } else if (document.selection) { var d = document.body.createTextRange(); d.moveToElementText(b); d.select(); } };   function GF8(a) { if (a.createTextRange) { a.caretPos = document.selection.createRange().duplicate(); } };   function GF9(a, b) { var c = $get(a); if (IF1()) { if (c.createTextRange && c.caretPos) { var d = c.caretPos; d.text = d.text.charAt(d.text.length - 1) == ' ' ? b + ' ' : b; } else { c.value = b; } } else { var e = c.scrollTop; var f = c.selectionStart; var g = c.selectionEnd; var h; h = b; c.value = c.value.substring(0, f) + h + c.value.substring(g, c.value.length); c.setSelectionRange(f, f); c.scrollTop = e; } c.focus(); GF8(c); };   function GF10(a,b,c,d) { var e = $get(b); if(a) { var f = $get(a); var g = f.options[f.selectedIndex].value; } if (IF1()) { var h = document.selection.createRange(); if(document.selection.type == 'Text' && h.parentElement().tagName == 'TEXTAREA' && h.parentElement().id == e.id) { if(a) { h.text = c + g + "]" + h.text + d; } else { h.text = c + h.text + d; } document.selection.empty(); } } else { if(e.selectionEnd > e.selectionStart) { var i = e.scrollTop; var j = e.selectionStart; var k = e.selectionEnd; var l; if(a) { l = c + g + "]" + e.value.substring(j,k) + d; } else { l = c + e.value.substring(j,k) + d; } e.value = e.value.substring(0, j) + l + e.value.substring(k, e.value.length); e.setSelectionRange(j, j); e.scrollTop = i; } } e.focus(); };   function GF11(a,b) { GF10(null,b,"[color=#"+a+"]","[/color]"); };   function GF12(a,b,c) { google_ad_client = "pub-9107874110363446"; google_ad_slot = a; google_ad_width = b; google_ad_height = c; document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>'); };   function GF13(a,b,c) { var d = $get(a); var e = $get(b); var f = $get(c); if( !d || !e || !f) { return; } var g = d.options[d.selectedIndex].value; var h = e.options[e.selectedIndex].value; var j = f.options[f.selectedIndex].value; switch(h) { case "1": case "3": case "5": case "7": case "8": case "10": case "12": { d.options.length = 31; } break; case "2": case "4": case "6": case "9": case "11": { d.options.length = 30; } break; } if(IF3(j) == true ) { if( h == 2 ) { d.options.length = 29; } } else { if( h == 2 ) { d.options.length = 28; } } for(var j = 1 ; j <= d.options.length ; j++ ) { d.options[j-1] = new Option(j,j); } if( g <= d.options.length ) { d.selectedIndex = g-1; } else { d.selectedIndex = d.options.length-1; } };   function GF14() { var a = GF32(); var b = {cookieON:a}; GF5("Callback1",b,true,null); };   function GF15(a,b,c) { var d = $get(a); $(d).addClass(c); var e = 'AdLargeImage'; var f = $get(e); if(f) { f.parentNode.removeChild(f); } var g = document.createElement('img'); g.id = e; g.src = b; $(g).load(function(){$(d).removeClass(c);}); d.appendChild(g); d.style.top = $(window).scrollTop()+10+"px"; d.style.left = $(window).scrollLeft()+10+"px"; $("#"+a).css({opacity:"0",display:"block"}).animate({opacity:"1"},"normal"); };   function GF16() { return window.confirm("Please learn more about K-Shop before creating it.\n\nDo you want to generate 'K-Shop' link?"); };   function GF17() { return window.confirm("WARNING: This will permanently delete your K-Shop link. Deleting a shop link may decrease the popularity of your products or services to your targeted visitors.\n\nDo you still want to delete this 'K-Shop' link?"); };   function GF18() { return window.confirm("WARNING: Do you want to delete this ad?"); };   function GF19(a,b,c) { if (a.value.length > c) { a.value = a.value.substring(0, c); } };   function GF20(a) { var c = $.trim($get(a).value); if( c.length == 0 ) { alert("Value is empty"); } else { var d = {displayName:c}; GF5("IsDisplayNameExist",d,false,function(b){alert(b.Message);}); } };   function GF21(a,b,c) { var d = {message:a,url:b,line:c}; GF5("NotifyBrowserException",d,true, null); };   function GF22(a) { var c = {imageSrc:a.ImageSrc,key:a.Key}; GF5("RemoveUploadedImage",c,true,function(b) { $("img[src='"+a.ImageSrc+"']").parent().remove(); $get(a.ControlId).disabled=""; }); };   function GF23(a) { $get(a.ProgressElement).style.display = 'none'; var b = $get(a.ContainerElement); b.innerHTML = b.innerHTML; IF4(false); };   function GF24(a) { var c = {queryString:a.QueryString}; GF5("GetUploadProgress",c,true, function(b) { if(b.IsValid == false) { $get(a.LabelError).style.display = "block"; $get(a.LabelError).innerHTML = b.ErrorMsg; $get(a.ProgressElement).style.display = 'none'; var d = $get(a.ContainerElement); d.innerHTML = d.innerHTML; IF4(true); } else { if(b.TotalSize != 0) { var e = Math.floor(((b.CurrentSize*100)/b.TotalSize)); if( e > 0 ) { var f = e+"%"; $get(a.ProgressBarLeftElement).width = f; $get(a.ProgressBarLeftElement).style.backgroundColor = '#0000ff'; $get(a.ProgressBarLeftElement).innerHTML = e+"%"; } } } } ); };   function GF25(a,b,c,d) { var f = {resourceType:b,resourceData:c}; GF5("GetDownloadSessionKey",f,true, function(e) { var g = $get('DFR'); if(g != null) { document.body.removeChild(g); } g = document.createElement("iframe"); g.id = "DFR"; g.style.visibility = "hidden"; g.src = a+"?key="+e+"&code="+d; document.body.appendChild(g); } ); };   function GF26(a,b) { var c = new Array(a.length); for(var d = 0 ; d < a.length ; d++) { c[d] = a.charCodeAt(d) ^ b; } return c.toString(); };   function GF29(a) { var b = {}; GF5("GetToken",b,true,a); };   function GF32() { var a = true; document.cookie = "clientcookie=nothing;path=/"; if (document.cookie.indexOf("clientcookie",0) < 0) { a = false; } document.cookie = "clientcookie=nothing;path=/;expires=Mon, 01 Jan 1990 00:00:00 GMT"; return a; };   function GF33(a,b,c) { var d = {link:a}; GF5("CheckLink",d,false, function(d) { if(b) { b(d); } } ); };   function GF34(a,b,c,d) { var e = {link:a,ip:b}; GF5("GetPageRank",e,true, function(e) { if(c) { c(e); } } ); };   function GF35(a,b,c) { var d = {ip:a}; GF5("GetIPDetailHtml",d,true, function(d) { if(b) { b(d); } } ); };   function GF36(a,b,c) { GF5("ExecuteOperation",a,true, function(d) { if(b) { b(d); } } ); };   function GF37(a,b) { var c = new String(a).split("&"); var d = 0; var e = "{"; $.each(c,function() { var f = new String(this).split("="); e += f[0].replace(/%/g,b)+":\""+f[1]+"\""; if(d < c.length - 1) { e += ","; } d += 1; }); e += "}"; return eval('('+e.toString()+')'); };   function GF39() { $( "iframe[src *= 'pub-9107874110363446'],iframe[src *= 'adv.aspx']") .mouseover ( function() { GlobalContainer.BannerSource = $(this).attr("src"); } ) .mouseout ( function() { GlobalContainer.BannerSource = null; } ); $(window).blur ( function() { if (GlobalContainer.BannerSource != null) { var a = {bannerSource:GlobalContainer.BannerSource}; GF5("Callback2",a,true,null); GlobalContainer.BannerSource = null; }; }).focus(); };   function GF40() { return Math.max.apply(null,$.map($('body *'), function(a) { return parseInt($(a).css('z-index')) || 0; }) ); };   function GF41(a,b, c,d) { var e = 10; if(d) { e = d; } var $f = $(".ext-hintBx"); var $g = $(".ext-hintBx div:eq(1)").addClass(c); var $a = $(a); $g.html($("#"+b).html()); var i = $a.width()+$a.offset().left+e; var j = ($a.height()- $f.height())/2+$a.offset().top; $f.css({left:i,top:j}).fadeIn("fast"); };   function GF42() { $(".ext-hintBx div:eq(1)").html(""); $(".ext-hintBx").hide(); };   function GF43(a,b,$c,d) { var h = new Array(); if(d.SrcProvider) { var i = d.SrcProvider($.trim(a),$c); if(i != null) { $.get(i,function(e) { if(e.length > 0) { var j = e.split("|"); $.each(j,function(f,g) { h.push(g); }); } b(h); }); } else { b(h); } } };   function GF44(a,b) { $("#"+a).IPG2( {DataProvider:GF43,Context: {SrcProvider:function(c,$d) { return b(c); } } }); };   function GF45(a,b) { var $d = $("#"+a); if($d.length > 0) { GF5("GetMessagesInfo",{},false,function(c) { if(c.Total >= b) { $d.html("<b style='color:#f00'>Inbox FULL</b>"); } else { if(c.Unread > 0) { $d.html("<b>Inbox ("+c.Unread+")</b>"); } } }); } };   function GF46(a) { var b = document.createElement("div"); var c = document.createTextNode(a); b.appendChild(c); return b.innerHTML; };   function GF47(a) { return a.match(/[<>]/); };   function GF50(a,b,c,d,e) { if(a.indexOf("?",0) >= 0) { a = a+"&handledialog=true"; } else { a = a+"?handledialog=true"; } return "<iframe class=\""+d+"\" src=\""+a+"\" frameborder=\"0\" scrolling=\""+e+"\" width=\""+b+"\" height=\""+c+"\"></iframe>"; };   function GF51(a) { var c = {Title:"", FooterHtml:"", PopupClass:"ext-popup", Opacity:"0.4", Width:"300px", Height:"200px", Cancel:false, OK:false, OKCallback:null, CancelText:"Cancel", OKText:"OK", DP:null, BusyClass:"ext-popupbusy",TitleClass:""}; a = $.extend(c,a); var d = GF40(); var e = 1; var f = $.browser.msie && $.browser.version < 7; var g = false; var $h = $("<div></div>").addClass("ext-popupcurtain") .css({display:"block",opacity:a.Opacity,zIndex:d+e++}).appendTo("body"); if(f) { window.GlobalContainer.$PopUF = $("<iframe src=\"javascript:false;\" frameborder=\"0\" scrolling=\"no\" style=\"width:100%;height:100%;filter:alpha(opacity=0);position:absolute;left:0px;top:0px;\"></iframe>") .appendTo("body").css({zIndex:d+e++}); } var $i = $("<div class='ext-popupwrapper'><table cellpadding='0' cellspacing='0' class='"+a.PopupClass+"'><tr class='ext-popupheader'><td><div><p></p><span></span></div></td></tr><tr class='ext-popupcontents'><td class='ext-popupbody' style='width:"+a.Width+";height:"+a.Height+";'></td></tr><tr class='ext-popupfooter'><td></td></tr></table></div>") .appendTo("body").css({zIndex:d+e++}); var $j = $("table:first",$i).css("display","none"); $i.css("display","block"); $j.css("display","block"); if(f == false) { $i.css("position","fixed"); } window.GlobalContainer.$PopC = $h; window.GlobalContainer.$Pop = $i; if(f) { $i.css("top",$(window).scrollTop()+100+"px"); IF12(true); IF13(); } else { $i.css("top","10%"); $h.css({position:"fixed",cursor:"wait"}); } $("tr.ext-popupheader p").text(a.Title).addClass(a.TitleClass); $("tr.ext-popupheader span") .click(function() { window.GlobalContainer.ClosePopup(); }); if($.trim(a.FooterHtml).length > 0) { g = true; $("<div class='ext-popupnote'></div>").html(a.FooterHtml) .appendTo($("tr.ext-popupfooter td")) } if(a.OK) { g = true; $("<input type='button' value='"+a.OKText+"' class='ext-btn' />") .appendTo($("tr.ext-popupfooter td")) .click(function() { window.GlobalContainer.ClosePopup(); if(a.OKCallback) { a.OKCallback(); } }); } if(a.Cancel) { g = true; $("<input type='button' value='"+a.CancelText+"' class='ext-btn' />") .appendTo($("tr.ext-popupfooter td")) .click(function() { window.GlobalContainer.ClosePopup(); }); } if(g == false) { $("tr.ext-popupfooter").css("display","none"); } var $k = $("tr.ext-popupcontents td"); $k.addClass(a.BusyClass); a.DP(function(b) { $k.removeClass(a.BusyClass); $k.html(b); }); };   function GF52() { try { var a = top.location.href; } catch(e) { var b = {location:"Can't access"}; GF5("Callback3",b,true,null); } };   function GF53(a) { var d = $.browser.msie && $.browser.version < 7; var e = GF40(); var f = 1; var g = "aci.axd?v="+new Date().getTime(); var $h = $("<div></div>") .css({position:"absolute",top:"0px",left:"0px",backgroundColor:"#000",zIndex:e+f++,width:$(document).width(),height:$(document).height(),opacity:"0.2"}) .appendTo("body"); var $i = $("<div style=\"display: none; position:absolute; right:50%;\"><table cellpadding=\"5\" cellspacing=\"0\" style=\"position:relative; border: solid 2px #E5B24F; background: #FFFFCC; font-family:Arial; padding:5px; left:50%; \">"+ "<tr>"+ "<td>"+ "</td>"+ "</tr>"+ "<tr>"+ "<td>"+ "<input type=\"text\" style=\"width: 200px;\" />"+ "<p style=\"padding:0; margin:0; font-size:8pt; color:#666;\">Enter the text in the image.</p>"+ "</td>"+ "</tr>"+ "<tr>"+ "<td>"+ "<input type=\"button\" value=\"Submit\" />&nbsp;&nbsp;<input type=\"button\" value=\"Cancel\" />"+ "</td>"+ "</tr>"+ "</table></div>").appendTo("body").css({zIndex:e+f++}); var $j = $("table:first",$i).css("display","none"); var $k = $("input[@type='text']",$j); $i.css("display","block"); $j.css("display","block"); $i.css("top",$(window).height()-$(window).height()/2+$(window).scrollTop()+"px"); $k.focus(); $("input[@type='button']",$j).click(function() { if($(this).attr("value") == "Submit") { DoCallback($k.val()); } else { a(false,""); } $h.remove(); $i.remove(); }); $k.keypress(function(b) { if(b.keyCode == 13) { DoCallback($k.val()); $h.remove(); $i.remove(); } if(b.keyCode == 27) { a(false,""); $h.remove(); $i.remove(); } }); function DoCallback(c) { a(true,c); }; if(d) { var l = new Image(); $(l).load(function() { $(this).appendTo($("tr:first td",$j)); }); l.src = g; } else { $("<img src=\""+g+"\" alt=\"\" />").appendTo($("tr:first td",$j)); } };   function GF54(a) { var b = {id:a}; GF5("Callback4",b,true,null); };   function GF55(a,b,c) { var g = new google.maps.Geocoder(); g.geocode({address:a},function(d) { var h = new Array(); var i = new Object(); var j = false; var k = ""; var l = ""; $.each(d,function(e,f) { if((b == null || b == "" || f.formatted_address.toLowerCase().indexOf(b.toLowerCase()) >= 0) && !i[f.formatted_address]) { if(f.formatted_address == a) { j = true; k = f.geometry.location.lng(); l = f.geometry.location.lat(); return false; } var m = new Object(); m.Address = f.formatted_address; m.Longitude = f.geometry.location.lng(); m.Latitude = f.geometry.location.lat(); h.push(m); i[f.formatted_address] = f.formatted_address; } }); if(j) { h.length = 0; var n = new Object(); n.Address = a; n.Longitude = k; n.Latitude = l; h.push(n); } c(h); }); };   function GF56(a) { $("<iframe style=\"display:none;position:absolute;left:0px;top:0px;\" src=\""+a+"\" frameborder=\"0\" scrolling=\"no\" width=\"0px\" height=\"0px\"></iframe>").appendTo("form div:first"); };   function GF57(a,b,c) { var d = GF40()+1; var $e = $(a); var $f = $(b); var g = $e.offset(); var h = $f.outerWidth(); var i = $e.outerWidth(); var j = $e.outerHeight(); var k = (g.left + i - h) + c + "px"; var l = g.top + j + "px"; $f.css({position:"absolute", left:k, top:l, zIndex:d}).fadeIn("fast"); };   function GF58() { $("div[id^='cwuo_']").each(function() { var $b = $(this); var c = $b.attr("id"); var d = {key:c}; GF5("Callback5",d,true,function(a) { $b.addClass(a.ContainerClass).html(a.Html); }); }); };   function GF59(a,b) { var $c = $(a); var d = $c.data("tracked"); if(!d) { $c.data("tracked",true); $c.attr("href",b); } };   $.fn.PG1 = function(a) { for(var b = 0 ; b < a ; b++) { this.fadeOut("normal").fadeIn("normal"); } return this; };   $.fn.PG2 = function() { return this.each(function(){ $(this).bind("keyup blur",function(){ var a = parseInt($(this).attr("maxlength")); if(a > 0) { var b = $(this).val(); if(b.length > a) { $(this).val(b.substring(0,a)) } } }); }); };   $.fn.PG3 = function() { return this.each(function() { var $a; var $b = $(this); $(this) .focus(function() { $a = $("<div></div>").addClass("ext-charflyout").css("display","none").insertAfter($b); $a.css("margin-left",$b.width()-$a.width()+"px").fadeIn("fast"); PF1(); }) .keyup(function() { PF1(); }) .blur(function() { $a.fadeOut("normal",function(){$(this).remove();}); }); function PF1() { var c = $b.val(); var d = 0; var e = 0; if(c != "") { d = c.length; e = $.trim(c).split(/\s+/).length; } var f = "<b>Character count:</b> <em>"+d+"</em><br /><b>Word count:</b> <em>"+e+"</em>"; $a.html(f); }; }); };   $.fn.PG4 = function() { return this.each(function() { var $a = $(this); var b = $a.attr("WatermarkText"); if($a.val() == "" || $a.val() == b) { $a .addClass("ext-watermark") .val(b); } $a .focus(function() { if($(this).val() == b) { $(this).val(""); } $(this).removeClass("ext-watermark"); }) .blur(function() { if($(this).val() == "") { $(this).addClass("ext-watermark").val(b); } }); $("form").submit(function() { if($a.val() == b) { $a.val(""); } }); }); };   $.fn.PG5 = function(a) { var $c; return this.each(function() { $(this).click(function(b) { if($c) { $c.remove(); } $c = $("<img></img>") .css({width:"1px",height:"1px",position:"absolute",left:b.clientX+"px",top:b.clientY+"px"}) .attr("src",$(this).attr("src")).appendTo($("body")).click(function(){$(this).remove();}); var d = parseInt($(this).attr("width"))*a; var e = parseInt($(this).attr("height"))*a; $c.animate({width:d+"px",height:e+"px"},"normal"); }); }); };   $.fn.IPG2 = function(a) { return this.each(function() { var i = {DataProvider:null,Context:null}; var $j = $(this); var k; var l = $j.val(); a = $.extend(i,a); $j.attr("autocomplete","off"); $(this) .keyup(function(b) { var c = b.keyCode; if(c == 38 || c == 40) { return; } if(c == 27) { PF1(false); return; } if(c == 13) { PF2(); return; } if(k) { window.clearTimeout(k); } k = window.setTimeout(function(){PF5();},250); }) .keydown(function(b) { if(b.keyCode == 27) { return false; } if(b.keyCode == 38) { PF3(false); } if(b.keyCode == 40) { PF3(true); } }) .blur(function(b) { window.setTimeout(function(){PF1(false);},200); }); function PF4() { var $m = $("div.ext-autosuggest"); if($m.length == 0) { var n = $j.offset(); var o = $j.outerHeight(); var p = $j.width()+20; var q = n.left + "px"; var r = n.top + o + "px"; $m = $("<div></div>").addClass("ext-autosuggest").css({width:p+"px",left:q,top:r}).insertAfter($j); } return $m; }; function PF5(c) { var s = $j.val(); if(s == "") { PF1(false); return; } if(l != $j.val()) { i.DataProvider(s,function(d) { if(d.length > 0) { var $t = $("<ul></ul>"); $t[0].CurrentIndex = -1; var e = 0; $.each(d,function(e,f) { var $u = $("<li></li>") .html(f) .appendTo($t) .click(PF2) .hover(PF8,PF9); $u[0].Index = e++; }); PF4().empty().append($t); PF1(true); } else { PF1(false); } },$j,i.Context); } l = $j.val(); }; function PF3(g) { var $t = $("div.ext-autosuggest ul"); var v = $t.children().length; if(v > 0) { var w = $t[0].CurrentIndex; $t[0].CurrentIndex = g ? (w+1) % v : (w+v-1) % v; PF7(); } }; function PF6() { if($("div.ext-autosuggest ul")[0] != undefined) { var e = $("div.ext-autosuggest ul")[0].CurrentIndex; var f = $("div.ext-autosuggest ul li").eq(e).text(); $j.val(f); } }; function PF2() { PF6(); PF1(false); }; function PF7() { var $t = $("div.ext-autosuggest ul"); $("div.ext-autosuggest ul li").removeClass("hilight").eq($t[0].CurrentIndex).addClass("hilight"); PF6(); }; function PF8() { $("div.ext-autosuggest ul")[0].CurrentIndex = this.Index; }; function PF9() { $("div.ext-autosuggest ul")[0].CurrentIndex = this.Index; }; function PF1(h) { var $m = PF4(); if(h) { $m.slideDown("normal"); } else { l = ""; if($m.children().length > 0) { $m.slideUp("fast",function(){$m.remove();}); } else { $m.remove(); } } }; }); };   $.fn.PG6 = function(a) { var c = {ContainerClass:"",Exclusive:true}; a = $.extend(c,a); return this.each(function() { var $d = $(this).parents("."+a.ContainerClass); var $e = $(this).is(":checkbox") ? $(this) : $(":checkbox",$(this)); if(a.Exclusive) { var $f = $(":checkbox",$d).not($e); $f.click(function(b) { $e.removeAttr("checked"); }); $e.click(function(b) { $f.removeAttr("checked"); }); } else { $(this).click(function() { $(":checkbox",$d).not($e).attr("checked",$e.is(":checked")); }); } }); };   $.fn.PG7 = function() { var $b = null; $("form").submit(function(a) { if($b != null) { window.setTimeout(function() { $b.attr("disabled","disabled").val("Processing..."); },200); } }); return this.each(function() { $(this).click(function() { $b = $(this); }); }); };   $.fn.PG8 = function(a,b) { return this.each(function() { var $f = $(this); var $g = $("div",$f).eq(0); var $h = $("div",$f).eq(1); var $i = $("img",$g); $g.hover(function(){},function(){PF1();}); $i.each(function(c,d) { d.OrgSrc = $(d).attr("src"); d.Vote = c+1; }) .hover(function() { $(this).prevAll("img").andSelf().attr("src",b+"ext-rateonm.gif"); $(this).nextAll("img").attr("src",b+"ext-rateoff.gif"); },function() { PF1(); }).click(function() { var j = a()+"&rating="; $.get(j+this.Vote,function(e) { if(e.length > 0) { var d = eval('('+e+')'); if(d.CanVote) { var k = parseInt(d.Rating); $i.each(function(c,d) { if(c < k) { $(d).attr("src",b+"ext-rateon.gif"); d.OrgSrc = b+"ext-rateon.gif"; } else { $(d).attr("src",b+"ext-rateoff.gif"); d.OrgSrc = b+"ext-rateoff.gif"; } }); $h.html("("+d.Rating.toFixed(1)+" rating from "+d.Votes+" votes)"); eval('('+d.Cookie+')'); } else { $h.html("You already voted"); } } }); }); function PF1() { $i.each(function(c,d) { $(d).attr("src",d.OrgSrc); }); }; }); };   $.fn.PG9 = function() { return this.each(function(){ var $a = $(this); var $b = $(window); var c = $a.offset().top; var d = $a.offset().left; var e = $a.width(); var f = $a.height(); var g = $b.width()+$b.scrollLeft(); var h = $b.height()+$b.scrollTop(); if(c < 0) { $a.css("top","5px"); } if(c + f > h) { var i = h - f - 5; $a.css("top",i+"px"); } if(d < 0) { $a.css("left","5px"); } if(d + e > g) { var j = g - e - 5; $a.css("left",j+"px"); } }); };   $.fn.PG10 = function() { return this.each(function() { var $b = $(this); var $c = null; $b.keydown(function(a) { var d = true; if(a.keyCode == 13) { if($b.is(":password") == false && GF47($b.val())) { d = false; window.setTimeout(function() { alert("Input should not contain '<' or '>' characters."); },50); } if(d) { var e = false; $(":input").filter(function() { if(this == $b[0]) { e = true; } if(e) { var f = $(this).is(":submit"); if(f) { $c = $(this); e = false; return true; } else { return false; } } else { return false; } }); if($c) { $c.trigger("click"); return false; } else { return true; } } else { return false; } } }); }); };   $.fn.PG11 = function() { return this.each(function() { if(!(IF1() && $.browser.version < 7)) { var $a = $(this); var b = $a.offset().top; $a.css("position","absolute"); var c = false; $(window).scroll(function() { if(b < $(window).scrollTop()+5) { if(c == false) { c = true; $a.css({position:"fixed",top:5+"px"}); } } else { c = false; $a.css({position:"absolute",top:b+"px"}); } }); } }); };   $.fn.PG12 = function(a) { return this.each(function() { var c = {NextId:"",PrevId:"",IsVertical:false,IsEndless:false,AutoMove:false,AutoMoveTime:2000,Speed:"normal",ScrollStart: function(){},ScrollEnd: function(){},ElementsPositionChanged: function(){} }; var d = $.extend({},c,a); var $e = $(this); var $f = $(":first",$e); var $g = $f.children(); if(d.IsVertical && IF1()) { $g.css("display","inline"); } $f.css({margin:"0px",padding:"0px",position:"absolute",left:"0px",top:"0px"}); $g.css({margin:"0px",padding:"0px"}); var h = $f[0].nodeName.toLowerCase() == "ul" ? true : false; if(h) { $g.wrapInner("<div/>"); } var $i = $g.eq(0); var j = $i.width(); var k = $i.height(); var l = $f.children().length; var m = 0; var n = ""; if(h) { $f.css("list-style","none"); } else { d.IsVertical ? $f.css("height","100000px") : $f.css("width","100000px"); } if(d.IsVertical) { m = k; n = "top"; } else { m = j; n = "left"; $g.css("float","left"); } $("#"+d.NextId).bind("click",PF1); $("#"+d.PrevId).bind("click",PF2); $(window).bind("resize",function(){PF7();}); PF7(); if(d.AutoMove) { window.setInterval(function(){PF1();},d.AutoMoveTime); } function PF7() { d.ElementsPositionChanged(PF4(),PF3(),PF5()); }; function PF3() { return d.IsVertical ? Math.floor($e.height() / m) : Math.floor($e.width() / m); }; function PF4() { var o = Math.abs(parseInt($f.css(n))); return Math.floor(o / m); }; function PF5() { var p = l - (PF4()+PF3()); if(p < 0) { return 0; } else { return p; } }; function PF6(b) { if (d.IsVertical) { $f.animate({ top: b }, d.Speed, function() { d.ScrollEnd();; PF7(); }); } else { $f.animate({ left: b }, d.Speed, function() { d.ScrollEnd();; PF7(); }); } }; function PF1() { var q = PF4(); var r = PF3(); var s = PF5(); d.ScrollStart(true); if(d.IsEndless) { if(s < r) { $f.append($f.children(":lt("+q+")")); d.IsVertical ? $f.css("top",0) : $f.css("left",0); s = PF5(); } } var o = parseInt($f.css(n)); var b = -Math.min(s,r)*m+o; PF6(b); }; function PF2() { var q = PF4(); var r = PF3(); var s = PF5(); d.ScrollStart(false); if(d.IsEndless) { if(q < r) { var t = q+r-1; $f.prepend($f.children(":gt("+t+")")); d.IsVertical ? $f.css("top",-(l-r)*m) : $f.css("left",-(l-r)*m); q = PF4(); } } var o = parseInt($f.css(n)); var b = Math.min(q,r)*m+o; PF6(b); }; }); };   $.fn.PG13 = function(a,b,c) { var d = "g"; if(c) { d = "gi"; } var e = new RegExp(a, d); return this.each(function() { var f = ""; var g = null; var h = 0; var i = this.innerHTML; while (g = e.exec(i)) { var j = b(g[0]); f += i.substring(h,e.lastIndex-g[0].length)+j; h = e.lastIndex; } this.innerHTML = f+i.substring(h); }); };   $.fn.PG14 = function() { return this.each(function() { var $c = null; var d = null; var $e = $(this); var f = null; var g = null; var h = null; var i = null; var j = null; PF1(); function PF1() { var $k = $("<table cellspacing=\"0\" cellpadding=\"0\" class=\"ext-htmlEditor\"><tr class=\"toolbar\"><td></td></tr><tr><td></td></tr></table>").width($e.width()).insertAfter($e.hide()); var $l = $("<iframe frameborder=\"0\" scrolling=\"no\" height=\"225\" width=\"250\" style=\"visibility: hidden; position: absolute; left: 1px; top: 1px;\" src=\"colors.htm\"></iframe>"); $c = $("<iframe />").height($e.height()).width($e.width()); $k.find("td:eq(1)").append($c).append($l); $tdToolbar = $k.find("td:eq(0)"); $tdToolbar.append("Font: <select>"+ "<option value=\"\">Select...</option>"+ "<option value=\"Arial\">Arial</option>"+ "<option value=\"Courier New\">Courier New</option>"+ "<option value=\"Georgia\">Georgia</option>"+ "<option value=\"Tahoma\">Tahoma</option>"+ "<option value=\"Times New Roman\">Times New Roman</option>"+ "<option value=\"Verdana\">Verdana</option>"+ "<option value=\"Impact\">Impact</option>"+ "</select>"); $tdToolbar.append("&nbsp;Size: <select>"+ "<option value=\"\">Select...</option>"+ "<option value=\"1\">1</option>"+ "<option value=\"2\">2</option>"+ "<option value=\"3\">3</option>"+ "<option value=\"4\">4</option>"+ "<option value=\"5\">5</option>"+ "<option value=\"6\">6</option>"+ "<option value=\"7\">7</option>"+ "</select>"); $tdToolbar.append("<input id=\"bold\" type=\"button\" value=\"\" class=\"bold\" />"); $tdToolbar.append("<input id=\"italic\" type=\"button\" value=\"\" class=\"italic\" />"); $tdToolbar.append("<input id=\"underline\" type=\"button\" value=\"\" class=\"underline\" />"); $tdToolbar.append("<input id=\"justifyleft\" type=\"button\" value=\"\" class=\"justifyleft\" />"); $tdToolbar.append("<input id=\"justifycentre\" type=\"button\" value=\"\" class=\"justifycentre\" />"); $tdToolbar.append("<input id=\"justifyright\" type=\"button\" value=\"\" class=\"justifyright\" />"); $tdToolbar.append("<input id=\"ulist\" type=\"button\" value=\"\" class=\"ulist\" />"); $tdToolbar.append("<input id=\"olist\" type=\"button\" value=\"\" class=\"olist\" />"); $tdToolbar.append("<input id=\"forecolor\" type=\"button\" value=\"\" class=\"forecolor\" />"); $tdToolbar.append("<input id=\"backcolor\" type=\"button\" value=\"\" class=\"backcolor\" />"); $tdToolbar.append("<input id=\"outdent\" type=\"button\" value=\"\" class=\"outdent\" />"); $tdToolbar.append("<input id=\"indent\" type=\"button\" value=\"\" class=\"indent\" />"); $tdToolbar.append("<input id=\"subscript\" type=\"button\" value=\"\" class=\"subscript\" />"); $tdToolbar.append("<input id=\"superscript\" type=\"button\" value=\"\" class=\"superscript\" />"); $tdToolbar.append("<input id=\"hrule\" type=\"button\" value=\"\" class=\"hrule\" />"); $tdToolbar.append("<input id=\"clear\" type=\"button\" value=\"\" class=\"clear\" />"); $("select:eq(0)",$tdToolbar).change(function() { h = $(this).children("option:selected").val(); if(h != "") { PF2(); j = "fontname"; PF3(); } else { h = null; } }); $("select:eq(1)",$tdToolbar).change(function() { i = $(this).children("option:selected").val(); if(i != "") { PF2(); j = "fontsize"; PF3(); } else { i = null; } }); $("input",$tdToolbar).click(function(a) { PF2(); var m = $(this).attr("id"); j = m; if(m == "forecolor" || m == "backcolor") { $l.css({"left":a.pageX+"px","top":a.pageY+15+"px","visibility":"visible"}); } else { PF3(); } }); $l[0].contentWindow.ColorSelected = function(b) { $l.css("visibility","hidden"); if(b != null) { g = b; PF3(); } }; window.setTimeout(function() { d = $c[0].contentWindow.document; d.designMode = "on"; $("form").submit(PF5); PF4(); },50); }; function PF2() { if(IF1()) { var n = d.selection; if (!n) { return; } f = (n.getRangeAt) ? n.getRangeAt(0) : n.createRange(); } }; function PF4() { d.open(); d.write($e.val()); d.close(); }; function PF5() { $e.val($(d.body).html()); }; function PF3() { if(j == null) { return; } $c[0].contentWindow.focus(); switch(j.toString().toUpperCase()) { case "BOLD": { d.execCommand('bold', false, null); } break; case "ITALIC": { d.execCommand('italic', false, null); } break; case "UNDERLINE": { d.execCommand('Underline', false, null); } break; case "JUSTIFYLEFT": { d.execCommand('justifyleft', false, null); } break; case "JUSTIFYCENTRE": { d.execCommand('justifycenter', false, null); } break; case "JUSTIFYRIGHT": { d.execCommand('justifyright', false, null); } break; case "ULIST": { d.execCommand('insertunorderedlist', false, null); } break; case "OLIST": { d.execCommand('insertorderedlist', false, null); } break; case "FORECOLOR": { if(IF1()) { f.execCommand('forecolor', false, g); } else { d.execCommand('forecolor', false, g); } } break; case "BACKCOLOR": { if(IF1()) { f.execCommand('backcolor', false, g); } else { d.execCommand('hilitecolor', false, g); } } break; case "OUTDENT": { d.execCommand('outdent', false, g); } break; case "INDENT": { d.execCommand('indent', false, g); } break; case "SUBSCRIPT": { d.execCommand('subscript', false, null); } break; case "SUPERSCRIPT": { d.execCommand('superscript', false, null); } break; case "HRULE": { d.execCommand('inserthorizontalrule', false, null); } break; case "CLEAR": { d.execCommand('removeformat', false, null); } break; case "FONTNAME": { if(h != null) { if(IF1()) { f.execCommand('fontname', false, h); } else { d.execCommand('fontname', false, h); } } } break; case "FONTSIZE": { if(i != null) { if(IF1()) { f.execCommand('fontsize', false, i); } else { d.execCommand('fontsize', false, i); } } } break; } }; }); };   $.fn.PG15 = function(a) { var c = {htmlCallback:null, width:null, tipXOffset:0, tipYOffset:0, disappearAfterTime:true, displayPosition:"auto"}; var d = {}; var e = $.extend(d, c, a); return this.each(function() { var $f = null; var g = false; var $h = $(this); var i = $h.attr("tooltipid"); var j = $h.attr("title"); if(!e.htmlCallback) { $h.removeAttr("title"); } $h.mouseover(function() { if($f == null) { var k = GF40()+1; $f = $("<div class='ext-tooltip'></div>").appendTo("body").css({display:"none",zIndex:k}); if(e.width != null) { $f.css("width",e.width+"px"); } $f.hover(function() { g = true; } ,function() { $f.css("display","none").html(""); }); } g = true; if(e.htmlCallback) { $f.addClass("ext-popupbusy").css("display","block"); PF1(); e.htmlCallback(i,function(b) { if(g) { if(b.length > 0) { $f.removeClass("ext-popupbusy").css("display","none").html(b).fadeIn("fast"); PF1(); } else { $f.removeClass("ext-popupbusy").css("display","none"); } } }); } else { var b = j; $f.css("display","block"); PF1(); if(g) { if(b.length > 0) { $f.css("display","none").html(b).fadeIn("fast"); PF1(); } else { $f.css("display","none"); } } } }) .mouseout(function() { if($f != null) { if(e.disappearAfterTime) { g = false; window.setTimeout(function() { if(g == false) { $f.css("display","none").html(""); } },300); } else { $f.css("display","none").html(""); } } }); function PF1() { var l = $h.offset(); var m = $h.outerWidth(); var n = $h.outerHeight(); var o = l.left + m + e.tipXOffset; var p = l.top + e.tipYOffset; var q = $(window).scrollTop(); var r = $(window).scrollLeft()+$(window).width(); var s; var t; var u = 2; if(e.displayPosition == "auto") { if(r - (u *2) >= $f.width() + o) { s = o+u; } else { s = o-$f.width()-u-m; } if(q + (u *2)>= p - $f.height()) { t = q+u; } else { t = p-$f.height()-u; } } else { switch(e.displayPosition) { case "top": { s = l.left - ($f.width() - m)/2; t = l.top - $f.height() - 10; } break; case "right": { s = l.left + m + 5; t = l.top - ($f.height() - n)/2 - 5; } break; case "bottom": { s = l.left - ($f.width() - m)/2; t = l.top + n + 10; } break; case "left": { s = l.left - $f.width() - 15; t = l.top - ($f.height() - n)/2 - 5; } break; } } $f.css({left:s, top:t}); }; }); };   $.fn.PG16 = function(a) { return this.each(function() { var g = {MaximumValue:100, StepValue:10, StartValueLower:0, StartValueUpper:100, IsOneSlider:false, Sliding:null, SlidingStopped:null }; var h = {}; var i = $.extend(h, g, a); var $j = $(this); var $k = $("<div class=\"ext-sliderBar\"></div>"); var $l = $("<div></div>"); var $m = $("<span></span>"); var $n = $("<span></span>"); $k.append($l).append($m).append($n).appendTo($j); var o = $m.outerWidth(); var p = $k.outerWidth() - o; var $q = $("li",$j); if($q.length > 0) { $q.css("width",(p/($q.length-1))+"px"); } $m.data("Value",i.StartValueLower); $n.data("Value",i.StartValueUpper); if(i.IsOneSlider) { $n.css("display","none").data("Value","0"); } PF1(false,false); function PF1(b,c) { var r = $m.data("Value"); var s = $n.data("Value"); var t = ValueToPixel(r); var u = ValueToPixel(s); $m.css("left",t+"px"); $n.css("left",u+"px"); var v = 0; var w = 0; var x = 0; var y = 0; if(r < s) { v = r; w = s; x = t; y = u; } else { v = s; w = r; x = u; y = t; } $l.css({left:x+"px",width:(y-x)+"px"}); if(b) { if(c) { if(i.SlidingStopped) { i.SlidingStopped(v,w,i.StepValue); } } else { if(i.Sliding) { i.Sliding(v,w,i.StepValue); } } } }; $m.mousedown(function(d) { $m.data("dragging",true); $m.data("mousePos",$k.offset().left+o/2); }); $n.mousedown(function(d) { $n.data("dragging",true); $n.data("mousePos",$k.offset().left+o/2); }); $("body").mouseup(function(d) { if($m.data("dragging") || $n.data("dragging")) { var $z = $("<input type=\"text\" style=\"position:absolute;left:-3000px;\" />").appendTo("body").focus(); window.setTimeout(function() { $z.remove(); },50); PF1(true,true); } $m.data("dragging",false); $n.data("dragging",false); }); $("body").mousemove(function(d) { var $aa = null; var ab = $m.data("dragging"); if(ab) { $aa = $m; } else { ab = $n.data("dragging"); if(ab) { $aa = $n; } } if(ab) { var ac = $aa.data("Value"); var ad = d.pageX - $aa.data("mousePos"); var ae = PixelsToValue(ad); if(Math.abs(ae-ac) >= i.StepValue/2) { var af = (ae-ac) > 0 ? i.StepValue : -i.StepValue; var ag = ac+af; if(ag > i.MaximumValue) { ag = i.MaximumValue; } if(ag < 0) { ag = 0; } $aa.data("Value",ag); PF1(true,false); } } }); function PixelsToValue(e) { return (i.MaximumValue*e)/p; }; function ValueToPixel(f) { return (f*p)/i.MaximumValue; }; }); };   $.fn.PG17 = function(m,b,c,d) { return this.each(function() { var $h = $(this); var $i = null; var j = GF40()+1; $h.hover ( function() { if($i != null) { $i.remove(); $i = null; } $i = $("<div></div>") .addClass("ext-dropMenu") .css({display:"none",position:"absolute",zIndex:j}) .hover(function() { $(this).data("flag",""); }, function() { PF1(); }) .appendTo($("body")); if(c) { $i.addClass(c); } var $k = $("<ul>"); $.each(m,function(g,f) { var $l = $("<li>"); if(f.IsGroup) { $l.append($("<span>"+f.Text+"</span>")); } else { var $m = $("<a>"+f.Text+"</a>"); if(f.HRef) { $m.attr("href",f.HRef); } else { $m.attr("href","#"); $m.data("clickInfo",f); } $l.append($m); } if(f.CssClass) { $l.addClass(f.CssClass); } $k.append($l); }); $i.append($k); $("li a",$i).click(function(g) { var n = $(this).data("clickInfo"); if(n != null) { g.preventDefault(); PF1(); if(d) { d(n); } } }); var o = $h.offset(); var p = o.top + $h.outerHeight(); var q = 0; if(b) { q = o.left + $h.outerWidth() - $i.outerWidth(); } else { q = o.left; } $i.css({left:q+"px",top:p+"px"}); $i.css("display","block"); }, function() { window.setTimeout(function() { if($i.data("flag") == null) { PF1(); } },"100"); } ); function PF1() { if($i != null) { $i.remove(); } }; }); };  CL2 = function(parentId) { $("div#colorboxcontainer").remove(); var $container = $("<div id=\"colorboxcontainer\">").css({display:"none",width:"115px"}); var safeColors = new Array("FF", "CC", "99", "66", "33", "00"); var boxCount = 0; for (var red = 0; red < 6; red++) { for (var green = 0; green < 6; green++) { for (var blue = 0; blue < 6; blue++) { var hex = safeColors[red] + safeColors[green] + safeColors[blue]; $("<input type='button' value='"+hex+"' class='ext-colorbox'></input>") .css({"background-color":"#"+hex+"","color":"#"+hex+""}) .click(function() { eval('ColorSelected("'+$(this).val()+'")'); }).appendTo($container); boxCount++; if(boxCount == 9) { $("<div style=\"clear: both\" />").appendTo($container); boxCount = 0; } } } } if(parentId != null) { $container.appendTo($get(parentId)); } else { $container.css({position:"absolute"}); $container.appendTo("body"); } }; CL2.prototype = { CF1 : function(leftPos,topPos) { $("div#colorboxcontainer").css({left:leftPos,top:topPos,display:"block"}); } , CF2 : function() { $("div#colorboxcontainer").css("display","none"); } }; 
