// stardevelop.com Live Help International Copyright 2003-2011
// Live Help JavaScript v3.95.3
// Requirement: jQuery 1.40.1 or above
var LiveHelp=function(){var A="625";var q="435";var l="right";var r="center";var k="";var K="";var d="en";var G=1;var U=15*1000;var p=0;var t=0;var B;var f="";var m="";var z="";var P=0;var x=0;var o="";u();var y;var g=0;var i="";var w=10;var H=10;var V=229;var O=323;var J=0;var M=0;var v;var j=h();var b;var S=0;$(document).ready(function(){$.ajaxSetup({cache:false});var aa=h();var Z=$("script[src*='livehelp/scripts/jquery.livehelp.min.js']").attr("src");var W=Z.split("jquery.livehelp.min.js");if(W!=null){m=W[0]}$.ajax({url:m+"../include/settings.php?DEPARTMENT"+f,dataType:"script",error:function(){},success:function(){s();$(document).trigger("LiveHelp.SettingsUpdated");$(document).trigger("LiveHelp.StatusModeChanged",LiveHelp.currentStatus);if(LiveHelp.offlineRedirect!=""){if(/^(?:^[\-!#$%&'*+\\.\/0-9=?A-Z^_`a-z{|}~]+@[\-!#$%&'*+\\\/0-9=?A-Z^_`a-z{|}~]+\.[\-!#$%&'*+\\.\/0-9=?A-Z^_`a-z{|}~]+$)$/i.test(LiveHelp.offlineRedirect)){LiveHelp.offlineRedirect="mailto:"+LiveHelp.offlineRedirect}LiveHelp.OfflineEmail=0}var ab='<!-- stardevelop.com Live Help International Copyright - All Rights Reserved //--> <!--  BEGIN stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> <div id="initiateChatLiveHelp" align="left" style="position:absolute; left:10px; top:10px; visibility:hidden; z-index:5000;">   <map name="LiveHelpInitiateChatMap" id="LiveHelpInitiateChatMap">     <area shape="rect" coords="50,210,212,223" href="http://livehelp.stardevelop.com" target="_blank" alt="stardevelop.com Live Help"/>     <area shape="rect" coords="113,183,197,206" href="#" onclick="openLiveHelp();updateInitiateStatus(\'Accepted\');return false;" alt="Accept"/>     <area shape="rect" coords="206,183,285,206" href="#" onclick="updateInitiateStatus(\'Declined\');return false;" alt="Decline"/>     <area shape="rect" coords="263,86,301,104" href="#" onclick="updateInitiateStatus(\'Declined\');return false;" alt="Close"/>   </map>   <div id="InitiateText" align="center" style="position:relative; left:40px; top:145px; width:256px; height:35px; z-index:5001; text-align:center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold;">Do you have any questions that I can help you with?</div>   <img src="'+m+"../locale/"+LiveHelp.locale+'/images/InitateChat.gif" alt="stardevelop.com Live Help" width="323" height="229" border="0" usemap="#LiveHelpInitiateChatMap"/></div> <!--  END stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //-->';jQuery("body").append(ab);if(!$(".LiveHelpSlider").length==0&&typeof LiveHelpSettings!="undefined"&&typeof LiveHelpSettings.chatTab!="undefined"&&LiveHelpSettings.chatTab==true){var ac='<div class="LiveHelpSlider" style="width:31px; height:262px; overflow:hidden; position:fixed; top:250px; right:0px; z-index:10000; display:none;"> <img src="'+m+"../locale/"+LiveHelp.locale+'/images/SliderBackground.png" border="0" alt="Live Chat Online - Chat Now!" title="Live Chat Online - Chat Now!" style="position:absolute; left:0px; z-index:15000;"/> <div class="LiveHelpSliderTab LiveHelpButton" style="position:relative; top:0; height:228px; width:283px; right:0; z-index:20000; cursor:pointer; background:url(\''+m+"../locale/"+LiveHelp.locale+'/images/SliderButton.png\') top right no-repeat;"></div> <div class="LiveHelpSliderClose" style="position:relative; bottom:-5px; height:20px; width:283px; right:0; z-index:20000; cursor:pointer; background:url(\''+m+"../locale/"+LiveHelp.locale+'/images/SliderClose.png\') top right no-repeat;"></div></div> <div class="LiveHelpSliderText" style="display:block; background:url(\''+m+"../locale/"+LiveHelp.locale+"/images/SliderText.png') no-repeat; width:119px; height:89px; overflow:hidden; position:fixed; top:320px; right:20px; z-index:0; display:none;\"></div>";jQuery("body").append(ac);Q()}}});$(window).bind("resize",N);$(".LiveHelpButton").click(function(){I($(this));return false});$(".LiveHelpCallButton").click(function(){I($(this),"","call.php");return false});$(".LiveHelpSliderClose").click(function(){clearTimeout($(".LiveHelpSlider").data("SliderTimeoutClose"));$(".LiveHelpSlider").animate({width:32},{duration:1000,easing:"easeInOutQuad"});return false});Q();e()});function Q(){if($(".LiveHelpSlider").length>0){$(".LiveHelpSlider").hover(function(){clearTimeout($(".LiveHelpSlider").data("SliderTimeoutClose"));var W=setTimeout(function(){$(".LiveHelpSlider").animate({width:283},{duration:1000,easing:"easeInOutQuad"})},250);$(".LiveHelpSlider").data("SliderTimeoutOpen",W)},function(){clearTimeout($(".LiveHelpSlider").data("SliderTimeoutOpen"));var W=setTimeout(function(){$(".LiveHelpSlider").animate({width:32},{duration:1000,easing:"easeInOutQuad"})},3000);$(".LiveHelpSlider").data("SliderTimeoutClose",W)})}}function u(){P=(screen.width-A)/2;x=(screen.height-q)/2;o="height="+q+",width="+A+",top="+x+",left="+P+",resizable=1,toolbar=0,menubar=0"}function a(ac){var ae=$("#"+ac).offset();var ai=parseInt(ae.top);var ag=parseInt(ae.left);var ab=$(window).scrollTop();var ad=$(window).scrollLeft();var Z=ab+w;var aa=ad+H;if(ai!=Z||ag!=aa){if(this.targetY!=Z||this.targetX!=aa){this.targetY=Z;this.targetX=aa;var W=new Date();Y=this.targetY-ai;X=this.targetX-ag;C=Math.PI/2400;D=W.getTime();if(Math.abs(Y)>M){E=Y>0?this.targetY-M:this.targetY+M;Y=Y>0?M:-M}else{E=ai}if(Math.abs(X)>J){F=X>0?this.targetX-J:this.targetX+J;X=X>0?J:-J}else{F=ag}}var W=new Date();var af=Y*Math.sin(C*(W.getTime()-D))+E;var ah=X*Math.sin(C*(W.getTime()-D))+F;af=Math.round(af);ah=Math.round(ah);if((Y>0&&af>ai)||(Y<0&&af<ai)){$("#"+ac).css("top",af+"px")}if((X>0&&ah>ag)||(X<0&&ah<ag)){$("#"+ac).css("left",ah+"px")}}}function N(){var aa=0;var W=0;var Z=document.documentElement;aa=self.innerWidth||(Z&&Z.clientWidth)||document.body.clientWidth;W=self.innerHeight||(Z&&Z.clientHeight)||document.body.clientHeight;J=aa;M=W;if(LiveHelp.hAlign=="right"){H=aa-O-30}else{if(LiveHelp.hAlign=="middle"){H=Math.round((aa-20)/2)-Math.round(O/2)}}if(LiveHelp.vAlign=="bottom"){w=W-V-55}else{if(LiveHelp.vAlign=="center"){w=Math.round((W-20)/2)-Math.round(V/2)}}}function e(){var W=h();var ae=$("script[src*='livehelp/scripts/jquery.livehelp.min.js']").attr("src");var aa=ae.split("jquery.livehelp.min.js");if(aa!=null){m=aa[0]}var af=document.title.substring(0,150);var Z=c();var ag=document.location.protocol+"//"+document.location.hostname;var ac;if(document.referrer.substring(0,ag.length)===ag.location){ac=""}else{ac=document.referrer}var ab=m+"../include/status.php";var ad="?JS=1&DEPARTMENT="+f+"&INITIATE="+i;if(g==0){ad="?JS=1&TITLE="+encodeURI(escape(af))+"&URL="+encodeURI(escape(document.location))+"&REFERRER="+encodeURI(escape(ac))+"&DEPARTMENT="+f+"&INITIATE="+i+"&WIDTH="+screen.width+"&HEIGHT="+screen.height+"&TIME="+W;if(typeof LiveHelpSettings!="undefined"&&typeof LiveHelpSettings.zendesk!="undefined"&&LiveHelpSettings.zendesk==true){if(currentUser!="undefined"&&currentUser.isEndUser==true&&currentUser.id!=null){ad+="&PLUGIN=Zendesk&CUSTOM="+currentUser.id+"&NAME="+currentUser.name}}g=1}$.ajax({url:ab+ad,dataType:"script",error:function(){},success:function(){if(g==0){g=1}}});b=W-j;if(b<90*60*1000){window.clearTimeout(v);v=window.setTimeout(function(){e()},U)}}function c(){var W=new Date();if(W){return W.getTimezoneOffset()}else{return""}}function h(){var W=new Date();return W.getTime()}function R(){if(p==0){N();y=window.setInterval(function(){a("initiateChatLiveHelp")},10);$("#initiateChatLiveHelp").css("visibility","visible");n("Opened");p=1;initiateLoaded=0;t=0}}function n(W){i=W;e();if(W=="Accepted"||W=="Declined"){$("#initiateChatLiveHelp").css("visibility","hidden")}}function L(W){if(W=="Online"){$(".LiveHelpSlider").show()}else{$(".LiveHelpSlider").hide()}if(LiveHelp.currentStatus!=""&&LiveHelp.currentStatus!=W){$(document).trigger("LiveHelp.StatusModeChanged",[W]);LiveHelp.currentStatus=W;$(".LiveHelpStatus").each(function(){var ab=$(this).attr("src");var aa=/^[^?#]+\?([^#]+)/i;var Z=aa.exec(ab);if(Z!=null){query="?"+Z[1]+"&_="+h()}else{query="?_="+h()}$(this).attr("src",m+"../include/status.php"+query);s()})}}function s(){$(".LiveHelpStatus").each(function(){var W=k;if(W=="BRB"){W="Be Right Back"}$(this).attr("title","Live Help - "+W);$(this).attr("alt","Live Help - "+W)})}function T(Z,ab){ab=ab.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var aa="[\\?&]"+ab+"=([^&#]*)";var W=new RegExp(aa);var ac=W.exec(Z);if(ac==null){return""}else{return decodeURIComponent(ac[1].replace(/\+/g," "))}}function I(aa,W,Z){var ae="LiveHelp";if(typeof aa!="undefined"){var ac=aa.attr("class");var ad=ac.split(" ")[1];var ab=aa.children("img.LiveHelpStatus").attr("src");var W=T(ab,"DEPARTMENT")}else{var ad=this.template}if(LiveHelp.OfflineEmail==0&&LiveHelp.currentStatus!="Online"){if(LiveHelp.offlineRedirect!=""){document.location=LiveHelp.offlineRedirect}return false}else{if(typeof Z=="undefined"||Z==""){var Z="index.php"}if(typeof W=="undefined"||W==""){var W=""}else{W="&DEPARTMENT="+W}if(typeof ad=="undefined"||ad==""){var ad=""}else{ad="&TEMPLATE="+ad}B=window.open(m+"../"+Z+"?LANGUAGE="+LiveHelp.locale+W+ad,ae,o)}if(B){B.opener=self}}return{chatWidth:A,chatHeight:q,hAlign:l,vAlign:r,currentStatus:k,offlineRedirect:K,locale:d,OfflineEmail:G,displayInitiateChat:function(){R()},updateInitiateStatus:function(W){n(W)},changeStatus:function(W){L(W)},openLiveHelp:function(){I()}}}();function displayInitiateChat(){LiveHelp.displayInitiateChat()}function updateInitiateStatus(a){LiveHelp.updateInitiateStatus(a)}function changeStatus(a){LiveHelp.changeStatus(a)}function openLiveHelp(){LiveHelp.openLiveHelp()};
