
 function jumpURL(url,s){
   if ( window.confirm(s) ){
     location.href=url;
   }
 }
 
 
 function CheckAll(FormName,FormNameGomb,false_value,true_value){
   if ( FormNameGomb==1 ) FormNameGomb=FormName;
   var FormObject = document.forms[FormName];
   for ( i=0; i<FormObject.length; i++ ){
     if ( FormObject[i].type=='checkbox' ){
       if ( !FormObject[i].checked ){
         FormObject[i].checked=true;
         gombvalue=true_value;
       }else{
          FormObject[i].checked=false;
          gombvalue=false_value;
        }
     }
   }
   document.forms[FormNameGomb].checkgomb.value=gombvalue;
 }
 
 
 function KedvencBejegyzes(blog_id,user_id,url){
   var http = new sack();
            
   http.requestFile = url+'myprofile_favorit.php';
   http.setVar('blog_id',blog_id);
   http.setVar('user_id',user_id);
   http.onCompletion = function(){ HttpResponse_KedvencBejegyzes(http.response,blog_id); };
   http.runAJAX();
 }

 function HttpResponse_KedvencBejegyzes(ertek,blog_id){
   //window.alert(ertek);
   if ( (ertek!='on') && (ertek!='off') ){ window.alert('A kérés nem hajtható végre.'); }
   else{
     kepnev="kedvenc"+blog_id;
     if ( ertek=='on' ){
       document.images[kepnev].alt='';
       document.images[kepnev].title='';
     }
     if ( ertek=='off' ){
       document.images[kepnev].alt='Mentem a bejegyzést';
       document.images[kepnev].title='Mentem a bejegyzést';
     }
     document.images[kepnev].src='images/kedvenc_bejegyzes_'+ertek+'.gif';
   }
 }


 function IndexTerkep(w,h){
   var so = new SWFObject("index_terkep_05.swf", "index_terkep", w, h, "8", "");
	 so.addVariable("pzn", "true");
	 so.addVariable("avatarSize", "30");
	 so.addVariable("messageLength", "40");
	 so.addVariable("maxMessage", "5");
	 so.addVariable("messageDelay", "10");
   so.addVariable("msgLimit", "10");
	 so.write("flashcontent");
 }
 
 
 function ViewAvatarBigPhoto(avatarDIV,w,h){
   var div=document.getElementById(avatarDIV);
   var left=Math.round((document.body.clientWidth - w)/2);
   if ( left<0 ) left=0;
   var top=Math.round((document.body.clientHeight - h)/2);
   if ( top<0 ) top=0;
   div.style.left=left+'px';
   div.style.top=top+'px';
   div.style.display='';
 }
 
 function CloseAvatarBigPhoto(avatarDIV){
   var div=document.getElementById(avatarDIV);
   div.style.display='none';
 }
 
 function AccountDelete(){
   if ( window.confirm('Figyelem!\n\nA felhasználói profilod teljes megszüntetése során töröljük a hozzászólásaidat, feltöltött képedet, elküldött MMS képeidet, könyvtáradat és a felhasználói alap adataidat.\n\nBiztosan szeretnéd, hogy végrehajtsuk a törlést?') ){
     var http = new sack();
     http.requestFile = 'myprofile_account.php';
     http.setVar('a','AccountDelete_Start');
     http.onCompletion = function(){ AccountDelete_Response(http.response); };
     http.runAJAX();
   }
 }

 function AccountDelete_Response(ertek){
   if ( ertek!='0' ){
     location.href='myprofile_account.php?a=DeleteAccount&key='+ertek;
   }else{
      window.alert('Szerver oldali hiba miatt nem végezhető el a törlés!');
    }
 }
