/* FILE /web/resource/lib_dev.js */
var my_posx=0;var my_posy=0;function newHeadlineSend(){var a=document.getElementById("newHeadlineTextbox");if(a.value=="Was machst du gerade?"){a.value=""}}function newHeadlineReset(){document.getElementById("newHeadlineTextbox").value="Was machst du gerade?"}function setCursor(c,b,a){if(c.setSelectionRange){c.focus();c.setSelectionRange(b,a)}else{if(c.createTextRange){range=c.createTextRange();range.collapse(true);range.moveEnd("character",a);range.moveStart("character",b);range.select()}}}function restoreUmlaute(a){a=a.replace(/\&ouml;/g,"ö");a=a.replace(/\&uuml;/g,"ü");a=a.replace(/\&auml;/g,"ä");a=a.replace(/\&Ouml;/g,"Ö");a=a.replace(/\&Uuml;/g,"Ü");a=a.replace(/\&Auml;/g,"Ä");return a}function trim(a){return a.replace(/^\s+/,"").replace(/\s+$/,"")}function addslahes(a){a=a.replace(/\\/g,"\\");a=a.replace(/'/g,"\\'");return a}function htmlspecialchars(a,b){a=a.toString();a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(b=="ENT_QUOTES"){a=a.replace(/"/g,"&quot;");a=a.replace(/'/g,"&#039;")}else{if(b!="ENT_NOQUOTES"){a=a.replace(/"/g,"&quot;")}}return a}function hideSmallInfo(a,b){active_smallinfo_element="smallInfo"+b+a;active_smallinfo_timer=window.setTimeout("hideSmallInfoTotal()",500);window.clearTimeout(active_smallinfo_load_timer)}active_smallinfo_timer=null;active_smallinfo_element=null;active_smallinfo_load_element_id=null;active_smallinfo_load_timer=null;active_smallinfo_load_nickname=null;function hideSmallInfoTotal(){if(active_smallinfo_element!=null){hideDiv(active_smallinfo_element)}}function showSmallInfo(a,b){hideSmallInfoTotal();window.clearTimeout(active_smallinfo_timer);window.clearTimeout(active_smallinfo_load_timer);element_id="smallInfo"+b+a;parent_left=position_left(document.getElementById(element_id).parentNode);parent_top=position_top(document.getElementById(element_id).parentNode);document.getElementById(element_id).style.left=(parent_left+181)+"px";document.getElementById(element_id).style.top=(parent_top-24)+"px";if(typeof(document.getElementById(element_id).hasAjaxContent)=="undefined"){LoadAjaxWaitingSmallImage(element_id);active_smallinfo_load_nickname=a;active_smallinfo_load_element_id=element_id;active_smallinfo_load_timer=window.setTimeout("loadSmallInfo()",400)}showDiv(element_id)}function loadSmallInfo(){document.getElementById(active_smallinfo_load_element_id).hasAjaxContent=true;new Ajax.Updater(active_smallinfo_load_element_id,"/user/smallInfo/nickname/"+active_smallinfo_load_nickname,{asynchronous:true,evalScripts:false})}Array.prototype.copy=function(){return this.slice(0,this.length)};function str_replace(c,b,a){return a.split(c).join(b)}var active_timer=null;var active_navigation=null;function position_left(a){if(a.offsetParent==null){return a.offsetLeft}else{return a.offsetLeft+position_left(a.offsetParent)}}function position_top(a){if(a.offsetParent==null){return a.offsetTop}else{return a.offsetTop+position_top(a.offsetParent)}}function show_navigation(b,a){hide_navigation_total();window.clearTimeout(active_timer);active_navigation=document.getElementById(a);active_navigation.style.top=(position_top(b)+20)+"px";active_navigation.style.left=(position_left(b)-5)+"px";active_navigation.style.display=""}function hide_navigation(a){active_navigation=a;active_timer=window.setTimeout("hide_navigation_total()",500)}function hide_navigation_total(){if(active_navigation!=null){nav_pos_x_min=position_left(active_navigation);nav_pos_x_max=nav_pos_x_min+active_navigation.offsetWidth;nav_pos_x_min+=20;nav_pos_x_max-=20;nav_pos_y_min=position_top(active_navigation);nav_pos_y_max=nav_pos_y_min+active_navigation.offsetHeight;nav_pos_y_min+=20;nav_pos_y_max-=20;if(my_posx<=nav_pos_x_min||my_posx>=nav_pos_x_max||my_posy<=nav_pos_y_min||my_posy>=nav_pos_y_max){active_navigation.style.display="none"}}}function keep_navigation(a){window.clearTimeout(active_timer);this_menu=document.getElementById(a);this_menu.style.display=""}function changeTabMessenger(a){showDiv("global"+a);document.getElementById("tab"+a).className="tabActive";if(a=="Visitor"){loadVisitor();hideDiv("globalFriendOnline");document.getElementById("tabFriendOnline").className="tabInactive"}else{hideDiv("globalVisitor");document.getElementById("tabVisitor").className="tabInactive";loadFriendsOnline()}}var map;var gdir;var geocoder=null;var addressMarker;function load(){if(typeof(start_google_maps)=="boolean"){if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));gdir=new GDirections(map,document.getElementById("directions"));map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());setDirections()}}}function unload(){if(typeof(start_google_maps)=="boolean"){GUnload()}}function setDirections(a){if(document.getElementById("maps_from").value==""){document.getElementById("maps_from").value=document.getElementById("maps_to").value}gdir.load("from: "+document.getElementById("maps_from").value+" to: "+document.getElementById("maps_to").value,{locale:"de_De"});if(isIE&&a!=1){setTimeout("setDirections(1, 500);")}}function updateJSON(request,json){var responses=json;if(!json){var responses=eval("("+request.responseText+")")}var resSize=responses.length;for(var i=0;i<resSize;i++){if(responses[i][0]=="execute"){eval(responses[i][1])}else{if(responses[i][0]=="update_message"){loadUnreadMessages()}else{if(responses[i][0]=="update_friend"){loadFriendsOnline()}else{if(responses[i][0]=="playsound"){playsound(responses[i][1])}else{if(responses[i][0]=="global_count_message"&&document.getElementById("topMessageUnread").style.display!="none"&&responses[i][1]!=document.getElementById("global_count_message").innerHTML){loadUnreadMessages()}else{if(responses[i][0]=="global_count_friends_online"&&document.getElementById("topFriendsOnline").style.display!="none"&&responses[i][1]!=document.getElementById("global_count_friends_online").innerHTML){loadFriendsOnline()}}Element.update(responses[i][0],responses[i][1])}}}}}}function playsound(a){volume=document.getElementById("global_sound_volume").value;document.getElementById("EventSound").innerHTML='<embed src="/resource/flvplayer.swf" width="1" height="1" allowfullscreen="false" flashvars="&file=/resource/Audio/'+a+".mp3&autostart=1&volume="+volume+'" />'}var SoundVolumeUsePointer=false;function SoundVolumeSet(){var a=0;if(SoundVolumeUsePointer){SoundVolumeSetMouseOutCheck();a+=document.getElementById("SoundVolumeBackground").offsetTop;a+=document.getElementById("SoundVolumeSlider").offsetTop;pos_slider=my_posy-a;pos_slider-=4;if(pos_slider<100&&pos_slider>=0){document.getElementById("SoundVolumePin").style.top=pos_slider+"px"}}}function SoundVolumeSetMouseOutCheck(){offsetTop=document.getElementById("SoundVolumeBackground").offsetTop;height=159;offsetLeft=document.getElementById("SoundVolumeBackground").offsetLeft;width=59;if(my_posy<=offsetTop||my_posy>=(offsetTop+height)||my_posx<=offsetLeft||my_posx>=(offsetLeft+width)){SoundVolumeSetMouseUp()}}function SoundVolumeSetMouseUp(){if(SoundVolumeUsePointer){SoundVolumeUsePointer=false;SoundVolume=100-parseInt(document.getElementById("SoundVolumePin").style.top);if(SoundVolume<5){SoundVolume=0;hideDiv("SoundVolumeIconOn");showDiv("SoundVolumeIconOff")}else{hideDiv("SoundVolumeIconOff");showDiv("SoundVolumeIconOn")}new Ajax.Updater("EventSound","/ajax/volume/volume/"+SoundVolume,{asynchronous:true,evalScripts:false});document.getElementById("global_sound_volume").value=SoundVolume}}function setSelectedIndex(c,b,a){for(j=0;j<document.forms[c].elements[b].options.length;j++){if(document.forms[c].elements[b].options[j].value==a){document.forms[c].elements[b].options[j].selected=true}else{document.forms[c].elements[b].options[j].selected=false}}}function SetProviderPrefix(f,c){var b=new Array("1505","151","1511","152","1520","1522","1566","157","1577","159","160","161","162","163","164","170","171","172","173","174","175","176","177","178","179");var h=new Array("650","660","664","676","699");var d=new Array("76","77","78","79");var k=document.getElementById("cellphone_country");var a=document.getElementById("cellphone_provider");if(!k||!a){return false}var n=k.selectedIndex;var l;l=new Array();if(n==0){l=b.copy()}if(n==-1){l=b.copy()}if(n==1){l=d.copy()}if(n==2){l=h.copy()}if(c){l.unshift(-2)}ClearProviderPrefix(a);for(var m=0;m<l.length;m++){var g=document.createElement("option");if(l[m]!="-2"){mycaption="0"+l[m]}else{mycaption=""}g.appendChild(document.createTextNode(mycaption));g.setAttribute("value",l[m]);if(f==l[m]){g.setAttribute("selected",1)}a.appendChild(g)}}function ClearProviderPrefix(a){a.options.length=0}function NachOben(){scrollTo(0,0)}function OpenDefaultPopup(f,g,d,a,e,c){if(typeof(c)=="undefined"){c="NO"}var b="width="+d+",height="+a+",scrollbars="+e+", resizable="+c;popup_window=window.open(f,g,b);popup_window.focus();return false}function ImagePopup(d,a,c,e){var b=a+30;imagepopup=window.open("","ImagePopup","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+d+",height="+b);imagepopup.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');imagepopup.document.write('<html><head><title>Gays.de Imagezoom</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="/css/gays-2-0.css" rel="stylesheet" type="text/css"></head>');imagepopup.document.write('<body class="ImagePopupBody" onblur="window.close();">');imagepopup.document.write('<table border=0 cellspacing=0 cellpadding=0><tr><td width="'+d+'" height="'+a+'" background="'+c+'"><a href="#" onClick="self.close()"><img src="/SiteImages/de/1/1Pixel.gif"  width="'+d+'" height="'+a+'" border="0"></a></td></tr></table>'+e);imagepopup.document.write("</body></html>")}function ProfilePopup(b,a){popup_window=window.open("/"+b+"/profile/"+a+".html?popup=1","Profilvon"+a,"width=670,height=595,scrollbars=yes,resizable=yes");popup_window.focus();return false}function ComplaintPopup(a){popup_window=window.open(a,"Complaint","width=580,height=500,scrollbars=YES");popup_window.focus();return false}function MessagePopup(a){popup_window=window.open("/message_send.html?tid="+a,"Nachrichten"+a,"width=450,height=350,scrollbars=1");popup_window.focus();return false}function MessageHistoryPopup(a){popup_window=window.open("/message_historie.html?nickname="+a,"Nachrichten"+a,"width=350,height=450,scrollbars=1");popup_window.focus();return false}function ReadMessagePopup(a){popup_window=window.open("/message_read.html?mid="+a,"Nachrichtvon"+a,"width=500,height=400,scrollbars=1");popup_window.focus();return false}function videochat_alert(a,b){width=369;left=Math.round((document.body.offsetWidth-width)/2);content_additional='<div class="AlertBoxOverlay"></div>';content_additional+='<div class="AlertBox" style="left:'+left+'px;">';content_additional+='<div class="AlertBoxPicture">';if(b!=""){content_additional+="<img src='"+b+"' >"}content_additional+="</div>";content_additional+="<h1>Videochat Anfrage</h1>";content_additional+='<div class="AlertBoxMessage">';content_additional+=a+" m&ouml;chte mir dir Videochatten!";content_additional+='<div class="clear"></div>';content_additional+="<input id=\"gay_alert_ok\" type=\"submit\" class=\"BtnOkaySmall\" onclick=\"OpenDefaultPopup('/de/videochat.html', 'videochat', 1000, 610, 'NO', 'YES');new Ajax.Updater('EventSound', '/ajax/videochatAccept', {asynchronous:true, evalScripts:false});videochat_alert_close();return false;\" value=\"\">";content_additional+='<input id="gay_alert_false" type="submit" class="BtnCancelSmall" onclick="new Ajax.Updater(\'EventSound\', \'/ajax/videochatCancel\', {asynchronous:true, evalScripts:false});videochat_alert_close();return false;" value="">';content_additional+="</div>";content_additional+="</div>";if(navigator.userAgent.indexOf("MSIE 6")>0){content_additional='<div style="background-color:#ffffff;border:1px solid #F59208;width:369px;height:171px;position:absolute;top:200px;left:'+left+'px;">';content_additional+='<div class="AlertBoxPicture">';if(b!=""){content_additional+="<img src='"+b+"' >"}content_additional+="</div>";content_additional+='<h1 style="color:#811802;position:absolute;left:133px;top:48px;">Videochat Anfrage</h1>';content_additional+='<div class="AlertBoxMessage">';content_additional+=a+" m&ouml;chte mir dir Videochatten!";content_additional+='<div class="clear"></div>';content_additional+='<input id="gay_alert_ok" type="submit" class="BtnOkaySmall" onclick="xajax_acceptVideochat();OpenDefaultPopup(\'/de/videochat.html\', \'videochat\', 1000, 610, \'NO\', \'YES\');videochat_alert_close();return false;" value="">';content_additional+='<input id="gay_alert_false" type="submit" class="BtnCancelSmall" onclick="xajax_cancleVideochat();videochat_alert_close();return false;" value="">';content_additional+="</div>";content_additional+="</div>"}document.getElementById("footer_additional").innerHTML=content_additional}function videochat_alert_close(){document.getElementById("footer_additional").innerHTML=""}function checkCheckbox(a){document.getElementById(a).checked="checked"}function uncheckCheckbox(a){document.getElementById(a).checked=""}function toggleCheckbox(a){if(document.getElementById(a).checked){uncheckCheckbox(a)}else{checkCheckbox(a)}}function showDiv(a){document.getElementById(a).style.display=""}function hideDiv(a){document.getElementById(a).style.display="none"}function toggleDiv(a){if(document.getElementById(a).style.display=="none"){showDiv(a)}else{hideDiv(a)}}function loadingShow(){showDiv("loading_background");showDiv("loading_img")}function loadingHide(){hideDiv("loading_background");hideDiv("loading_img")}function GetDistance(e,b,d,a){var c=Math.PI;abstand=111.13384*Math.acos(Math.cos(d*(c/180))*Math.cos(e*(c/180))*Math.cos((a-b)*(c/180))+Math.sin(d*(c/180))*Math.sin(e*(c/180)))/(c/180);return Math.round(abstand)}function ProfileDistance(){if(typeof(latitude_user)!="undefined"&&typeof(longitude_user)!="undefined"&&typeof(latitude_profile)!="undefined"&&typeof(longitude_profile)!="undefined"){abstand=GetDistance(latitude_profile,longitude_profile,latitude_user,longitude_user);if(abstand<=0){document.getElementById("distance").innerHTML="Entfernung: Gleicher Wohnort"}else{document.getElementById("distance").innerHTML="Entfernung: ca. "+abstand+" km"}}}function smsCheckLength(){charLeft=parseInt(document.getElementById("max_char").value)-parseInt(document.getElementById("sendSMS").value.length);document.getElementById("smsCharLeft").innerHTML=charLeft}function bar_plus(name){var i=0;var save_next=0;var saved_position="";for(i=0;i<eval("bar_"+name+"_key.length");i++){if(save_next==1){saved_position=eval("bar_"+name+"_key["+i+"]");save_next=0}if(document.getElementById(name).value==eval("bar_"+name+"_key["+i+"]")){save_next=1}}if(saved_position!=""){bar_set_position(name,saved_position)}}function bar_minus(name){var i=0;var save_next=0;var saved_position="";for(i=0;i<eval("bar_"+name+"_key.length");i++){if(document.getElementById(name).value==eval("bar_"+name+"_key["+i+"]")&&saved_position!=""){bar_set_position(name,saved_position)}saved_position=eval("bar_"+name+"_key["+i+"]")}}function bar_set_position(name,position){var i=0;var left_selected=-25;var count_width=false;for(i=0;i<eval("bar_"+name+"_key.length");i++){if(count_width){left_selected=left_selected-(parseInt(document.getElementById(name+"_width_bar").value)+5)}if(position==eval("bar_"+name+"_key["+i+"]")){count_width=true;position_value=eval("bar_"+name+"_value["+i+"]")}}left_selected=left_selected-6;document.getElementById(name+"_slider").style.marginLeft=left_selected+"px";document.getElementById(name).value=position;document.getElementById(name+"_value").innerHTML=position_value}function bar_check_over(b,a){if(bar_mousedown==true){bar_set_position(b,a)}}bar_mousedown=false;function bar_down(){bar_mousedown=true}function bar_up(){bar_mousedown=false}function bar_down_event(a){return a}function initScrollIn(a){element=document.getElementById(a);offsetHeight=parseInt(element.offsetHeight);element.style.overflow="hidden";element.style.height="0px";element.style.position="static";element.style.top=0;element.style.left=0;scrollIntervalHandler=setInterval("scrollInterval('"+a+"', '"+offsetHeight+"');",20)}function scrollInterval(b,a){element=document.getElementById(b);height=parseInt(element.style.height);if((a-height)>100){speed=80}else{speed=30}if(height<=a){element.style.height=(height+speed)+"px"}else{clearInterval(scrollIntervalHandler)}}function MouseMove(b){var a=0;var c=0;if(!b){var b=window.event}if(b.pageX||b.pageY){my_posx=b.pageX;my_posy=b.pageY}else{if(b.clientX||b.clientY){my_posx=b.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;my_posy=b.clientY+document.body.scrollTop+document.documentElement.scrollTop}}}function globalInitPage(){document.onmousemove=MouseMove}function changeStatusMini(a,b){document.getElementById("layer_status").innerHTML='<img src="/SiteImages/International/2/'+b+'"> <span>'+a+"</span>"}function LoadAjaxWaiting(a){document.getElementById(a).innerHTML='<div class="AjaxLoading"><img src="/SiteImages/International/2/AjaxLoader.gif" class="AjaxLoading" alt="Bitte warten..."></div>'}function ClearAjax(){document.getElementById("profileContentBefore").innerHTML=""}function LoadAjaxWaitingSmall(a){document.getElementById(a).innerHTML="Bitte warten..."}function LoadAjaxWaitingSmallImage(a){document.getElementById(a).innerHTML='<img src="/SiteImages/International/2/AjaxLoader.gif" class="AjaxLoadingSmall" alt="Bitte warten...">'}function CheckAll(a){for(i=0;i<document.forms[a].elements.length;i++){if(document.forms[a].elements[i].type=="checkbox"){document.forms[a].elements[i].checked=document.getElementById("all").checked}}}function MiniOpen(){popup_window=window.open("/de/mini.html","MiniPop","width=230,height=500,scrollbars=NO,resizable=NO");popup_window.focus()}function GaysOpen(){var a="width=1014,height=600,scrollbars=YES,resizable=YES,status=YES,toolbar=YES,location=YES,directories=YES,menubar=YES";popup_window=window.open("/","GaysPop",a);popup_window.focus()}function bt_over(b,a){b.src="/images/button/"+a+"_hover.png"}function bt_out(b,a){b.src="/images/button/"+a+"_normal.png"}function bt_down(b,a){b.src="/images/button/"+a+"_down.png"}function bt_up(b,a){bt_over(b,a)}function starSet(b,a){if(document.getElementById(b+"HasVoted").value==0){if(a=="default"){a=document.getElementById(b+"Default").value}inactive_url="/images/international/starGrey.png";active_url="/images/international/star.png";for(i=1;i<=5;i++){if(a<i){image_url=inactive_url}else{image_url=active_url}document.getElementById(b+"Star"+i).src=image_url}}}function starDone(b,a){if(document.getElementById(b+"HasVoted").value==0){starSet(b,a);document.getElementById(b+"Default").value=a;document.getElementById(b+"HasVoted").value=1;document.getElementById(b+"Message").innerHTML="Danke für deine Bewertung!"}}function tabClick(c,a){ul_element=a.parentNode.parentNode;for(var b=0;b<ul_element.childNodes.length;b++){if(ul_element.childNodes[b].nodeName=="LI"){ul_element.childNodes[b].className="tabsInactive"}}a.parentNode.className="tabsActive";var d=true;var e=-1;for(b=0;b<ul_element.childNodes.length;b++){if(ul_element.childNodes[b].nodeName=="LI"){if(ul_element.childNodes[b].className=="tabsActive"){if(e>=0){ul_element.childNodes[e].className+=" tabsBeforeActive"}}if(d==true){ul_element.childNodes[b].className+=" tabsFirst";d=false}e=b}}new Ajax.Updater(c,a.href,{asynchronous:true,evalScripts:true,onLoading:function(g,f){LoadAjaxWaiting(c)}})}function gayLightboxClose(){$("gayLightBoxBackground").style.display="none";$("gayLightBox").style.display="none"}function gayLightboxOpenMediathek(){gayLightboxOpen(855,495,"Mediathek","gayLightBoxTitleIconMediathek",true)}function gayLightboxOpenRose(){gayLightboxOpen(500,300,"Rose verschenken","gayLightBoxTitleIconRose",false)}function gayLightboxOpenMessage(){gayLightboxOpen(750,480,"Nachricht verschicken","gayLightBoxTitleIconMessage",true)}function gayLightboxOpenIgnore(){gayLightboxOpen(400,140,"Ignorieren","gayLightBoxTitleIconIgnore",true)}function gayLightboxOpenFriend(){gayLightboxOpen(750,470,"Als Freund speichern","gayLightBoxTitleIconFriend",true)}function gayLightboxOpenNote(){gayLightboxOpen(750,400,"Private Notiz schreiben","gayLightBoxTitleIconNote",true)}function gayLightboxOpen(d,a,e,f,c){window_height=document.documentElement.clientHeight;if(window_height<a+50){a=window_height-60;if(a<100){a=100}}$("gayLightBoxBackground").style.display="block";$("gayLightBox").style.width=d+"px";$("gayLightBox").style.height=a+"px";$("gayLightBoxTitleText").innerHTML=e;if(f!=""){var b=f;if(c==true){b="pp "+f}$("gayLightBoxTitleIcon").className=b}$("gayLightBox").style.left=((document.body.offsetWidth-d)/2)+"px";$("gayLightBoxContent").style.height=(a-40)+"px";$("gayLightBox").style.display="block"}function checkSetCursorMessage(){if($("messageBoxSend").offsetHeight<$("gayLightBox").offsetHeight){$("sendMessage").focus()}}function TogglePublicNoticeArea(){if(document.getElementById("contact_link").checked==true){showDiv("div_notice_public")}else{hideDiv("div_notice_public")}}function SubmitSmsForm(){xajax_sendsms("send",document.getElementById("tid").value,document.form_sendsms.sendsms_content.value)}function SubmitMessageForm(){xajax_sendmessage("send",user_id,document.form_sendmessage.message.value)}function SetContactSmiley(b,c,a){document.getElementById("contact_icon").value=b;document.getElementById("contact_icon_image").innerHTML='<img src="'+c+'" border=0><br>'+a}function CheckSmsStr(a){StrLen=document.getElementById("message").value.length;if(StrLen>a){document.form_sendsms.sendsms_content.value=document.form_sendsms.sendsms_content.value.substring(0,a);StrLeft=0}else{StrLeft=a-StrLen}document.getElementById("restcount").innerHTML=StrLeft}function unload(){if(typeof(start_google_maps)=="boolean"){GUnload()}}function setDirections(a){if(document.getElementById("maps_from").value==""){document.getElementById("maps_from").value=document.getElementById("maps_to").value}gdir.load("from: "+document.getElementById("maps_from").value+" to: "+document.getElementById("maps_to").value,{locale:"de_De"});if(isIE&&a!=1){setTimeout("setDirections(1, 500);")}}function MediathekLeft(){if(MediathekLeftPossible()){$("scrollerElement").style.left=(parseInt($("scrollerElement").style.left)+80)+"px";MediathekRightPossible();MediathekLeftPossible()}}function MediathekRight(){if(MediathekRightPossible()){$("scrollerElement").style.left=(parseInt($("scrollerElement").style.left)-80)+"px";MediathekRightPossible();MediathekLeftPossible()}}function MediathekRightPossible(){if(parseInt($("scrollerElement").style.left)>(parseInt(MediathekCountElements())*-70)+246){$("media_arrow_right").style.visibility="";return true}else{$("media_arrow_right").style.visibility="hidden";return false}}function MediathekLeftPossible(){if(parseInt($("scrollerElement").style.left)<0){$("media_arrow_left").style.visibility="";return true}else{$("media_arrow_left").style.visibility="hidden";return false}}function MediathekDeactivateAll(){ul_element=$("scrollerElement");for(var a=0;a<ul_element.childNodes.length;a++){if(ul_element.childNodes[a].nodeName=="LI"){ul_element.childNodes[a].className=""}}}function MediathekGalerieOpen(b,a){MediathekDeactivateAll();a.className="profileMediathekActive";galerieGetImages(b,1)}function MediathekVideoOpen(a,b){galerieGetTheVideo(a)}function MediathekCountElements(){var a=0;for(var b=0;b<$("scrollerElement").childNodes.length;b++){if($("scrollerElement").childNodes[b].nodeName=="LI"){a++}}return a}function MediathekShowImage(d,b,c,a){$("profileMediathekTargetContent").innerHTML='<a href="'+b+'" onclick="MediathekOpenPopup(\''+b+"', '"+c+"', '"+a+'\'); return false;"><img src="'+d+'"></a>'}function MediathekOpenPopup(b,c,a){if(typeof(gayImagePopup)!="undefined"){window.gayImagePopup.close()}if(!c){c=screen.width;a=screen.height}gayImagePopup=window.open(b,"","width="+c+", height="+a+", scrollbars=no");var d='<html><HEAD><TITLE>GAYS.DE Vollbildanzeige</TITLE></HEAD><body  style="margin:0px;"><img onclick="window.close();" style="cursor:pointer" src="'+b+'"></body></html>';gayImagePopup.document.open();gayImagePopup.document.write(d);gayImagePopup.document.close();window.gayImagePopup.focus()};
