// JavaScript Document
var i=0;
function resize(height, width) {
	window.resizeTo(height, width);
	self.focus();
}

function disableSubmit(form) {
	var button = form.elements['submit'];
	button.value = 'Daten werden gesendet...';
	button.disabled = 'true';
	return true;
}

function toggleBlockDisplay(intro_id, more_id, link_id) {
	if (document.getElementById(more_id).style.display == 'none') {
		document.getElementById(more_id).style.display = 'block';
		document.getElementById(intro_id).style.display = 'none';
		document.getElementById(link_id).innerHTML = 'weniger anzeigen'
	} else {
		document.getElementById(more_id).style.display = 'none';
		document.getElementById(intro_id).style.display = 'block';
		document.getElementById(link_id).innerHTML = 'mehr anzeigen'
	}
}

function ShowPopup(page, name, parameters) {
	Window = window.open(page, name, parameters);
}

function setLocation(url){
    window.location.href = url;
}


function javaPopup(title,width,height){
    var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth - offsetfrommouse[0]
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)

	if( (navigator.userAgent.indexOf("Konqueror")==-1  || navigator.userAgent.indexOf("Firefox")!=-1 || (navigator.userAgent.indexOf("Opera")==-1 && navigator.appVersion.indexOf("MSIE")!=-1)) && (docwidth>650 && docheight>500)) {
		( width == 0 ) ? width = defaultimagewidth: '';
		( height == 0 ) ? height = defaultimageheight: '';
			
		width+=30
		height+=55
		defaultimageheight = height
		defaultimagewidth = width
	
		//document.onmousemove=followmouse; 

		
		newHTML = '<div class="border_preview" style="width:'+  width +'px;height:'+ height +'px"><div id="loader_container"><div id="loader"><div align="center">Bild wird geladen...</div><div id="loader_bg"><div id="progress"> </div></div></div></div>';
		newHTML = newHTML + '<h2 class="title_h2">' + ' '+title + '</h2>'
		
    	//newHTML = newHTML + '<div class="preview_temp_load"><img onload="javascript:remove_loading();" src="' + imagename + '" border="0"></div>';
		newHTML = newHTML + '</div>'; 
		
		if(navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1 ){
			newHTML = newHTML+'<iframe src="about:blank" scrolling="no" frameborder="0" width="'+width+'" height="'+height+'"></iframe>';
		}		

		gettrailobjnostyle().innerHTML = newHTML;
		gettrailobj().display="block";
	}
}