// JavaScript Document from http://www.das-jahr-2728.de

// main
function goToURL(url) { 
  location.href = url;
}

// open images for gallery etc.
function openImage(file,breite,hoehe,path,name){
	var preview = window.open (path, 'name', 'width=' + breite + ', height=' + hoehe + ', status=0, toolbar=0, menubar=0, resizable=1, scrollbars=1, fullscreen=1, left='+(screen.width/2-breite/2)+',top='+(screen.height/2-hoehe/2)+',screenX='+(screen.width/2-breite/2)+',screenY='+(screen.height/2-hoehe/2));
	with (preview.document) {
		open();
		write('<html>\n<head>\n<title>ABIDAS AG</title>\n');
		write('<link href="sty/style.css" rel="stylesheet" type="text/css"></head>\n');
		write('<body style="margin:10px">\n');
		write('<table width="100%" height="100%" align="center" cellspacing="0" cellpadding="0" border="0"><tr>\n');
		write('<td colspan="2" align="center" valign="middle" width="100%">');
		write('<a href="javascript:self.close()"><img src="'+file+'" border="0" alt="Schliessen"></a></td></tr><tr>\n');
		write('<td width="50%" height="20" align="right" valign="top"><a href="javascript:self.print()">Drucken</a>&nbsp;</td>\n');
		write('<td align="left" valign="top">|&nbsp;<a href="javascript:self.close()">Schliessen</a></td>\n');
		write('</tr></table></body>\n</html>\n');
		close();
	}
	preview.focus();
}

// print whole document
function printMe(){
	//document.getElementById("printarea").innerHTML.print();
	window.print();
}

// print only wanted content
function printId(){
	breite = 890;
	hoehe = 500;
	var preview = window.open ('http://www.abidas.de/_inc_to-print.php', 'ABIDAS AG - Druckvorschau', 'width=' + breite + ', height=' + hoehe + ', status=0, toolbar=0, menubar=0, resizable=1, scrollbars=1, fullscreen=1, left='+(screen.width/2-breite/2)+',top='+(screen.height/2-hoehe/2)+',screenX='+(screen.width/2-breite/2)+',screenY='+(screen.height/2-hoehe/2));
	preview.focus();
}

// get data to print
function getPrintContent(){
	var PrintDiv = document.getElementById('printcontent');
	var ContentDiv = window.opener.document.getElementById('printarea');
	PrintDiv.innerHTML = ContentDiv.innerHTML;
	window.print();
	setTimeout('self.close()', 5000);
}
