// Rollover Effect Over
function buttonOver(button, color) {
	button.style.backgroundColor = color;
}

// Rollover Effect Out		
function buttonOut(button){
	button.style.backgroundColor = "";
}

// Zoombild anzeigen	 im Content		
function popup1(file){
	document.getElementById("zoom_img").style.height=495;
	document.getElementById("zoom_img").src=file;
	document.getElementById("close_button").style.display="inline";
}

function closePopup(){
	document.getElementById("zoom_img").style.height=1;
	document.getElementById("zoom_img").src="de/images/space.gif";
	document.getElementById("close_button").style.display="none";
}

// Zoombild anzeigen			
function popup(file){
	var zentrierenX = (screen.width/2)-235; 
	var zentrierenY = (screen.height/2)-210;
	var pos = "left="+zentrierenX+",top="+zentrierenY; 
	window.open(file,"help","width=502, height=398, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no, " + pos);
}


// Flash Film schreiben
function writeFlash(Path,Width,Height,Parameter,Transparent) {

	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='" + Width + "' height='" + Height + "' id='" + Path + Parameter + "' align='middle'>");
	document.write("<param name='movie' value='" + Path + Parameter + "' />");
	document.write("<param name='quality' value='high' />");
	
	if(Transparent == 'Ja'){
		document.write("<param name='wmode' value='transparent' />");
	} else {
		document.write("<param name='wmode' value='window' />");
	}
	
	document.write("<param name='scale' value='showall' />");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<param name='allowFullScreen' value='true' />");
	document.write("<!--[if !IE]>-->");
	document.write("<object type='application/x-shockwave-flash' data='" + Path + Parameter + "' width='" + Width + "' height='" + Height + "'>");
	document.write("<param name='movie' value='" + Path + Parameter + "' />");
	document.write("<param name='quality' value='high' />");
	
	if(Transparent == 'Ja'){
		document.write("<param name='wmode' value='transparent' />");
	} else {
		document.write("<param name='wmode' value='window' />");
	}
	
	document.write("<param name='scale' value='showall' />");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<param name='allowFullScreen' value='true' />");
	document.write("<!--<![endif]-->");
	document.write("<a href='http://www.adobe.com/go/getflash'>");
	document.write("<img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash Player' border='0' />");
	document.write("</a>");
	document.write("<!--[if !IE]>-->");
	document.write("</object>");
	document.write("<!--<![endif]-->");
	document.write("</object>");
	
}

// Windows Film schreiben 
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>");

}

// Quicktime Film schreiben
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 cleanborder(){
 for(var i=0; i<document.links.length; i++) {
    document.links[i].onfocus = function() {this.blur();};
 }
}

function setdate(feld){
	
	document.getElementById("cms_Field" + feld).value = document.getElementById("Feld_Tag" + feld).value + "." + document.getElementById("Feld_Monat" + feld).value + "." + document.getElementById("Feld_Jahr" + feld).value;

}

function quickdate(){
	
	document.getElementById("anreisedatum").value = document.getElementById("Feld_QuickTag").value + "." + document.getElementById("Feld_QuickMonat").value + "." + document.getElementById("Feld_QuickJahr").value;

}

function quickdatebis(){
	
	document.getElementById("abreisedatum").value = document.getElementById("Feld_QuickTagBis").value + "." + document.getElementById("Feld_QuickMonatBis").value + "." + document.getElementById("Feld_QuickJahrBis").value;

}

// Drop-down für Anhänge
function togglecmsblock(id) {				
	
	if (document.getElementById(id).style.display == 'block'){
		document.getElementById(id + "_link").style.backgroundImage = "url(images/dropdown.gif)";
		jQuery('#' + id).hide();

	}
	else {
		jQuery('#' + id).slideDown('fast',function(){  if (jQuery.browser.msie) { this.style.removeAttribute("filter");}});	
		document.getElementById(id + "_link").style.backgroundImage = "url(images/dropup.gif)";
	}	
			
}
