
function fadeOut(divId){Effect.toggle(''+divId+'','appear',{duration:0.5});}
function toggleDiv(id,display){if(display!=null){document.getElementById(id).style.display=display;}
else{var display=document.getElementById(id).style.display;if(display=='none')
document.getElementById(id).style.display='block';else
document.getElementById(id).style.display='none';}}
function showFeedbackForm(){toggleDiv('feedbackform');document.getElementById('feedbackformdiv').style.display='block';document.getElementById('feedbacksenddiv').style.display='none';}
function showFeedbackSend(){document.getElementById('feedbackformdiv').style.display='none';document.getElementById('feedbacksenddiv').style.display='block';setTimeout("showFeedbackForm()",1200);}
function addAsFriendConfirm(id,name){var msg='Möchtest du {username} eine Freundschaftsanfrage senden?';msg=str_replace('{username}',name,msg);xajax_mConfirm(msg,'xajax_addAsFriend(\''+id+'\',\''+name+'\')');}
function deleteCommentConfirm(id){var msg='Willst du diesen Kommentar wirklich löschen?';xajax_mConfirm(msg,'xajax_deleteComment(\''+id+'\')');}
function importCardsetConfirm(id){document.getElementById("msg").innerHTML='';var msg='Möchtest du diesen Kartensatz importieren?';xajax_mConfirm(msg,'xajax_importCardset(\''+id+'\')');}
function changeLoginEmailValues(action){var value=document.loginform.email.value;if(action=="focus"){document.loginform.email.style.color='#000';if(value=="E-Mail"){document.loginform.email.value='';}}
if(action=="blur"){if(value==""){document.loginform.email.value='E-Mail';document.loginform.email.style.color='#AEB0AE';}}}
function changeLoginPWValues(action){var value=document.loginform.password.value;if(action=="focus"){document.loginform.password.style.color='#000';if(value=="Passwort"){document.loginform.password.value='';}}
if(action=="blur"){if(value==""){document.loginform.password.value='Passwort';document.loginform.password.style.color='#AEB0AE';}}}
function ratingOver(star,loggedin,path){if(!ratingDisable){if(loggedin){var star1,star2,star3,star4,star5,ratingmsg;if(star==1){star1='rated';star2='unrated';star3='unrated';star4='unrated';star5='unrated';ratingmsg='Gar nicht gut';}
if(star==2){star1='rated';star2='rated';star3='unrated';star4='unrated';star5='unrated';ratingmsg='Nicht zu empfehlen';}
if(star==3){star1='rated';star2='rated';star3='rated';star4='unrated';star5='unrated';ratingmsg='Kann man mit arbeiten';}
if(star==4){star1='rated';star2='rated';star3='rated';star4='rated';star5='unrated';ratingmsg='Sehr guter Kartensatz';}
if(star==5){star1='rated';star2='rated';star3='rated';star4='rated';star5='rated';ratingmsg='Perfekter Kartensatz';}
document.getElementById('star1').src=path+'img/star_'+star1+'.png';document.getElementById('star2').src=path+'img/star_'+star2+'.png';document.getElementById('star3').src=path+'img/star_'+star3+'.png';document.getElementById('star4').src=path+'img/star_'+star4+'.png';document.getElementById('star5').src=path+'img/star_'+star5+'.png';}
else
var ratingmsg='Zum Bewerten einloggen';document.getElementById('ratingmsg').innerHTML=ratingmsg;}}
function ratingOut(star,path){if(!ratingDisable){document.getElementById('star1').src=path+'img/star_'+star1+'.png';document.getElementById('star2').src=path+'img/star_'+star2+'.png';document.getElementById('star3').src=path+'img/star_'+star3+'.png';document.getElementById('star4').src=path+'img/star_'+star4+'.png';document.getElementById('star5').src=path+'img/star_'+star5+'.png';document.getElementById('ratingmsg').innerHTML=ratingmsg;}}
function searchSubmit(){if(!document.searchform.q.value)
return false;else{document.searchform.submit();return true;}}
function createHighlight(divId){new Effect.Highlight(''+divId+'',{startcolor:'#FFF9C5',endcolor:'#FFFFFF',duration:1.5})}
function createHighlightGray(divId){new Effect.Highlight(''+divId+'',{startcolor:'#FFF9C5',endcolor:'#F8F8F5',duration:1.5})}
function str_replace(search,replace,subject){return subject.split(search).join(replace);}
function in_array(item,arr){var count=arr.length;for(i=0;i<count;i++)
if(item==arr[i])return true;return false;}