/*
if($('projectInfoWindow').innerHTML ){
	//alert("make drag");
	new Draggable('projectInfoWindow',{
		handle:'handleBar',
		onEnd:saveInfoWindowPos
	});
	recreateInfoWindowPos();
}
*/
/*
document.onscroll = function() {

	$('calendarContent').update($('calendarContent').innerHTML);
	//alert("scroll");
}
*/

function hideInfoWindow(){
	//$('projectInfoWindow').hide();
/*
	$('infoWindowHandlebar').setOpacity(0.3);
	$$('#projectInfoWindow p').each(function(s) {
		//alert(s);
 		// $(s).setOpacity(0.0);
 		  $(s).hide();
	});
	$$('#projectInfoWindowContent div').each(function(s) {
		//alert(s);
 		 //$(s).setOpacity(0.0);
 		// $(s).hide();
	});
	$('pagesSlider').hide();
	$('projectInfoWindowContentInner').setStyle({
		backgroundColor:'ffffff'
	});
*/
	//$('infoWindowTitle').setOpacity(0.5);

	$('projectInfoWindow').hide();
	createCookie("projectInfoVisible", "false", 0);
}
function showInfoWindow(){
	//alert('show');
	$('projectInfoWindow').show();
	//$('projectInfoWindow').setOpacity(0.9);
	createCookie("projectInfoVisible", "true", 0);

}

function saveInfoWindowPos() {
	//
	//alert('saveCalendarPos');
	var pos=Position.page($('projectInfoWindow'));
	createCookie("infoWindowPos_x", pos[0], 0);
	createCookie("infoWindowPos_y", pos[1], 0);
	createCookie("infoWindowVisible", "true", 0);
	//alert('saveCalendarPos');
}

function recreateInfoWindowPos(){
	//alert("recreate kalender")
	var pos_x=readCookie("infoWindowPos_x");
	if(pos_x<10){
		pos_x=10;
	}
	var pos_y=readCookie("infoWindowPos_y");

	if(pos_y<10){
		pos_y=10;
	}
	//var farbe= page_color_hex;
	//alert(farbe);
	if(pos_x){
		new Effect.Move($('projectInfoWindow'),{ x: pos_x, y: pos_y, mode: "absolute", duration: 0});
	}
	if(readCookie("projectInfoVisible")=="true"){
	//	alert("visible");

		new Effect.BlindDown($('projectInfoWindow'),{ duration: 0.5});
	}else{
		$('projectInfoWindow').hide();
	}

}

// Hänsch, 06.11.2009
function hideInfoWindow1(){
	$('projectInfoWindow1').hide();
//	createCookie("projectInfoVisible1", "false", 0);
}
function showInfoWindow1(){
	$('projectInfoWindow1').show();
//	createCookie("projectInfoVisible1", "true", 0);

}
// Hänsch, 06.11.2009, end
