// TABBING FUNCTION /////////////////////////////////////////////////////////////// var bxsets = new Array(); function sub_nav_highlight (bxset,bx) { var bxs = bxsets[bxset]; var i = 0; for(i=0; i"+xTxt+""; } /****************************************************** SIMPLE APPEND SOME STUFF IN A SPAN, ADDING SOME STYLE ATTS ******************************************************/ function append_el_txt(xEl,xTxt,xAttr) { var tarEl = document.getElementById(xEl); var nText = tarEl.innerHTML + "
"+xTxt+""; tarEl.innerHTML = nText; } /****************************************************** I'LL GET INTO THIS LATER ******************************************************/ function wgtScrollRight(wgt_action,dwgt_container) { //alert(dwgt.style.pixelLeft); if(wgt_action == 'stop') { clearInterval(mc_wgt_scr_intv_id); } else if (wgt_action == 'start') { mc_wgt_scr_intv_id = setInterval(("wgtDoScrollRight('"+dwgt_container+"')"),50); } } function wgtDoScrollRight(dwgt_container) { var dwgt = document.getElementById(dwgt_container); if(dwgt.scrollLeft <= 1200){ dwgt.scrollLeft = dwgt.scrollLeft-10; } } function wgtScrollLeft(wgt_action,dwgt_container) { if(wgt_action == 'stop') { clearInterval(mc_wgt_scr_intv_id); } else if (wgt_action == 'start') { mc_wgt_scr_intv_id = setInterval(("wgtDoScrollLeft('"+dwgt_container+"')"),50); } } function wgtDoScrollLeft(dwgt_container) { var dwgt = document.getElementById(dwgt_container); if(dwgt.scrollLeft >= 0){ dwgt.scrollLeft = dwgt.scrollLeft+10; } } /****************************************************** DRAW OVERLAY SCREEN ******************************************************/ function app_draw_screen () { // GET RELEVENT ELEMENTS var appbody = document.getElementById('AppBody'); var fscreen = document.getElementById('AppScreen'); //alert(appbody.scrollHeight); // SET SCREEN DIMENSIONS TO CLIENT WIDTH AND HEIGHT fscreen.style.width=appbody.clientWidth+'px'; fscreen.style.height=appbody.scrollHeight+'px'; //fscreen.style.height="800px"; } /****************************************************** HIDE SCREEN OVERLAY ******************************************************/ function app_remove_screen () { // GET SCREEN DIV var fscreen = document.getElementById('AppScreen'); // SET DIMENSIONS TO 0 fscreen.style.width=0+'px'; fscreen.style.height=0+'px'; } /****************************************************** SHOW ACTION CONFIRMATION ******************************************************/ function app_action_confirm(app_title, app_msg, app_url) { // DRAW SCREEN app_draw_screen(); // BUILD ALERT BOX var app_alert = ''; app_alert = '
' + '
' + '
'+ app_title +'
' + '
' + app_msg + '

' + '  ' + '' + '
'; var appbody = document.getElementById('AppAlertContainer'); // CREATE NEW DIV dv = document.createElement('div'); dv.setAttribute('id',"MsgBody"); dv.style.position="absolute"; dv.style.left=Math.ceil((document.body.clientWidth/2) - 240) + 'px'; dv.style.top=Math.ceil((appbody.scrollTop)+150) + 'px'; dv.style.zindex=100000002; dv.style.textAlign = 'center'; dv.innerHTML=app_alert; scroll(0,0); // APPEND NEW DIV appbody.appendChild(dv); } /****************************************************** ALERT AN ACTION... GENERALLY USED ON AJAX RELATED REQUESTS ******************************************************/ function app_pop_wait(app_title, app_msg) { // DRAW SCREEN app_draw_screen(); // BUILD ALERT BOX var app_alert = ''; app_alert = '
' + '
' + '
'+ app_title +'
' + '
' + app_msg + '
' + '' + '
'; var appbody = document.getElementById('AppAlertContainer'); // CREATE NEW DIV dv = document.createElement('div'); dv.setAttribute('id',"MsgBody"); dv.style.position="absolute"; dv.style.left=Math.ceil((document.body.clientWidth/2) - 240) + 'px'; dv.style.top=Math.ceil((appbody.scrollTop)+150) + 'px'; dv.style.zindex=100000002; dv.style.textAlign = 'center'; dv.innerHTML=app_alert; scroll(0,0); // APPEND NEW DIV appbody.appendChild(dv); } /****************************************************** CANCEL CONFIRMATION ACTION ******************************************************/ function app_alert_cancel() { // GET THE ELEMENTS INVOLVED var appbody = document.getElementById('AppAlertContainer'); var abox = document.getElementById('MsgBody'); // REMOVE ALERT BOX appbody.removeChild(abox); // REMOVE SCREEN app_remove_screen(); } /****************************************************** ALERT AN ACTION... GENERALLY USED ON AJAX RELATED REQUESTS ******************************************************/ function app_pop_alert(app_title, app_msg) { // DRAW SCREEN app_draw_screen(); // BUILD ALERT BOX var app_alert = ''; app_alert = '
' + '
' + '
'+ app_title +'
' + '
' + app_msg + '
' + '
' + '
'; var appbody = document.getElementById('AppAlertContainer'); // CREATE NEW DIV dv = document.createElement('div'); dv.setAttribute('id',"MsgBody"); dv.style.position="absolute"; dv.style.left=Math.ceil((document.body.clientWidth/2) - 240) + 'px'; dv.style.top=Math.ceil((appbody.scrollTop)+150) + 'px'; dv.style.zindex=100000002; dv.style.textAlign = 'center'; dv.innerHTML=app_alert; scroll(0,0); // APPEND NEW DIV appbody.appendChild(dv); } /****************************************************** SHOW ACTION CONFIRMATION ******************************************************/ function app_prep_action(app_title, app_msg, app_action) { // DRAW SCREEN app_draw_screen(); // BUILD ALERT BOX var app_alert = ''; app_alert = '
' + '
' + '
'+ app_title +'
' + '
' + app_msg + '

' + '  ' + '' + '
'; var appbody = document.getElementById('AppAlertContainer'); // CREATE NEW DIV dv = document.createElement('div'); dv.setAttribute('id',"MsgBody"); dv.style.position="absolute"; dv.style.left=Math.ceil((document.body.clientWidth/2) - 240) + 'px'; dv.style.top=Math.ceil((appbody.scrollTop)+150) + 'px'; dv.style.zindex=100000002; dv.style.textAlign = 'center'; dv.innerHTML=app_alert; scroll(0,0); // APPEND NEW DIV appbody.appendChild(dv); } // TABBING FUNCTION /////////////////////////////////////////////////////////////// var passionlist_http_request = false; var passionlist_msg_text = new String(); /****************************************************** ALERT AN ACTION... GENERALLY USED ON AJAX RELATED REQUESTS ******************************************************/ function doPassionList(passionlistid) { app_alert_cancel(); var ranNum = Math.random()*11; var ranStr = new String(ranNum); var ranNum2 = Math.random()*11; var ranStr2 = new String(ranNum2); var url = '/php/passionlist.php?&Addee=' + passionlistid + "&r="+ranStr+"&r2="+ranStr2; if (window.XMLHttpRequest) { // Mozilla, Safari,... passionlist_http_request = new XMLHttpRequest(); if (passionlist_http_request.overrideMimeType) { passionlist_http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { passionlist_http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { passionlist_http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!passionlist_http_request) { app_pop_alert('Passion List Request','Could Not Connect','Giving up :( Cannot create an XMLHTTP instance'); return false; } passionlist_http_request.onreadystatechange = passionlist_update; passionlist_http_request.open('GET', url, true); passionlist_http_request.send(null); } /****************************************************** ADD A NEW CONTACT TO USERS CONTACT LIST ******************************************************/ function passionlist_update() { if (passionlist_http_request.readyState == 4) { if (passionlist_http_request.status == 200) { passionlist_msg_text = new String(passionlist_http_request.responseText); app_pop_alert('Passion List Request',passionlist_msg_text); } else { app_pop_alert('Passion List Request','An Error Occured, please try again later.'); } } } // TABBING FUNCTION /////////////////////////////////////////////////////////////// var flirt_http_request = false; var flirt_msg_text = new String(); /****************************************************** ALERT AN ACTION... GENERALLY USED ON AJAX RELATED REQUESTS ******************************************************/ function doFlirt(flirtid,flirttype) { app_alert_cancel(); var ranNum = Math.random()*11; var ranStr = new String(ranNum); var ranNum2 = Math.random()*11; var ranStr2 = new String(ranNum2); var url = '/php/flirt.php?FlirtType='+ flirttype +'&Flirtee=' + flirtid + "&r="+ranStr+"&r2="+ranStr2; if (window.XMLHttpRequest) { // Mozilla, Safari,... flirt_http_request = new XMLHttpRequest(); if (flirt_http_request.overrideMimeType) { flirt_http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { flirt_http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { flirt_http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!flirt_http_request) { app_pop_alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } flirt_http_request.onreadystatechange = flirt_update; flirt_http_request.open('GET', url, true); flirt_http_request.send(null); } /****************************************************** ADD A NEW CONTACT TO USERS CONTACT LIST ******************************************************/ function flirt_update() { if (flirt_http_request.readyState == 4) { if (flirt_http_request.status == 200) { flirt_msg_text = new String(flirt_http_request.responseText); app_pop_alert('Passion Flirt',flirt_msg_text); } else { rand_new_headline = ('There was a problem with the request.'); } } }