$(document).ready(function(){
	$('a.print').click(function(){		
		window.open($(this).attr('href'));
		return false;
	});
	$('a.gallery').click(function(){
		id = $(this).attr('id');
		if ($('#photos-' + id).css('display') == 'none') {
			$('#photos-' + id).show('slow');
		} else {
			$('#photos-' + id).hide('slow');
		}
		return false;
	});
	
	$('div.tlink').click(function(){
		$(this).find('a').trigger('click');	
	});
});

function showbig(picname){
    window.open('/includes/foto.php5?pic='+picname,'_blank','scrollbars=yes,taskbar=no,resizeable=no,status=no,menubar=no,top=30,left=30,width=30,height=30,');
  }
  
  function PreLoad(source){
    var NewImage = new Image();
    NewImage.src = source;
  }
  
  function prepareSubmit(frm){
    var len = frm.all("editbox").length; if (!len) len = 1;
    for (var i=0; i<len; i++)
      frm.all("codebox", i).innerText = frm.all("codebox", i).style.display ? borderOn(frm.all("codebox", i).innerText) : borderOn(frm.all("editbox", i).innerHTML);
  }
   
 function menuProcess(menuId){
 	 if(menuId.style.display == 'none'){
     menuId.style.display = 'block';
   }else{
   	 menuId.style.display = 'none';
   }
 }
 
 function btShowFunctionArguments(name){
	 btChangeFunctionArgumentsBlock(name,'none','block','block');
 }
 
 function btHideFunctionArguments(name){
	 btChangeFunctionArgumentsBlock(name,'block','none','none');
 }
 
 function btChangeFunctionArgumentsBlock(name,plus,minus,arguments){
 	 document.getElementById('backtrace_img_plus_'+name).style.display = plus;
 	 document.getElementById('backtrace_img_minus_'+name).style.display = minus;
 	 document.getElementById('backtrace_arguments_'+name).style.display = arguments;
 }