var check=false;

function changeBg(id,img)
{
	document.getElementById(id).src=img;
}
function makeTextDeco(id,deco,color){
	
	document.getElementById(id).style.textDecoration=deco;
	document.getElementById(id).style.color=color;
}

function changeBorder(id,color,mod){
	document.getElementById(id).style.borderColor=color;	
	
}

function changeBackgroundColor(id,color){
	document.getElementById(id).style.backgroundColor=color;	
}

function changeDownload(id,mod){
	
	if(mod=="over"){
		document.getElementById("down_"+id).style.color="#eb6812";	
		document.getElementById("img_"+id).style.filter="Alpha(opacity='80'";
		document.getElementById("img_"+id).style.MozOpacity='0.8';
			
	}
	else{
		document.getElementById("down_"+id).style.color="#000000";	
		document.getElementById("img_"+id).style.filter="Alpha(opacity='100'";
		document.getElementById("img_"+id).style.MozOpacity='1.0';
	}
	
}

function changeTwitter(id,mod){
	
	if(mod=="over"){
		document.getElementById('text').style.textDecoration="underline";
		
		document.getElementById(id).style.MozOpacity='0.8';
			
	}
	else{
		document.getElementById('text').style.textDecoration="none";
		document.getElementById(id).style.filter="Alpha(opacity='100'";
		document.getElementById(id).style.MozOpacity='1.0';
	}
	
}
function doTooltip(e, msg) {
 	//alert("hallo");
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}

function hideDiv(id){
	document.getElementById(id).style.display="none";
}

function showDiv(id){
	//alert(id);
	hlp = id;
	document.getElementById(id).style.display="";
	//window.setTimeout("showDiv2()", 4000);
	
}
function showDiv2(id){
document.getElementById(hlp).style.display="";
}

function checkBrowser2(loc,view){
	//alert(navigator.userAgent);
	//var hlpSaf=checkBrowserName('safari');
	var u = navigator.userAgent.toLowerCase();
	var iphone = ((u.indexOf('iphone'))!=-1);
	//alert(iphone);
if (typeof document.body.style.maxHeight != "undefined" && !iphone) {

	} 
	else if(iphone){
		
		if(!view){
			document.getElementById("top").style.display="none";
			location.href=loc+"/C/1";
		}	
	}
	else
	 {
	 	var hoehe="";
	 	hoehe=document.getElementById("master").scrollHeight;
	 	document.getElementById("errorSh").style.height=hoehe;
	 	document.getElementById("twitterFrame").style.display="none";
		document.getElementById("errorBox").style.display="";
		document.getElementById("errorSh").style.display="";

	}
}
function checkBrowser(loc){
	//alert(navigator.userAgent);
	//var hlpSaf=checkBrowserName('safari');
	var u = navigator.userAgent.toLowerCase();
	var iphone = ((u.indexOf('iphone'))!=-1);
	//alert(iphone);
if (typeof document.body.style.maxHeight != "undefined" ) {

	} 
	else
	 {
	 	var hoehe="";
	 	hoehe=document.getElementById("master").scrollHeight;
	 	document.getElementById("errorSh").style.height=hoehe;
	 	document.getElementById("twitterFrame").style.display="none";
		document.getElementById("errorBox").style.display="";
		document.getElementById("errorSh").style.display="";

	}
}

function closeErrorWin(){
	check=true;
	document.getElementById("twitterFrame").style.display="";
	document.getElementById("errorBox").style.display="none";
	document.getElementById("errorSh").style.display="none";
}

 function checkBrowserName(name){  
    var agent = navigator.userAgent.toLowerCase();  
    if (agent.indexOf(name.toLowerCase())>-1) {  
      return true;  
    }  
   return false;  
 }  
 
 function showVideo(e){

 	var height="";
 	document.getElementById("divVideo").style.display="";
 	document.getElementById("errorSh").style.display="";
 }
 
 function makeHover(id,mod){
	
	if(mod=="over"){
		document.getElementById(id).style.filter="Alpha(opacity='80'";
		document.getElementById(id).style.MozOpacity='0.8';	
	}
	else{
		document.getElementById(id).style.filter="Alpha(opacity='100'";
		document.getElementById(id).style.MozOpacity='1.0';
	}
}

function showDia(e){
 	var height="";
 	document.getElementById("divDia").style.display="";
 	document.getElementById("errorSh").style.display="";
}

function showArchiv(j){
	
	document.getElementById("divArchiv").style.display="";
	document.getElementById("jeahr_"+j).style.fontWeight="normal";
	document.getElementById("archiv").style.display="";
	document.getElementById("month_2009").style.display="none";
	document.getElementById("archiv").style.fontWeight="bold";
}

function showStandard(){
	document.getElementById("twitterFrame").style.display="";
	document.getElementById("errorBox").style.display="none";
	document.getElementById("errorSh").style.display="none";
}


function changeClass(klasse,id)
{
       document.getElementById(id).className=klasse;
}

