function printURL() {
	var header = '<html><head><title>Printable version</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1250">';
	header += '<link rel="stylesheet" href="/css/default.css" type="text/css"></head>';
	header += '<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="background-color: #ffffff;">';
	header += '<div align="center"><img src="/images/basic/logo_printer_friendly.gif" width="600" height="100" border="0" /></div>';
	header += "<table align='center'><tr><td width='100%'>"
	var footer = '</td></tr></table></div></body></html>';

	var strInner = document.body.innerHTML;
	var startPos = strInner.lastIndexOf("<!-- print_start -->");	
	var endPos = strInner.lastIndexOf("<!-- print_end -->");
	strInner = strInner.substring(startPos+20, endPos);
		
	if (strInner.lastIndexOf("<!-- print_pause_on -->") > -1){
		var str1 = "<!-- print_pause_on -->";
		var str2 = "<!-- print_pause_off -->";
		startPos = strInner.lastIndexOf(str1);	
		endPos = strInner.lastIndexOf(str2);
		if (endPos > startPos){
			leftStr = strInner.substring(0, startPos);
			rightStr = strInner.substring(endPos + str2.length, strInner.length);
			strInner =	 leftStr + rightStr;
		}
	}
	var xwin = window.open("/code/printable.php", "PrintVersion", "menubar=yes, scrollbars=yes, resizable=yes, width=625, toolbar=yes, statubar=no");
	xwin.document.write(header+strInner+footer);
}

function isPPC() {
	if (navigator.appVersion.indexOf("PPC") != -1) return true;
	else return false;
}

function sendPage(mailHeadline){
	if(!isPPC()) {
		window.location="mailto:\?subject\=" + mailHeadline + "&body=" + mailHeadline + ": " + window.location;
	}else { 
		window.location="mailto:\?body=" + mailHeadline + ": " + window.location;
	}
}

function swapImage(imageId, imageSrc)
{
	document.getElementById(imageId).src = imageSrc;

	return false;
}

function pageWidth()
{
	return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth? document.documentElement.clientWidth : document.body != null? document.body.clientWidth : null;
}

function pageHeight()
{
	return window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;
}

function posLeft()
{
	return typeof window.pageXOffset != 'undefined'? window.pageXOffset : document.documentElement && document.documentElement.scrollLeft? document.documentElement.scrollLeft : document.body.scrollLeft? document.body.scrollLeft : 0;
}

function posTop()
{
	return typeof window.pageYOffset != 'undefined'?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop? document.documentElement.scrollTop : document.body.scrollTop? document.body.scrollTop : 0;
}

function posRight()
{
	return posLeft()+pageWidth();
}

function posBottom()
{
	return posTop()+pageHeight();
}

function getPageSize()
{
	var width = pageWidth();
	var height = pageHeight();

	return width+"|"+height;
}