/* * updated 2004-05-19 */ //return true or false function isUserAgent() { return document.getElementById && (window.attachEvent || window.addEventListener); } //global function function getNextSiblingByNodeName(element, nodeName) { do element = element.nextSibling; while (element && (element.nodeName.toLowerCase() != nodeName.toLowerCase())); return element; } function getFirstChildByNodeName(element, nodeName) { element = element.firstChild; if (element && (element.nodeName.toLowerCase() != nodeName.toLowerCase())) return getNextSiblingByNodeName(element, nodeName); else return element; } function getParentNodeByName(element, nodeName) { if(!isUserAgent) return; //cut off do element = element.parentNode; while (element && (element.nodeName.toLowerCase() != nodeName.toLowerCase())); return element; } function getObj (x){ obj = document.getElementById(x); return obj; } //swap all checkboxes by the element ID function invertAllCheckbox(id) { var root = getObj(id); var boxes = root.getElementsByTagName("input"); for(i=0; i OM_maxLimit) { alert(OM_errorMaxLimitExceeded); return false; } for ( i=0; i < m1len; i++){ m1.options[i].selected = true; } return true; } function avicom_validatePaymentOption(frm) { var x = frm.programType; var result = false; //alert(x.id); for (i = 0; i < x.length; i++) { if (x[i].checked) result = x[i].value; } if (!result) { alert (msgMVC_selectProgramWarning); return false; } else { return true; } } function ccbill_validatePaymentOption(frm) { var x = frm.programType; var result = false; for (i = 0; i < x.length; i++) { if (x[i].checked) result = x[i].value; } if (!result) { alert (msgMVC_selectProgramWarning); return false; } else { return true; } } var msg1 = "Mode 3 available in Hardcore Chat only! \nStart HARDCORE Chat NOW ?"; var msg2 = "Mode 3 available in Hardcore Chat only! \nNot enough coins for Hardcore!!! \nDo you want to buy more coins ?"; var msg3 = "Hardcore chat request failed or is already in progress! \nPlease try again directly from chat!"; var msg4 = "Hardcore chat request has been sent to the girl!!"; var msg5 = "Start HARDCORE Chat NOW ?"; var msg6 = "Not enough coins !!!"; var msg7 = "Not enough coins !!! Do you want to buy some coins ?"; var msgAudioON = "Audio ON"; var msgAudioOFF = "Audio OFF"; var IID_openMode3 = false; var camSrc = ''; var doAVSCheck = false; //global vars var fileClientInChat = 'in_chat.php'; var isCamShown = false; var reloadID_INTERVAL = false; var msgSecurityBreachRightClick = ' - | - '; //if (document.layers) window.captureEvents(Event.MOUSEDOWN); //window.onmousedown = document.onmousedown = rightClick; //handle right mouse click function rightClick(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert(msgSecurityBreachRightClick); return false; } return true; } //DoFSCommand: PX coins counter function client_coins_counter_DoFSCommand(command, args) { switch (command) { case 'pxShow': pxShow(args); break; } } //DoFSCommand: Chat client function chat_client_DoFSCommand(command, args) { switch (command) { case 'pxShow': pxShow(args); break; case 'showCam': showCam(args); break; } } function openCam(param) { var param = (param)? param : ""; var url = "main.php" + param; var width = 745; var height = 390; camWin = window.open(url, 'mainWindow', 'width=' + width + ', height=' + height); camWin.location = camWin.href = url; return false; } function closeCam() { parent.opener.location.reload(); parent.self.close() } function showCam(url) { //isCamShown = false; var x = getObj("camview"); if (!getObj("camsrc")) { x.innerHTML = ''; } setTimeout("showCamDelayed()", 2000); camSrc = url; } function showCamDelayed() { if(camSrc.length == 0) return; frames['camsrc'].location.href = camSrc; } function resetCam() { //return; var x = getObj("camview"); if (!getObj("camsrc")) { x.innerHTML = ''; } frames['camsrc'].location.href = 'http://www.6-chats.com/chat/cam/blank.html'; } function camReload() { return; if (isCamShown) return; frames['camsrc'].location.reload(); isCamShown = true; if (reloadID_INTERVAL) { clearInterval(reloadID_INTERVAL); reloadID_INTERVAL = false; } } function mpSetDisplaySize(mp, size) { if (activeX) mp.displaySize = size else mp.SetDisplaySize(size); } function initChatView() { initChat(); } function initCam() { //return; } function switchSound() { if(!top.camsrc) return false; var m = top.camsrc.document.getElementById('MediaPlayer'); if(!m) return false; if(!m.Volume) return false; var lbl = getObj('linksound-label'); if (m.Volume != -10000) { m.Volume = -10000; lbl.firstChild.nodeValue = msgAudioON; } else { m.Volume = -602; lbl.firstChild.nodeValue = msgAudioOFF; } return false; } function openFullPopChat(url) { if (IID_openMode3 != false) { return false; } clearInterval(IID_openMode3); IID_openMode3 = false; var url = url; var name = 'fullpop' var w = window.screen.availWidth; var h = window.screen.availHeight; var t = 0; var l = 0; var s = 1; features = "width="+w+",height="+h+",left="+l+",top="+t; features += ",screenX="+l+",screenY="+t; features += ",scrollbars="+s+",resizable=1,location=0"; features += ",menubar=0,toolbar=0,status=0"; var fullpopWin = window.open(url, name, features); fullpopWin.location = fullpopWin.href = url; fullpopWin.opener.location = fullpopWin.opener.href = pathMember + fileClientInChat; return false; } function setFixedMode(gid, mode) { var currentOpener = window.opener; if (currentOpener) { currentOpener.location = currentOpener.href = pathChat + fileClientChat + '?mode=' + mode +'&gid='+gid window.close(); } return false; } function backToFixedMode(link) { var url = link.href; var currentOpener = window.opener; if (currentOpener) { currentOpener.location = currentOpener.href = url; currentOpener.focus(); window.close(); } return false; } function chatRedir(url) { //alert(url);return; var o = window.opener; if (o) { o.location = o.href = url; o.focus(); window.close(); } else { window.location = window.href = url; } } //beg: initMode3 function initMode3(hasCoins, isHC, gid, nid, sid) { if (!getObj('modelink-3')) return; var link = getObj('modelink-3'); if (isHC == 'true') { if (hasCoins) { url = pathChat + fileClientChat+ '?mode=3&gid='+gid; link.onclick = function () { return startMode3(url); } } } else { if (hasCoins && link) { link.href = '#'; link.onclick = function () { //offer the HC option if (confirm(msg1)) { requestHC (gid, nid, sid); return false; } else { return false; } } } else { //offer buy coins if (link) { link.href = pathMember + 'buy_coins.php'; link.onclick = function () { return confirm(msg2); } } } } } //end initMode3 //init full pop modes function initChat(flashWidth) { window.moveTo(0,0); var maxW = screen.availWidth; var maxH = screen.availHeight; window.resizeTo(maxW, maxH); var setWidth = maxW - flashWidth; var setHeight = (setWidth / 1.33); getObj('camview').style.width = setWidth + 'px'; getObj('camview').style.height = setHeight + 'px'; } function hideChatGUI(link) { //getObj('camview').style.display = 'none'; //getObj('cam').style.display = 'none'; //getObj('flashpart').style.display = 'none'; window.location = window.href = link.href; return false; } function pxShow(url) { var x = getObj("pxview"); x.innerHTML = ''; var y = getObj("pxViewIF"); //url = url + "&java=0"; //alert(url); var urlFinal = new String(url); urlFinal = urlFinal.replace("http://www.px24.com/loader.asp", "http://www.px24.com/flashclient/load_client.php"); urlFinal += "&disableFullScreen=1"; y.src = urlFinal; } function offerBuyCoins() { if (confirm(msg7)) { window.href = window.location = pathMember + 'buy_coins.php'; return true; } else { window.href = window.location = pathPublic; } } function switchChat(url, mode) { window.href = window.location = url; } function gotoAVSPage() { if (doAVSCheck == true) { window.href = window.location = pathAVS; } } function initChatFocus() { if (document.getElementById("chat_client")) { if (navigator.userAgent.toLowerCase().indexOf("msie") != -1){ var x = document.getElementById("chat_client"); x.focus(); } } } /******************************** * beg: Chat Banners ********************************/ function bnrRequestHC (gid, nid, sid) { if (confirm(msg5)) { rpc_IMX_requestHC (gid, nid, sid); } } function bnrSwitchMode3 (gid, nid, sid) { if (confirm(msg5)) { rpc_IMX_requestHC (gid, nid, sid); } } /******************************** * end: Chat Banners ********************************/ function _getFlash(mc) { if (window.document[mc]) { return window.document[mc]; } if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[mc]) return document.embeds[mc]; } else { return document.getElementById(mc); } } function _callFlashMethod(methodName) { var swf = _getFlash("chat_client"); if (!swf) { alert('flash object with id *chat_client* not found'); return; } swf.SetVariable("/_root/externalMethodCaller:callMethod", methodName); } // RPC2 clientLogout function rpc2_TKC_chatLogout() { _callFlashMethod('socketLogout'); //alert("Bye..."); return false; } var pathMember = '../member/'; var pathPublic = '../public/'; var pathChat = '../chat/'; var pathRpc = '../chat/rpccall.php'; var fileClientChat = 'client.php'; var pathAVS = './../member/avs_check.php?refchat=1'; //local HC request function requestHC (gid, nid, sid) { if (doAVSCheck == true) { gotoAVSPage(); return; } rpc_IMX_requestHC(gid, nid, sid); } //local start mode 3 function startMode3(url) { //IID_openMode3 = setInterval('openFullPopChat(url)', 1000) //return false; return openFullPopChat(url) } /******************************** * beg: rpc IMX chats ********************************/ function rpc_IMX_imxPXClose(nid, sid) { var url = pathRpc + '?mode=imx&type=pxLogout&client='+nid + '&sid='+sid ; url += '×tamp=' + new Date().getTime(); var i = new Image(); i.onload = function() { window.close() }; i.onerror = function() { window.close() }; i.src = url; } function rpc_IMX_ChatClose(nid, sid) { var url = pathRpc + '?mode=imx&type=chatLogout&client='+nid + '&sid='+sid ; url += '×tamp=' + new Date().getTime(); var i = new Image(); i.onload = function() { window.close() }; i.onerror = function() { window.close() }; i.src = url; } function rpc_IMX_requestHC(gid, nid, sid) { var i = new Image(); var url = pathRpc + '?mode=imx&type=hcRequest&gid='+gid + '&nid='+nid + '&sid='+sid ; url += '×tamp=' + new Date().getTime(); i.onload = function() { rpc_IMX_onDataRequestHC(this.width) }; i.onerror = function() { alert (msg3) }; i.src = url; return false; } function rpc_IMX_onDataRequestHC (result) { if (result == 2) { alert (msg4);//OK } else if (result == 3) { if (confirm(msg7)) { window.href = window.location = pathMember + 'buy_coins.php'; } } else { alert (msg3);//false } } /******************************** * end: rpc IMX chats ********************************/ /******************************** * beg: tkc Module ********************************/ function tkc_chatSysMessage(msgType) { var code = 0; var redirUrl = null; switch(msgType) { case 'kicked': code = 4; break; case 'logout': code = 5; break; case 'listing': code = 3; break; case 'buy_coins': redirUrl = './../member/buycoins.php' break; } if (code == 0) { code = 3; } if (redirUrl) { chatRedir(redirUrl); return; } redirUrl = '../public/index.php?refchat='+ code; chatRedir(redirUrl); } var pathMember = './'; var pathPublic = './'; var pathChat = './'; var pathRpc = '../chat/rpccall.php'; var fileClientChat = 'clientchat.php'; var pathAVS = './avs_check.php?refchat=1'; var promoStreamBaseDir = './../public/'