var sa=0;var li=0;var exp=new Date();exp.setTime(exp.getTime()+30758400000);var agt=navigator.userAgent.toLowerCase();var vr=navigator.appVersion.toLowerCase();
var sfr=((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
var isie=((document.all)&&((vr.indexOf('msie'))!=-1)&&(agt.indexOf("opera")==-1)&&((agt.indexOf('konqueror'))==-1)&&(!sfr))?true:false;
if(self!=top){if(document.all){top.location.replace(window.location.href);}else{top.location.href=window.location.href;}}
function openWin(u,t,x,y,s){var op=window.open(u,t,'width='+x+',height='+y+',location=no,status=yes,toolbar=no,directories=no,menubar=no,scrollbars='+s+',resizable=no');op.focus();}
function bc(x){document.cookie="bw="+escape(x)+"; path=/; expires="+exp.toGMTString();}
function activateJS(x){sa=1;li=x;}
function bl(o){if(o==1){hs('bw1','visible');hs('bw2','hidden')}
else{hs('bw2','visible');hs('bw1','hidden')}bc(o);}
function hs(o,s){if(isie)document.all[o].style.visibility=s;}
function da(d){if(isie){var dw=document.body.clientWidth;var dh=document.body.clientHeight;
document.all[d].style.left=(dw-190);document.all[d].style.top=1;}}
function bb(x){da('bw1');da('bw2');bl(x);}
function rez(){if(sa==1&&li==1){da('bw1');da('bw2')}}
function ca(x){for(var j=1;j<=x;j++){box=eval("document.msg.d"+j);if(box!=null){box.checked=true;}}}
function ua(x){for(var j=1;j<=x;j++){box=eval("document.msg.d"+j);if(box!=null){box.checked=false;}}}
function get_checked(member_id){var strChecked = ''; var intNoOfChkBoxes = document.msg.id_no_of_msgs.value; var hidden; var box; for(var j=1;j<=intNoOfChkBoxes;j++) {box=eval("document.msg.d"+j); hidden=eval("document.msg.id"+j);if(box!=null){if(box.checked){strChecked += hidden.value+";";}}}document.msg.arr_delete.value=strChecked;document.msg.submit();}
function get_keepasnew_checked(member_id){var strChecked = ''; var intNoOfChkBoxes = document.msg.id_no_of_msgs.value; var hidden; var box; for(var j=1;j<=intNoOfChkBoxes;j++) {box=eval("document.msg.d"+j);hidden=eval("document.msg.id"+j); if(box!=null){if(box.checked){strChecked += hidden.value+"|";}}}if(strChecked!=''){strChecked = strChecked.substring(0,strChecked.length-1);}document.msg.keepasnew.value=strChecked;document.msg.submit();}
function SetAddBuddy(){if(document.msg.add_buddy.checked){document.msg.id_buddy.value='true';}else{document.msg.id_buddy.value='false';}}
function selectAll(x){for(var j=1;j<=x;j++){box=eval("document.buddies.c"+j);if(box!=null){box.checked=true;}}}
function deselectAll(x){for(var j=1;j<=x;j++){box=eval("document.buddies.c"+j);if(box!=null){box.checked=false;}}}
function crazy_text(){var obj_content = document.msg.content; var content = obj_content.value; var crazy_increment = '', crazy_text = '', i = 1; if(content==''){crazy_text='EnTeR YoUr tExT HeRe bEfOrE UsInG CrAzY TeXt.';}else{for(var j=0;j<content.length;j++){if(content.substring(j,j+1)!=' '){if(i==1){crazy_increment = content.substring(j,j+1).toUpperCase(); i=2;} else if(i==2){crazy_increment = content.substring(j,j+1).toLowerCase(); i=1}}else{crazy_increment=' ';}   crazy_text+=crazy_increment;}}if(crazy_text!='')obj_content.value=crazy_text;}
function rS(){var p=["amusing","slithering","purple","fluffy","idle","sour","squiggly","golden","hot","rubbish","hairy","mysterious","dreadful","fruity","forbidden","emergency","backdoor","tremendous","frumpy","eccentric","defenseless","triumphant"];var q=["beaver","snorkel","rasta","pocket","goat","didgeridoo","mud","string","tramp","stunt","toy","panda","sponge","spectacular","fanny","cartoon","rubbish","breakfast","armpit","turnips","monster","infestation","conspiracy"];var r=["pervert","sex","puppet","thief","jelly","syndrome","ghosts","hut","muffins","frenzy","burger","picnic","buttocks","soldier","bra","bubbles","dreams","antidote","waffle"];if (Math.round(Math.random()*1)==0){fo('msg').subject.value=q[Math.round(Math.random()*18)]+" "+r[Math.round(Math.random()*18)]}else{fo('msg').subject.value=p[Math.round(Math.random()*21)]+" "+q[Math.round(Math.random()*22)]}}
function fo(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}if(!(x=d[n])&&d.all) x=d.all[n];for(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=fo(n,d.layers[i].document);return x;}
function readCookie(name){
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}