function launch_webcam(who,name){if(camera_1==who){camera_object_1.show();return;} if(camera_2==who){camera_object_2.show();return;} if(camera_1==''){camera_1=who;camera_object_1=dhtmlwindow.open("dhtml_camera_1","div","webcam_image_div_1",name+"'s Webcam","width=324,height=240,resize=0,scrolling=0");camera_object_1.moveTo(150,150);camera_object_1.onclose=function(){return close_webcam(who)} return;} if(camera_2==''){camera_1=who;camera_object_2=dhtmlwindow.open("dhtml_camera_2","div","webcam_image_div_2",name+"'s Webcam","width=320,height=240,resize=0,scrolling=0");camera_object_2.moveTo(300,300);camera_object_2.onclose=function(){return close_webcam(who)} return;} alert('You are only allowed 2 cameras at one time.');} function close_webcam(who){if(camera_1==who){camera_1='';} if(camera_2==who){camera_2='';} return true;} function menu_popup(left,which){menu=document.getElementById('bottom_menu');title=document.getElementById('menu_popup_title_'+which);options=document.getElementById('menu_popup_options_'+which);document.getElementById('menu_popup_title_home').style.display='none';document.getElementById('menu_popup_title_profile').style.display='none';document.getElementById('menu_popup_title_mail').style.display='none';document.getElementById('menu_popup_title_fortunes').style.display='none';document.getElementById('menu_popup_title_spells').style.display='none';document.getElementById('menu_popup_title_articles').style.display='none';document.getElementById('menu_popup_title_videos').style.display='none';document.getElementById('menu_popup_title_covens').style.display='none';document.getElementById('menu_popup_title_members').style.display='none';document.getElementById('menu_popup_title_forums').style.display='none';document.getElementById('menu_popup_options_home').style.display='none';document.getElementById('menu_popup_options_profile').style.display='none';document.getElementById('menu_popup_options_mail').style.display='none';document.getElementById('menu_popup_options_fortunes').style.display='none';document.getElementById('menu_popup_options_spells').style.display='none';document.getElementById('menu_popup_options_articles').style.display='none';document.getElementById('menu_popup_options_videos').style.display='none';document.getElementById('menu_popup_options_covens').style.display='none';document.getElementById('menu_popup_options_members').style.display='none';document.getElementById('menu_popup_options_forums').style.display='none';if(menu_display==left||left==-1){menu.style.display='none';menu_display=-1;}else{title.style.display='inline';options.style.display='inline';menu.style.display='inline';menu_display=left;} menu.style.left=left;} function config_popup(){config=document.getElementById('config_menu');chat=document.getElementById('chat_menu');chat.style.display='none';chat_display=0;if(config_display==0){config.style.display='inline';config_display=1;}else{config.style.display='none';config_display=0;}} function chatbox_set(box,title,log,online){if(box==1){chatter_chatlog_1=log;chatter_online_1=online;chatter_who_1=who;} if(box==2){chatter_chatlog_2=log;chatter_online_2=online;chatter_who_2=who;} if(box==3){chatter_chatlog_3=log;chatter_online_3=online;chatter_who_3=who;} if(box==4){chatter_chatlog_4=log;chatter_online_4=online;chatter_who_4=who;}} function chatbox_show_chatters(){document.getElementById('chatbox_chatlog').style.display='none';document.getElementById('chatlog_td').style.backgroundColor='ffeec2';document.getElementById('chatbox_online').style.display='inline';document.getElementById('online_td').style.backgroundColor='ffffff';} function chatbox_show_chat(){document.getElementById('chatbox_online').style.display='none';document.getElementById('online_td').style.backgroundColor='ffeec2';document.getElementById('chatbox_chatlog').style.display='inline';document.getElementById('chatlog_td').style.backgroundColor='ffffff';} function chat_popup(){config=document.getElementById('config_menu');chat=document.getElementById('chat_menu');config.style.display='none';config_display=0;if(chat_display==0){chat.style.display='inline';chat_display=1;}else{chat.style.display='none';chat_display=0;}} function chatbox_popup(box,action){chatbox=document.getElementById('chatbox_window');chatlog=document.getElementById('chatbox_chatlog');chatters=document.getElementById('chatbox_online');chattitle=document.getElementById('chatbox_title');chatin=document.getElementById('chatbox_input');if(box==-1){box=current_chatbox;} if(action==1){return} if(box==current_chatbox){chatbox.style.display='none';current_chatbox=-1;}else{current_chatbox=box;chatbox.style.display='inline';chatbox_show_chat();chatin.value='';if(box==1){chatbox.style.right=660;window.frames.chatbox_chatlog.set_content(chatter_chatlog_1);window.frames.chatbox_online.set_content(chatter_online_1);chattitle.firstChild.data=chatter_title_1;} if(box==2){chatbox.style.right=530;window.frames.chatbox_chatlog.set_content(chatter_chatlog_2);window.frames.chatbox_online.set_content(chatter_online_2);chattitle.firstChild.data=chatter_title_2;} if(box==3){chatbox.style.right=372;window.frames.chatbox_chatlog.set_content(chatter_chatlog_3);window.frames.chatbox_online.set_content(chatter_online_3);chattitle.firstChild.data=chatter_title_3;} if(box==4){chatbox.style.right=220;window.frames.chatbox_chatlog.set_content(chatter_chatlog_4);window.frames.chatbox_online.set_content(chatter_online_4);chattitle.firstChild.data=chatter_title_4;}}} function AskMoraMini(){objPage=document.getElementById('morasaysmini');objPage.value='Mora says:';setTimeout("MorasAnswerMini()",1500);} function MorasAnswerMini(){objPage=document.getElementById('morasaysmini');num=(Math.round(Math.random()*4)+1);if(num>4)num=1;if(num==1)objPage.value='Mora says: Yes';if(num==2)objPage.value='Mora says: No';if(num==3)objPage.value='Mora says: Maybe';if(num==4)objPage.value='Mora says: Probably Not';} function chat_visibility(which){document.getElementById('public_chat').style.display='none';document.getElementById('coven_chat').style.display='none';document.getElementById('mod_chat').style.display='none';document.getElementById('public_tab').style.backgroundColor='#dddddd';document.getElementById('coven_tab').style.backgroundColor='#dddddd';document.getElementById('mod_tab').style.backgroundColor='#dddddd';document.getElementById(which+'_chat').style.display='inline';document.getElementById(which+'_tab').style.backgroundColor='#ffffff';} function chattertalk(ta,evt,chan,u,t,r){var charCode=(evt.which)?evt.which:evt.keyCode;if(charCode==13){if(req2){return false;} if(window.XMLHttpRequest){try{req2=new XMLHttpRequest();}catch(e){req2=false;}}else if(window.ActiveXObject){try{req2=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{req2=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){req2=false;}}} req2.open("POST",r+"/chatter/gateway.adp",true);req2.onreadystatechange=sendStateChange;req2.setRequestHeader('Content-Type','application/x-www-form-urlencoded');var encoded="";encoded="u="+u+"&t="+t+"&c="+escape(chan)+"&m="+encodeURIComponent(ta.value);req2.send(encoded);ta.value='';return false;} return true;} function sendStateChange(){if(req2.readyState!=4){return;} req2=null;}