function buttonOver(button, color) {
	button.style.backgroundColor = color;
}
		
function buttonOut(button){
	button.style.backgroundColor = "";
}

function GetImage(image,text,file,beschreibung){
	image.src = file ;
	text.innerHTML = beschreibung ;
}
			
function popup(file){
	var zentrierenX = (screen.width/2)-235; 
	var zentrierenY = (screen.height/2)-210;
	var pos = "left="+zentrierenX+",top="+zentrierenY; 
	window.open(file,"popup","width=550, height=495, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
}

function popupradio(file){
	var zentrierenX = (screen.width/2)-235; 
	var zentrierenY = (screen.height/2)-210;
	var pos = "left="+zentrierenX+",top="+zentrierenY; 
	window.open(file,"webradio","width=550, height=425, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
}

function popupbook(file){
	var zentrierenX = (screen.width/2)-350; 
	var zentrierenY = (screen.height/2)-300;
	var pos = "left="+zentrierenX+",top="+zentrierenY; 
	window.open(file,"book","width=750, height=600, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
}

function popupProspekt(){
	
	var dir = "prospekt.asp"
	if(document.URL.toLowerCase().indexOf("/vermieter/") > 0 || document.URL.toLowerCase().indexOf("/events/") > 0 || document.URL.toLowerCase().indexOf("/events/") > 0) {
		dir = "../"+dir;
	}
	
	var zentrierenX = (screen.width/2)-375; 
	var zentrierenY = (screen.height/2)-250;
	var pos = "left="+zentrierenX+",top="+zentrierenY; 
	window.open(dir,"prospekt","width=750, height=500, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
}

function popupanfrage(file){
	var zentrierenX = (screen.width/2)-350; 
	var zentrierenY = (screen.height/2)-300;
	var pos = "left="+zentrierenX+",top="+zentrierenY; 
	window.open(file,"anfrage","width=750, height=600, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
}

function popupVermieterAnfrage(file){

	if (navigator.appName == "Microsoft Internet Explorer"){	
		var zentrierenX = (screen.width/2)-350; 
		var zentrierenY = (screen.height/2)-300;
		var pos = "left="+zentrierenX+",top="+zentrierenY; 
		window.open("../" + file,"anfrage","width=750, height=600, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
		}
	
	else {	
		
	var zentrierenX = (screen.width/2)-350; 
	var zentrierenY = (screen.height/2)-300;
	var pos = "left="+zentrierenX+",top="+zentrierenY; 
	window.open(file,"anfrage","width=750, height=600, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
	}
	
}

function writeFlash(Path,Width,Height,Parameter) {
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' height='" +  Height + "' width='" + Width + "'>");
	document.write("<param name='movie' value='" + Path + Parameter + "'>");
	document.write("<param name='quality' value='best'>");
	document.write("<param name='play' value='true'>");
	document.write("<param name='menu' value='false'>");
	document.write("<embed menu='false' height='" + Height + "' pluginspage='http://www.macromedia.com/go/getflashplayer' src='" + Path + Parameter + "' type='application/x-shockwave-flash' width='" + Width + "' quality='best' play='true'>");
	document.write("</object>");
}

function writeMediaplayer(Path,Width,Height,Autoplay) {

	document.write("<object id='MediaPlayer' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'   height='" + Height + "' width='" + Width + "'>");
	document.write("<param name='filename' value='"+ Path + "'>");
	document.write("<param name='autostart' value='" + Autoplay + "'>");
	document.write("<embed src='" + Path + "' width='" + Width + "' height='" + Height + "' autostart='" + Autoplay + "' />");
	document.write("</object>");

}

function writeQuicktime(Path,Width,Height,Autoplay) {

	document.write("<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab' type='video/quicktime' height='" + Height + "' width='" + Width + "'>");
	document.write("<param name='src' value='" + Path + "'>");
	document.write("<param name='autoplay' value='" + Autoplay + "'>");
	document.write("<param name='controller' value=''>");						
	document.write("<embed height='" + Height + "' pluginspage='http://www.apple.com/quicktime/download/' src='" + Path + "' type='video/quicktime' width='" + Width + "' autoplay='" + Autoplay + "'>");
	document.write("</object>");
	
}

function writeWebradio() {

	document.write("<object id='MediaPlayer' width='500' height='40' classid='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95' standby='Loading Windows Media Player components...' type='application/x-oleobject' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112'>");
	document.write("<param name='windowlessvideo' value='true'>");
	document.write("<param name='autoStart' value='True' />");
	document.write("<param name='filename' value='http://shousrv003.host.pc4u.at/shousrv003mp3.host.pc4u.at.asx' />");
	document.write("<embed type='application/x-mplayer2' src='http://shousrv003.host.pc4u.at/shousrv003mp3.host.pc4u.at.asx' width='500' height='40' windowlessvideo='true'></embed>");
	document.write("</object>");
	
}

function showcomment(){
	
	document.getElementById("blog_form").style.display = "block";
	
}

function countlink(id,db){
	
	var xmlhttp=null;
	var url = 'http://www.wilderkaiser.info/de/countlink.asp?ID=' + id + '&DB=' + db;		
	
	if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();} else if (window.ActiveXObject) {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
	  
	if (xmlhttp!=null)
	  {
	 		xmlhttp.open("GET",url,true);	
	 		xmlhttp.send(null); 	  		
	  }	
	
}

function countadv(id){
	
	var xmlhttp=null;
	var url = 'http://www.wilderkaiser.info/de/countadv.asp?ID=' + id;		
	
	if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();} else if (window.ActiveXObject) {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
	  
	if (xmlhttp!=null)
	  {
	 		xmlhttp.open("GET",url,true);	
	 		xmlhttp.send(null); 	  		
	  }	
	
}