/*window.onload = function()
{
	
		myTrans_pic70  = new fx.Opacity("pic70", {duration: 400});
		myHeight_pic70 = new fx.Height("pic70", {duration: 400});
		myWidth_pic70  = new fx.Width("pic70", {duration: 400});
		myTrans_pic70.custom(1.0, 0.5);
		myHeight_pic70.custom(84,50);
		myWidth_pic70.custom(106,63);
		
		myTrans_pic130  = new fx.Opacity("pic130", {duration: 400});
		myHeight_pic130 = new fx.Height("pic130", {duration: 400});
		myWidth_pic130  = new fx.Width("pic130", {duration: 400});
		myTrans_pic130.custom(1.0, 0.5);
		myHeight_pic130.custom(84,50);
		myWidth_pic130.custom(106,63);
		
		myTrans_pic91  = new fx.Opacity("pic91", {duration: 400});
		myHeight_pic91 = new fx.Height("pic91", {duration: 400});
		myWidth_pic91  = new fx.Width("pic91", {duration: 400});
		myTrans_pic91.custom(1.0, 0.5);
		myHeight_pic91.custom(84,50);
		myWidth_pic91.custom(106,63);
		
		myTrans_pic100  = new fx.Opacity("pic100", {duration: 400});
		myHeight_pic100 = new fx.Height("pic100", {duration: 400});
		myWidth_pic100  = new fx.Width("pic100", {duration: 400});
		myTrans_pic100.custom(1.0, 0.5);
		myHeight_pic100.custom(84,50);
		myWidth_pic100.custom(106,63);
		
		myTrans_pic143  = new fx.Opacity("pic143", {duration: 400});
		myHeight_pic143 = new fx.Height("pic143", {duration: 400});
		myWidth_pic143  = new fx.Width("pic143", {duration: 400});
		myTrans_pic143.custom(1.0, 0.5);
		myHeight_pic143.custom(84,50);
		myWidth_pic143.custom(106,63);
		
		myTrans_pic149  = new fx.Opacity("pic149", {duration: 400});
		myHeight_pic149 = new fx.Height("pic149", {duration: 400});
		myWidth_pic149  = new fx.Width("pic149", {duration: 400});
		myTrans_pic149.custom(1.0, 0.5);
		myHeight_pic149.custom(84,50);
		myWidth_pic149.custom(106,63);
		}

function action(act,which){

	var myTrans = eval("myTrans_"+which);
	var myWidth = eval("myWidth_"+which);
	var myHeight = eval("myHeight_"+which);
	
	
	switch(act){
		case 1:
		myTrans.custom(0.5, 1.0);
		myHeight.custom(50, 84);
		myWidth.custom(63, 106);
		break;

		case 0:
		myTrans.custom(1.0, 0.5);
		myHeight.custom(84, 50);
		myWidth.custom(106, 63);
		break;
	}
}*/

/*window.onbeforeunload = function(){

}*/

function call(id){
	var url = "/add2notes.php?oid="+id;
	var url2 = "/getNoteBar.php";
	var req = $('notepad').empty().addClass('ajax-loading');
	$('note-bar').empty()
	
	new Ajax(url, {
		method: 'get',
		update: $('notepad'),
		onComplete: function(response) { 
    		fade();
    		TB_show("Merkzettel", "#TB_inline?height=130&width=400&inlineId=success", "");
    		//note-bar
    		new Ajax(url2, {
    			method: 'get',
    			update: $('note-bar'),
    			onComplete: function(response) {
    				$('note-bar').addClass('visible');    	    		
    			}
    		}).request();
		}
	}).request();
}

function fade(){
	var fx = new Fx.Style($('notepad'), 'background-color', {
		duration: 5000,
		transition: Fx.Transitions.Quad.easeOut
	}).start('#ff0000', '#F5F7FF');
}
