/* START JAVASCRIPT Document */

/* alert */

if (navigator.cookieEnabled == false) {
	window.open("alert.php","","width=365,height=365,resizable=0,scrollbars=0");
}

/***************************************************************/

/* help_popup */

function help(layer_id) {	
	document.getElementById(layer_id).style.display = 'block';		
}	
function reset_help(layer_id) {	
	document.getElementById(layer_id).style.display = 'none';		
}

/***************************************************************/

/* preloader */

function preload() {
	if (document.getElementById) {
		document.getElementById("loader").style.display = "none";
		document.getElementById("content").style.display = "block";
	}
}

/***************************************************************/

/* open_window */

function open_window(url, name, feature) {
	var new_window = window.open(url, name, feature);
	new_window.focus();
}

/***************************************************************/

/* change stuff */

function changeon(id) {
	for (i = 1; i <= id; i++) {
		document.getElementById("star" + i).src = "images/button/button02.gif";
	}
}

function changeoff() {
	for (i = 1; i <= 5; i++) {
		document.getElementById("star" + i).src = "images/button/button01.gif";
	}
}

/***************************************************************/

/*popup */

function sendto (url) {
	window.open("sendto.php?"+url,"","width=370,height=329,location=0,resizable=0,scrollbars=0")
}

function igallery(table,galleryname,objectname,date,object_id,end_id) {
	window.open("igallery.php?view=true&table="+table+"&galleryname="+galleryname+"&objectname="+objectname+"&date="+date+"&object_id="+object_id+"&end_id="+end_id+"","","width=714,height=660,location=0,resizable=0,scrollbars=0")
}

function vgallery(table,galleryname,objectname,date,object_id,end_id) {
	window.open("vgallery.php?view=true&table="+table+"&galleryname="+galleryname+"&objectname="+objectname+"&date="+date+"&object_id="+object_id+"&end_id="+end_id+"","","width=714,height=564,location=0,resizable=0,scrollbars=0")
}

function gallery_comments(table,objectname,object_id,galleryname) {
	window.open("gallery_comments.php?table="+table+"&galleryname="+galleryname+"&objectname="+objectname+"&object_id="+object_id+"","","width=405,height=285,location=0,resizable=0,scrollbars=1")
}

function administration () {
	window.open("administration/index.php","","width=835,height=400,location=0,resizable=0,scrollbars=1")
}

/***************************************************************/

/* statusmessage */

window.status = "http://galerie.amsele.at";

/***************************************************************/

/* display */

function display(div_id) {          
	if (document.getElementById(div_id).style.display == 'none') {
		document.getElementById("y2004").style.display = 'none';
		document.getElementById("y2005").style.display = 'none';
		document.getElementById("y2006").style.display = 'none';
		document.getElementById("y2007").style.display = 'none';
		document.getElementById("y2008").style.display = 'none';
		document.getElementById(div_id).style.display = 'block';
	} else {
		document.getElementById(div_id).style.display = 'none';
	}
}

/***************************************************************/

/* smilies */

function smilie(icon) {
	document.guestbook_write.message.value = document.guestbook_write.message.value +" "+ icon +" ";
}

/***************************************************************/

/* END JAVASCRIPT Document */
