var xmlHttp_GROUPS;xmlHttp_GROUPS=GetXmlHttpObject_GROUPS();function GetXmlHttpObject_GROUPS(){var a=null;try{a=new XMLHttpRequest()}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){a=new ActiveXObject("Microsoft.XMLHTTP")}}return a}function saveGroup(l,n,k,e,i,q,u,v,h,w){var A=document.getElementById("tx_name").value;var b=document.getElementById("tx_description").value;var r=document.getElementById("select_sub_category").value;var o=document.getElementById("tx_email").value;var j=document.getElementById("tx_website").value;var s=document.getElementById("tx_street").value;var m=document.getElementById("tx_country").value;var d=document.getElementById("select_visibility_group").value;var c=document.getElementById("select_new_members").value;var y=document.getElementById("select_visibility_forum").value;var t=document.getElementById("select_visibility_news").value;var a=document.getElementById("select_visibility_dates").value;var g=document.getElementById("select_rights_news").value;var p="";if(document.getElementById(v)){p=getCheckedboxes(v)}var f;f=GetXmlHttpObject_GROUPS();if(f==null){alert("Your browser does not support AJAX!");return}var x=new XMLHttpRequest();var z="P="+k+"&ID="+n+"&U="+e+"&S="+h+"&U_crypt="+i+"&chk_user="+p+"&tx_name="+encodeURIComponent(A)+"&tx_description="+encodeURIComponent(b)+"&select_sub_category="+r+"&tx_email="+encodeURIComponent(o)+"&tx_website="+encodeURIComponent(j)+"&tx_street="+encodeURIComponent(s)+"&tx_country="+encodeURIComponent(m)+"&select_visibility_group="+d+"&select_new_members="+c+"&select_visibility_forum="+y+"&select_visibility_news="+t+"&select_visibility_dates="+a+"&select_right_news="+g+"&tmpDir="+w+"";x.open("POST",l,true);x.setRequestHeader("Content-type","application/x-www-form-urlencoded");x.setRequestHeader("Content-length",z.length);x.setRequestHeader("Connection","close");x.onreadystatechange=function(){if(x.readyState==4&&x.status==200){var B=x.responseText;if(Left(B,1)=="1"){self.location.href=Right(B,B.length-1)}else{if(document.getElementById(u)){displayWithTimerAndTextForModal(q,1000,0,B,u)}}}};x.send(z)}function inviteMembers(i,j,h,d,c,k,b,a,f){var g="";if(document.getElementById(a)){g=getCheckedboxes(a)}var l;l=GetXmlHttpObject_GROUPS();if(l==null){alert("Your browser does not support AJAX!");return}var m=new XMLHttpRequest();var e="P="+h+"&ID="+j+"&U="+d+"&S="+f+"&U_crypt="+c+"&chk_user="+g+"";m.open("POST",i,true);m.setRequestHeader("Content-type","application/x-www-form-urlencoded");m.setRequestHeader("Content-length",e.length);m.setRequestHeader("Connection","close");m.onreadystatechange=function(){if(m.readyState==4&&m.status==200){var n=m.responseText;if(Left(n,1)=="1"){self.location.href=Right(n,n.length-1)}else{if(document.getElementById(b)){displayWithTimerAndTextForModal(k,1000,0,n,b)}}}};m.send(e)}function displayWithTimerAndTextForModal(g,e,b,f,a){if(document.getElementById){if(document.getElementById(a)){var d=document.getElementById(a);d.innerHTML=""+f+"";var c=document.getElementById(g);c.style.display=(c.style.display=="none"?"table":"none");if(b==1){window.setTimeout("disablediv('"+g+"')",e)}}}}var div_content="div_content";var myGroups={intern:false,userID:0,authUserID:0,init:function(){},markup:function(c){myGroups.intern=c.intern;var g=c.groups;var d=document.createElement("ul");d.className="ul-modules groups-content-"+userprofile.typeGroups;d.innerHTML="";var b=new Array();b.list=function(){userprofile.setTypeGroups("list")};var e=new filterbox();e.markup({active:"list",obj:doc.getElementById(div_content),headline:c.headline,actions:b,search:function(){myGroups.filter(d,g,this.value)},addText:i18n.translate("2099"),addAction:function(){location.href="/groups/#creategroup"},addIcon:"IS_18_Person",intern:c.intern});myGroups.filter(d,g,"");if(g.length==0){var h="";if(mygroups.userID==mygroups.authUserID){h=i18n.translateWithOneParameter("6809",'<a href="/groups/#creategroup/">'+i18n.translate("2099")+"</a>")}else{h=i18n.translate("6808")}var f=new noContentRow();f.view({obj:d,text:h})}var a=doc.createElement("div");a.className="clearBoth";d.appendChild(a);document.getElementById(div_content).appendChild(d)},filter:function(l,i,h){l.innerHTML="";var v=i18n.translate("1983");var c=i18n.translate("1982");var a=i18n.translate("6352");var x=i18n.translate("6351");var p=i18n.translate("652");var d=i18n.translate("1903");var n=i18n.translate("1902");var e=i18n.translate("1225");var b=i18n.translate("1905");var s=i18n.translate("6353");var y=i18n.translate("2077");var u=i18n.translate("2102");for(var k in i){if(i[k].headline.toLowerCase().indexOf(h.toLowerCase())==-1){continue}var o="";var f="";var r=i[k].thumbnail;if(i[k].description.length>0){o+=i[k].description}if(i[k].created!=""){if(i[k].members>1){f+='<a class="gray" href="/groups/'+i[k].alias+'/#groupmembers">'+i[k].members+" "+v+"</a>"}else{f+='<a class="gray" href="/groups/'+i[k].alias+'/#groupmembers">'+i[k].members+" "+c+"</a>"}}if(i[k].forenentries>0){if(i[k].forenentries>1){f+=', <a class="gray" href="/groups/'+i[k].alias+'/#groupforum">'+i[k].forenentries+" "+a+"</a>"}else{f+=', <a class="gray" href="/groups/'+i[k].alias+'/#groupforum">'+i[k].forenentries+" "+x+"</a>"}}var g="";var q="";switch(i[k].modifiedID){case 2:g="#groupnews";q=n;break;case 3:g="#groupdates";q=e;break;case 1:g="#groupforum";q=d;break;case 5:g="#groupforum";q=b;break}var w="";if(i[k].modifiedHeadline!=""){w+='<span class="last">'+q+" "+p+' <a class="username" href="/'+i[k].lastModifiedUserName+'/">'+i[k].lastModifiedUserName+"</a></span><br />";w+='<span class="what"><a style="color:#000;" href="/groups/'+i[k].alias+"/"+g+'">"'+i[k].modifiedHeadline+'"</a><br />';w+='<div style="height:8px;"></div>';w+='<span class="gray what">'+i[k].lastModified+"&nbsp;</span>"}else{w+='<span class="last">'+u+"</span><br />"}var m="";m+='<div class="row-inner">';m+='<div class="floatLeft grid_16">';m+='    <div class="info">';m+='        <p><a class="headline" href="/groups/'+i[k].alias+'/">'+i[k].headline+"</a></p>";m+='        <p class="savedate gray">'+f+"</p>";if(i[k].member==false&&myGroups.intern==true){m+='<button class="normal global_Button button-join" onclick="groups.join(this,'+i[k].id+",'"+i[k].headline+'\');"><i class="IS_18 IS_18_Add dib floatLeft"></i><div class="floatLeft">&nbsp;'+y+'</div><br class="clearBoth"/></button>'}m+="    </div>";m+="</div>";m+='<div class="floatLeft subinfos">';m+='    <div class="inner">';m+=w;m+="    </div>";m+="</div>";m+='<div class="pic floatLeft"><div class="pic-inner"><a href="/groups/'+i[k].alias+'/"><img src="'+r+'" /></a></div></div>';m+='<div class="clearBoth"><!----></div>';m+="</div>";var j=doc.createElement("li");j.innerHTML=m;l.appendChild(j)}}};
