/*********************************
 (c) 2004-2006 by exosoft 
 Author: Tobias Keller
 E-Mail: info@exosoft.de
**********************************/


function swapMenu(id,css) {
	self.document.getElementById(id).className = css;
}

function newsletterSwap(id,input) {
	
	if (input == 'delete') {
		self.document.getElementById(id + '_name').disabled = true;
		self.document.getElementById(id + '_vorname').disabled = true;
		self.document.getElementById(id + '_anrede').disabled = true;
	} else {
		self.document.getElementById(id + '_name').disabled = false;
		self.document.getElementById(id + '_vorname').disabled = false;
		self.document.getElementById(id + '_anrede').disabled = false;
	}
}


function swapSubmenu(id,hovered) {
	
	if (hovered == 0) {
		self.document.getElementById(id + '_dot').style.visibility = 'hidden';
	} else {
		self.document.getElementById(id + '_dot').style.visibility = 'visible';	
	}
}

 function swapBox(id) {
 	showBox(id);
 }

function swapFunctionBox(id,id2) {

	var tmp = self.document.getElementById(id2).checked;
	
	IE = document.all && !window.opera;
	DOM = document.getElementById && !IE;

	if (tmp == true) {
		self.document.getElementById(id).style.display = (IE) ? 'inline' : '';
	} else {
		self.document.getElementById(id).style.display = 'none';	
	}
}

 function showBox(id) {

	IE = document.all && !window.opera;
	DOM = document.getElementById && !IE;

	if (self.document.getElementById(id).style.display == 'none') {
		self.document.getElementById(id).style.display = (IE) ? 'inline' : '';
	} else {
		self.document.getElementById(id).style.display = 'none';	
	}
 }


function link(url) {
	self.window.location.href = url;
}


function popupgallery(url)  {
	xsize = 600;
	ysize = 500;
	newpopup=window.open(url,"img_popup","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no");
}



function popupImage(image,title,xsize,ysize) {
	
	IE = document.all && !window.opera;    // IEs
	DOM = document.getElementById && !IE;  // DOM-Browser
	
	html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
	html+= '<html><head><title>'+title+'</title>';
	html+= '<script type="text/javascript">function resize() {';
	
	if (IE) { 
		html+= 'window.resizeTo('+xsize+','+ysize+');';
	} else {
		html+= 'window.innerHeight='+ysize+';';
		html+= 'window.innerWidth ='+xsize+';';
	}
	
	html+='}</script></head><body style="margin:0px"><img src="'+image+'" border="0" alt="" style="margin:0px;" ></body></html>';

	var scrb = "";
	scrb = "no";
	
	if (screen.width <= xsize || screen.height <= ysize) {
		scrb = "yes";
	}

	newpopup = window.open('about:blank',"_blank","height="+ysize+",width="+xsize+",scrollbars="+scrb);
	
	newpopup.document.write(html);
	newpopup.document.close();
	
}








