function loadUrl(url) {
	 ajaxpage('?path=' + url + '&trans=screen',url + '-applet');	
	    }  

function closeObj(url64){	
	ajaxpage('',url + '-applet');	
		}

var vars = {};

$(document).ready(function() {
    $('a.toencode').click(function(event) {
      event.preventDefault();
      var link = $(event.target).attr('href').replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,key,value) {
         vars[key] = value;
       });
      var NewLink = encode64(vars['search']);
      window.location.href = 'index.php?search=' + NewLink;
    });
});


$(function() {
	$(".buttonset").buttonset();
	$('#flat').menu({ 
		content: $('#flat').next().html(),
		showSpeed: 400 
	});
	$('#flatpls').menu({ 
		content: $('#flatpls').next().html(),
		showSpeed: 400 
	});	


	 $('input[type="text"]').addClass("idleField");  

     $('input[type="text"]').focus(function() {  
         $(this).removeClass("idleField").addClass("focusField");  
         if (this.value == this.defaultValue){  
             this.value = '';  
         }  
         if(this.value != this.defaultValue){  
             this.select();  
         }  
     });  
     $('input[type="text"]').blur(function() {  
         $(this).removeClass("focusField").addClass("idleField");  
         if ($.trim(this.value == '')){  
             this.value = (this.defaultValue ? this.defaultValue : '');  
         }  
     });  


});


