var ipadd = '54.157.81.13'; var sid = 'd72fdbf51613660c42c1889f282eb755'; var sname = 'PHPSESS'; var url = 'http://www.quicktechsupport.com/php/support/'; var timerID; var new_req; var new_info; var new_track; var new_req = new Image; var new_info = new Image; var g_data = {returncommand:""}; var start_req = getstamp(); var time_elapsed; var already_know = 0; var show_typing = 1; var chat_timer = 1; var wait_timer = 1; var sstatus = 1; var error; var date; var ns=(document.layers); var ie=(document.all); var w3=(document.getElementById); function getstamp() { date = new Date(); return date.getTime(); } function gettime () { var curDateTime = new Date(); var curHour = curDateTime.getHours(); var curMin = curDateTime.getMinutes(); var curSec = curDateTime.getSeconds(); var curAMPM = " AM"; var curTime = ""; if (curHour >= 12) { curHour -= 12; curAMPM = " PM"; } if (curHour == 0) curHour = 12; curTime = curHour + ":" + ((curMin < 10) ? "0" : "") + curMin + ":" + ((curSec < 10) ? "0" : "") + curSec + curAMPM; return curTime; } // Chat Request Image var theImage; var yPos = 150; var xPos = 0; var dSign = 1; var proactive; function imageObject () { if (document.getElementById) theImage = document.getElementById("imageObject"); else if (document.layers) theImage = document.layers["imageObject"]; else if (document.all) theImage = document.all.item("imageObject"); if (theImage) { hideObj(theImage); doRightToLeft(); } } function doRightToLeft() { xPos = screen.width+250; dSign = 1; moveObjTo(theImage, xPos, yPos); showObj(theImage); moveHoriz(); } function moveHoriz () { var dec = Math.sqrt(xPos); xPos -= dec; if (0 < xPos) { moveObjTo(theImage, (xPos * dSign), yPos); setTimeout("moveHoriz()", 40); } else { moveObjTo(theImage, 0, yPos); } } function moveObjTo (obj, x, y) { if (!obj.style) { obj.top = y; obj.left = x; } else { obj.style.top = y + "px"; obj.style.left = x + "px"; } } function showObj (obj) { if (!obj.style) obj.visibility = "visible"; else obj.style.visibility = "visible"; } function hideObj (obj) { if (!obj.style) obj.visibility = "hidden"; else obj.style.visibility = "hidden"; } proactive = ''; proactive += '
'; proactive += '
Close [X]
'; proactive += ''; proactive += '
'; document.write(proactive); // End Chat Request Image function loadDoc (url, postdata, d_type) { var req; req = false; if (window.XMLHttpRequest) { try { req = new XMLHttpRequest(); } catch(e) { req = false; } } else if (window.ActiveXObject) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { req = false; } } } if(req) { req.open("POST", url, true); req.onreadystatechange = function() { if (req.readyState == 4 && req.status == 200 && d_type != "") { eval("g_data."+d_type+" = req.responseText;"); eval("cb_"+d_type+"();"); } } req.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); req.send(postdata); } } function toggle_stype(show) { if (show == 1) { document.getElementById('typing').style.display = 'block'; document.getElementById('typing').style.visibility = 'visible'; } else { document.getElementById('typing').style.display = 'none'; document.getElementById('typing').style.visibility = 'hidden'; } } function toggle_tran(open) { if (open == 1) { document.getElementById('tranContainer').style.display = 'block'; document.getElementById('tranContainer').style.visibility = 'visible'; } else { document.getElementById('tranContainer').style.display = 'none'; document.getElementById('tranContainer').style.visibility = 'hidden'; } } function fillDIV (inner_cont, inner_layer, append) { if (w3) e = document.getElementById(inner_layer); else if (ie) e = document.all[inner_layer]; else if (ns) e = document.layers[inner_layer]; if (append == 1) { e.innerHTML += inner_cont; } else { e.innerHTML = inner_cont; } } function getSess () { return "&"+sname+"="+sid+"&ipadd="+ipadd; } function ToggleSound () { loadDoc(url+"dispatch.php?m=_sound&d=js"+getSess(),"","returncommand"); } function SoundOut (fname){ e = document.sounds_out; if (e && sstatus == 1) { if(typeof e.TGotoLabel != "undefined"){ e.TGotoLabel("/", fname); e.TPlay("/"); } } } function openPush (url) { var settings = 'scrollbars=yes,location=yes,resizable=yes,status=yes,menubar=yes,toolbar=yes'; toopen=window.open(url,'_PUSH',settings); try { toopen.window.focus(); } catch(e) { } } function openChat (url, height, width, winn, scrollz) { var winl = (screen.width-width)/2; var wint = (screen.height-height)/2; var settings = 'height='+height+',width='+width+',top='+wint+',left='+winl+',scrollbars='+scrollz+',resizable=yes,menubar=no'; toopen=window.open(url,winn,settings); try { toopen.window.focus(); } catch(e) { } } function startchat (dep, sitename) { openChat(url+'chat.php?dep='+dep+"&site="+sitename+getSess(), 354, 450, '_CHAT', 'no'); } function PrintChat () { openChat(url+'dispatch.php?m=_print&d=js&'+getSess(), 354, 450, '_PRINT', 'yes'); } function ScrollToBot (div) { var objDiv = document.getElementById(div); objDiv.scrollTop = objDiv.scrollHeight; } function getPosts () { loadDoc(url+"dispatch.php?m=_posts&d=js"+getSess(),"","returncommand"); } function getWait () { loadDoc(url+"dispatch.php?m=_wait&d=js"+getSess(),"","returncommand"); } function trackME () { page = escape(location.toString()); new_track = new Image; new_track.src = url+"dispatch.php?m=_track&d=js&page="+page+getSess(); } function storeInfo () { sheight = screen.height; swidth = screen.width; ref = escape(document.referrer); localt = gettime(); new_info = new Image; new_info.src = url+"dispatch.php?m=_info&d=js&sheight="+sheight+"&swidth="+swidth+"&ref="+ref+"&localt="+localt+getSess(); } function show_req() { loaded_req = new_req.width; if (loaded_req) imageObject(); } function getRequests () { stamp = getstamp(); localt = gettime(); time_elapsed = stamp - start_req; if (time_elapsed < 1800000) { new_req = new Image; new_req.src = url+"dispatch.php?m=_reqs&d=js&localt="+localt+getSess(); new_req.onload = show_req; } } function toggle_type () { loadDoc(url+"dispatch.php?m=_type&d=js&cmd=off","",""); already_know = 0; } function is_typing (keyid) { var kid = document.layers?keyid.which:keyid.keyCode; if (kid == 13) { do_submit(1); return false; } if (already_know == 0 && show_typing == 1) { already_know = 1; loadDoc(url+"dispatch.php?m=_type&d=js&cmd=on&","",""); setTimeout("toggle_type()",5000); } return true; } function survey_show () { loadDoc(url+"dispatch.php?m=_survey&d=js"+getSess(),"","returncommand"); } function LeaveMessage () { wait_timer = 0; loadDoc(url+"dispatch.php?m=_mess&d=js"+getSess(),"","returncommand"); } function initiate (dep) { loadDoc(url+"dispatch.php?m=_init&d=js&dep="+dep+getSess(),"","returncommand"); } function do_submit (form) { var postSTR = ''; var cmd = document.forms[form].elements["cmd"].value; for(i=0; i