function showHideDIVs(name, div, borderDiv){
	var identifier = name;
	myDiv = document.getElementById(div);
	
	//alert (div);
	
	borderDiv.style.border = "none"; 	
	borderDiv.style.borderTop = " 1px solid #980004";
	borderDiv.style.borderLeft = " 1px solid #980004";
	borderDiv.style.borderRight = " 1px solid #980004";
	borderDiv.style.borderBottom = " 1px solid #FAFAFA";
	// border aendern
	for(b=0; b<20; b++){
		otherBorder = document.getElementById("head_" + b);
		if (otherBorder){
			if(otherBorder != borderDiv){	
				otherBorder.style.borderTop = "1px solid #CCC";
				otherBorder.style.borderLeft = "1px solid #CCC";
				otherBorder.style.borderRight = "1px solid #CCC";
				otherBorder.style.borderBottom = "1px solid #980004";
			}
		}else{
			break;
		}
	
	}
	
	Effect.BlindDown	(myDiv, {duration:0.4});
	for(i=0; i<20; i++){
		iName = identifier + i;
    	otherDiv = document.getElementById(iName);
    	if (otherDiv){
    		if (myDiv != otherDiv){
    		Effect.BlindUp (otherDiv,{duration:0.4});
    		//otherdiv.style.display = 'none';
    		//Effect.BlindDown(div);
    		}
    	}else{
    		break;
    	}
    }
}

function changeFont(color){
	if (color == 'white'){
		for(i=1;i<=6;i++){
			myDiv = document.getElementById("sendertext_" + i) ;
			myDiv.style.color = "#FFFFFF"; 	
			myDiv = document.getElementById("nowOnline_" + i) ;
			myDiv.style.color = "#FFFFFF"; 	
		}
		myDiv1 = document.getElementById("bannerhead") ;
		myDiv1.style.color = "#FFFFFF"; 	
		myDiv2 = document.getElementById("bannerfoot") ;
		myDiv2.style.color = "#FFFFFF";

		// Schriftfarbe im Link ändern
		//$('schriftfarbe').innerHTML = 'FFFFFF';
		changeValuesDynamic('schriftfarbe', 'FFFFFF');
		
		//ersetzen des parameters im link
		var linksource = $('examplelink').href;
		var linksource = linksource.replace(/&schrift=000000/, "&schrift=ffffff");
		$('examplelink').href = linksource;
		
	}else{
		for(i=1;i<=6;i++){
			myDiv = document.getElementById("nowOnline_" + i) ;
			myDiv.style.color = "#000000"; 	
			myDiv = document.getElementById("sendertext_" + i) ;
			myDiv.style.color = "#000000"; 	
		}
		myDiv1 = document.getElementById("bannerhead") ;
		myDiv1.style.color = "#000000"; 	
		myDiv2 = document.getElementById("bannerfoot") ;
		myDiv2.style.color = "#000000";
		
		// Schriftfarbe im Link ändern
		//$('schriftfarbe').innerHTML = '000000';
		changeValuesDynamic('schriftfarbe', '000000');
		
		//ersetzen des parameters im link
		var linksource = $('examplelink').href;
		var linksource = linksource.replace(/&schrift=ffffff/, "&schrift=000000");
		$('examplelink').href = linksource;
	}
}

var rgb = new Array();

function changeBorder(main, color){
	for(i=1;i<=6;i++){
			myDiv = document.getElementById(main + i) ;
			myDiv.style.border = "1px solid #" + color; 	
	}
	for(i=1;i<=6;i++){
		myDiv2 = document.getElementById("pic_senderin_" + i) ;
		myDiv2.style.border = "1px solid #" + color; 	
	}
	myDiv3 = document.getElementById("barreSortie") ;
	myDiv3.style.backgroundColor = "#" + color; 	
	myDiv3.style.border = "none"; 	
	
	myDiv4 = document.getElementById("bannerhead") ;
	myDiv4.style.backgroundColor = "#" + color; 	
	
	myDiv5 = document.getElementById("bannerfoot") ;
	rgb = HexToRGB(color);
	hex = RGBToHex(rgb['red'],rgb['green'],rgb['blue']);	
	myDiv5.style.backgroundColor = "#" + hex; 	
	
	for(i=1;i<=6;i++){
		myDiv6 = document.getElementById("sendername_" + i) ;
		myDiv6.style.color = "#" + color; 
	}
	
	// Rahmenfarbe im Link ändern
	changeValuesDynamic('borderfarbe', color);
	
	//ersetzen des parameters im link
	var linksource = $('examplelink').href;
	var linksource = linksource.replace(/&border=[a-zA-Z_0-9]{6}/, "&border="+color);
	$('examplelink').href = linksource;
	
}

function changeValuesDynamic(className, value) {
	var spans = document.getElementsByTagName('span');
	for(var i = 0; i < spans.length; i++) {
		if(hasCName(spans[i],className)) { spans[i].innerHTML = value; }
	}
}

function hasCName(element, className) {
    if (!(element = $(element))) return;
    var elementClassName = element.className;
    if (elementClassName.length == 0) return false;
    if (elementClassName == className ||
        elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
      return true;
    return false;
}

function changeBackground(main, color) {
	// Hintergrundfarbe im Link ändern
	changeValuesDynamic('backgroundfarbe', color);
	
	//ersetzen des parameters im link
	var linksource = $('examplelink').href;
	var linksource = linksource.replace(/&bgr=[a-zA-Z_0-9]{6}/, "&bgr="+color);
	$('examplelink').href = linksource;
}

function changeColors(what, color) {
	$('span_'+what).innerHTML = color;
}

function HexToRGB(H) { 
		hexR = H.substr(0,2);
		rgb['red'] = parseInt((hexR).substring(0,2),16);
		rgb['red'] = rgb['red'] * 0.7;
		hexG = H.substr(2,2);
		rgb['green'] = parseInt((hexG).substring(0,2),16);
		rgb['green'] = rgb['green'] * 0.7;
		hexB = H.substr(4,2);
		rgb['blue'] = parseInt((hexB).substring(0,2),16);
		rgb['blue'] = rgb['blue'] * 0.7;
		return rgb;
}

function RGBToHex(R,G,B) {
	return (toHex(R)+toHex(G)+toHex(B));
}
	
function toHex(N) {
	if (N==null) 
		return "00";
	N=parseInt(N); 
	if (N==0 || isNaN(N)) 
		return "00";
	N=Math.max(0,N); 
	N=Math.min(N,255); 
	N=Math.round(N);
	return "0123456789ABCDEF".charAt((N-N%16)/16) + "0123456789ABCDEF".charAt(N%16);
}
	
function showCampaigns(group,div, main){
	
	myDiv = document.getElementById(div);
	Effect.BlindDown(myDiv, {duration:0.4});
	main.style.border = "none"; 	
	main.style.borderTop = " 1px solid #980004";
	main.style.borderLeft = " 1px solid #980004";
	main.style.borderRight = " 1px solid #980004";
	main.style.borderBottom = " 1px solid #FAFAFA";
	
	for (c=1; c<=20; c++){
		// 
		cname = group + "_campaign_"+ c;
		otherDiv = document.getElementById(cname);
		if(otherDiv){
			if (cname != div){
				Effect.BlindUp (otherDiv,{duration:0.4});
			}
		}else{
			break;
		}

		cheadName = main.id;
		headIdentifier = cheadName.split("_");
		
		chead = headIdentifier[0] + "_main_" + c;
		headDiv = document.getElementById(chead);
		if (headDiv != main){
			headDiv.style.borderTop = "1px solid #CCC";
			headDiv.style.borderLeft = "1px solid #CCC";
			headDiv.style.borderRight = "1px solid #CCC";
			headDiv.style.borderBottom = "1px solid #980004";
		}
		
	}
}


function showHideCreateCampaign(name, div, borderDiv){
	var identifier = name;
	myDiv = document.getElementById(div);
	if (myDiv.style.display == 'none'){
		Effect.BlindDown	(myDiv, {duration:0.4});
	}else{
		Effect.BlindUp	(myDiv, {duration:0.4});
	}
	
	for(i=0; i<20; i++){
		iName = identifier + i;
    	otherDiv = document.getElementById(iName);
    	if (otherDiv){
    		if (myDiv != otherDiv){
    		Effect.BlindUp (otherDiv,{duration:0.4});
    		//otherdiv.style.display = 'none';
    		//Effect.BlindDown(div);
    		}
    	}else{
    		break;
    	}
    }
}



function show_info(){
	var InfoDiv = document.getElementById('infoText');
	var InfoPic = document.getElementById('infoPic');
	var info = document.getElementById('infoContent');
	
	

	if (InfoDiv.style.display == "none"){
		Effect.BlindDown(InfoDiv, {duration:0.5});
		InfoPic.style.backgroundImage = "url(img_neu/pfeil_unten.png)";
		new Effect.Highlight(info, {startcolor:'#fbcfcf', endcolor:'#FFFFFF'})
		
	}else{
		Effect.BlindUp(InfoDiv, {duration:0.5});
		InfoPic.style.backgroundImage = "url(img_neu/pfeil_big.png)";
	}
	
}

function set_link(link, subname, title){
	var myText = document.getElementById('text');
	newLink = "<IFRAME src=\"" + link + "\"></IFRAME>";
	myText.value = newLink;
	
	var SubId = document.getElementById('subid');
	if (subname != ""){
		SubId.innerHTML = title + ": " + subname;
	}
	
}

function changeStyle (div, number){
	if (div.className == 'divbanner'+number){
		var change = 'divbanneractive'+number;
	}else{
		var change = 'divbanner'+number;
	}
	div.className = change;
}

function popup() {
	var linksource = $('examplelink').href;
	ok = window.open(linksource, '', 'width=916,height=600,resizable');
	if (ok) return false;
  else return true;
}

var favsender = '';

function changefavorit() {
	var value = $F('senderfav');
	
	if(favsender == "")	favsender += value;
	else favsender += ","+value;
	
	var linksource = $('examplelink').href;
	var linksource = linksource.replace(/&s=/, "&s="+value+",");
	$('examplelink').href = linksource;
	
	//fav sender in der anzeige
	$('fav_sender').innerHTML = $('fav_sender').innerHTML + " " + value;
	
	changeValuesDynamic('favsender', favsender);
	
}

function initSlider(ausrichtung) {
	if(ausrichtung == "horizontal") {
		var min = 120;
		var max = 750;
	} else {
		var min = 230;
		var max = 940;
	}
	
	
	new Control.Slider('handle','track',{
				range:$R(min,max),
				onSlide:function(v){
					v = Math.floor(v);
					$('debug').innerHTML=v + ' px';
				},
				onChange:function(v){
					v = Math.floor(v);
					$('debug').innerHTML= v + ' px';
					
					if(ausrichtung == "horizontal") {
						$('barreSortie').style.width= v + 'px';
					} else {
						$('barreSortie').style.height= v + 'px';
					}
					
					changeValuesDynamic('value1', v);
					changeValuesDynamic('value2', v);
									
					//ersetzen des parameters im link
					var linksource = $('examplelink').href;
					var linksource = linksource.replace(/&breite=[0-9]{3}/, "&breite="+v);
					$('examplelink').href = linksource;
				
					handle_slide(v, ausrichtung);
				}
			});
}

function ShowHide (div){
	if (document.getElementById) {

		var myContentDiv = $('banner');
		var mydiv = document.getElementById(div);
		var mydbb = $('dbb');

		myContentDiv.innerHTML = '';
		Effect.BlindDown(mydiv, {duration: 0.9})


/*		if (div == 3){
		
		} else {
			myContentDiv.style.visibility = 'visible';
		}*/


		for(i=1; i<10; i++){
			otherdiv = document.getElementById(i);
			if (otherdiv){
				if (mydiv != otherdiv){
					//Effect macht probleme bei zu schnellem klicken
					//Effect.BlindUp (otherdiv,{queue: {position:'front', scope: 'myscope', limit:10} });
					otherdiv.style.display = 'none';
				}
			}else{
				break;
			}
		}
	}
}

	
//Benötigt um Tabelle zu ändern
if(navigator.appVersion.indexOf("MSIE")>-1) var blockCell = "block";
else  var blockCell = "table-cell";

function handle_slide(v, ausrichtung){
	
	if(ausrichtung == "horizontal") {
		
		var col1 = $('col_1');
		var col2 = $('col_2');
		var col3 = $('col_3');
		var col4 = $('col_4');
		var col5 = $('col_5');
		var col6 = $('col_6');
		
		if (v <= 239){ // ein Bild
	        		col1.style.width = '100%';
	        		for (c=2; c<=7; c++){
						if($('col_' + c)) $('col_' + c).style.display = 'none';
	        		}
	        	}else if (v > 239 && v <= 359 ){	// 2 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;		
	        		col1.style.width = '50%';	
	        		col2.style.width = '50%';	
	        		
	        		for (c=3; c<7; c++){
	        			if($('col_' + c)) $('col_' + c).style.display = 'none';
	        		}
	        	}else if (v > 359 && v <= 479 ){	// 3 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit		
	        		col3.style.display = blockCell;		
	        		
	        		col1.style.width = '33.33%';	
	        		col2.style.width = '33.33%';	
	        		col3.style.width = '33.33%';	
	        		
	        		for (c=4; c<7; c++){
	        			if($('col_' + c)) $('col_' + c).style.display = 'none';
	        		}
	        	}else if (v > 479 && v <= 599 ){	// 4 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit
	        		col3.style.display = blockCell;	 //edit
	        		col4.style.display = blockCell;		
	        		
	        		col1.style.width = '25%';	
	        		col2.style.width = '25%';	
	        		col3.style.width = '25%';	
	        		col4.style.width = '25%';	
	        		
	        		for (c=5; c<=7; c++){
	        			if($('col_' + c)) $('col_' + c).style.display = 'none';
	        		}
	        	}else if (v > 599 && v <= 719 ){	// 5 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit
	        		col3.style.display = blockCell;	 //edit
	        		col4.style.display = blockCell;	 //edit
	        		col5.style.display = blockCell;		
	        		col1.style.width = '20%';	
	        		col2.style.width = '20%';	
	        		col3.style.width = '20%';	
	        		col4.style.width = '20%';	
	        		col5.style.width = '20%';	
	        		for (c=6; c<=7; c++){	
		        		if($('col_' + c)) $('col_' + c).style.display = 'none';
	        		}
	        	}else if (v > 719 && v <= 750 ){	// 6 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit
	        		col3.style.display = blockCell;	 //edit
	        		col4.style.display = blockCell;	 //edit
	        		col5.style.display = blockCell;	 //edit
	        		col6.style.display = blockCell;	
	        		col1.style.width = '16.66%';	
	        		col2.style.width = '16.66%';	
	        		col3.style.width = '16.66%';	
	        		col4.style.width = '16.66%';	
	        		col5.style.width = '16.66%';	
	        		col6.style.width = '16.66%';	
	        	}
	} else if (ausrichtung == "vertikal") {
		
		var col1 = $('r_1');
		var col2 = $('r_2');
		var col3 = $('r_3');
		var col4 = $('r_4');
		var col5 = $('r_5');
		var col6 = $('r_6');
		
		if (v <= 399){ // ein Bild
	        		col1.style.height = '100%';
	        		for (c=2; c<=7; c++){
						if($('r_' + c)) $('r_' + c).style.display = 'none';
	        		}
	        	}else if (v > 399 && v <= 579 ){	// 2 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;		
	        		col1.style.height = '50%';	
	        		col2.style.height = '50%';	
	        		
	        		for (c=3; c<7; c++){
	        			if($('r_' + c)) $('r_' + c).style.display = 'none';
	        		}
	        	}else if (v > 579 && v <= 759 ){	// 3 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit		
	        		col3.style.display = blockCell;		
	        		
	        		col1.style.height = '33.33%';	
	        		col2.style.height = '33.33%';	
	        		col3.style.height = '33.33%';	
	        		
	        		for (c=4; c<7; c++){
	        			if($('r_' + c)) $('r_' + c).style.display = 'none';
	        		}
	        	}else if (v > 759 && v <= 939){	// 4 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit
	        		col3.style.display = blockCell;	 //edit
	        		col4.style.display = blockCell;		
	        		
	        		col1.style.height = '25%';	
	        		col2.style.height = '25%';	
	        		col3.style.height = '25%';	
	        		col4.style.height = '25%';	
	        		
	        		for (c=5; c<=7; c++){
	        			if($('r_' + c)) $('r_' + c).style.display = 'none';
	        		}
	        	}else if (v > 939 ){	// 5 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit
	        		col3.style.display = blockCell;	 //edit
	        		col4.style.display = blockCell;	 //edit
	        		col5.style.display = blockCell;		
	        		col1.style.height = '20%';	
	        		col2.style.height = '20%';	
	        		col3.style.height = '20%';	
	        		col4.style.height = '20%';	
	        		col5.style.height = '20%';	
	        		for (c=6; c<=7; c++){	
		        		if($('r_' + c)) $('r_' + c).style.display = 'none';
	        		}/*
	        	}else if (v > 719 && v <= 750 ){	// 6 Bilder
	        		col1.style.display = blockCell;	 //edit
	        		col2.style.display = blockCell;	 //edit
	        		col3.style.display = blockCell;	 //edit
	        		col4.style.display = blockCell;	 //edit
	        		col5.style.display = blockCell;	 //edit
	        		col6.style.display = blockCell;	
	        		col1.style.height = '16.66%';	
	        		col2.style.height = '16.66%';	
	        		col3.style.height = '16.66%';	
	        		col4.style.height = '16.66%';	
	        		col5.style.height = '16.66%';	
	        		col6.style.height = '16.66%';	
	        	}*/
	}

}
}

function toggledisplay (id){	
  if (document.getElementById) {
    var mydiv = document.getElementById(id);
    mydiv.style.display = (mydiv.style.display=='block'?'none':'block');
    
    for(i=1; i<120; i++){
    	ie = "new_" + i;
    	otherdiv = document.getElementById(ie);
    	if (otherdiv){
    		if (mydiv != otherdiv){
    			otherdiv.style.display = 'none';
    		}
    	}else{
    		break;
    	}
    } 
  }
}

function togglestatscat (cat, echocat) {
	if(document.getElementById(cat + "1").style.display == '') {
		document.getElementById(cat).innerHTML = "<img src=\"img_neu/plus.gif\" alt=\"\" /> <b>"+ echocat +"</b>";
	}
	else
	{
		document.getElementById(cat).innerHTML = "<img src=\"img_neu/minus.gif\" alt=\"\" /> <b>"+ echocat +"</b>";
	}

	for(i=1; i<100; i++) {
		if(document.getElementById(cat + i)) {
			var mydiv = document.getElementById(cat + i);
			mydiv.style.display = (mydiv.style.display=='none'?'':'none');
		}
	}
}

function toggleDiv (id){
	if (document.getElementById) {
		var mydiv = document.getElementById(id);
		new Effect.BlindDown(id, {duration: 0.8});
	}
}

function toggleDiv2 (id){
	if (document.getElementById) {
		var mydiv = document.getElementById(id);
		new Effect.Squish(id, {duration: 0.8});
	}
}

function switchClass(obj,strClassName) {
	obj.className = strClassName;
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function HP_checksize (framename) {
	if (parent.frames[framename]) {
	   if (framename == "xmaincontent") {
		scrollh  = 50 + parent.frames[framename].document.body.scrollHeight;
		parent.document.getElementById(framename).style.height = (scrollh > 500)? scrollh : 500;
		parent.scrollTo(0,0);
	   } else {
		scrollh  = 2 + parent.frames[framename].document.body.scrollHeight;
		parent.document.getElementById(framename).style.height = (scrollh > 20)? scrollh : 20;
	   }
	}
}

function HP_iframeResize (obj, minh) {	
	h = window.frames[obj.id].document.body.scrollHeight
 	obj.style.height = (h > minh) ? h : minh;
}

function HP_winopen_stp (url) {
        win=open(url, 'HPSTPPOP', 'width=500,height=300,location=no,resizable=yes,status=no,toolbar=no,menubar=no,scrollbars=yes');
        if (win) win.focus();
}

function HP_winopen_pass (url) {
        win=open(url, 'HPWERBASS', 'width=800,height=500,location=no,resizable=yes,status=no,toolbar=no,menubar=no,scrollbars=yes');
        if (win) win.focus();
}

function HP_winopen_print (url) {
        win=open(url, 'HPPRINT', 'width=700,height=500,location=no,resizable=yes,status=no,toolbar=no,menubar=no,scrollbars=yes');
        if (win) win.focus();        
}
function HP_winopen_help (url) {
        win=open(url, 'HPPRINT', 'width=1000,height=500,location=no,resizable=no,status=no,toolbar=no,menubar=no,scrollbars=yes');
        if (win) win.focus();        
}

function HP_login (win, url, flush) {
	win.frames["xloginframe"].location.search = "flush=" + flush + "&x=" + (new Date()).getTime();
	if (url != "") {
		win.frames["xmaincontent"].location.href = url;
	}
}

HP_addhist_count = 0;
function HP_addhist (name, href) {
	html 		= '<a href="' + href +'">'+name+"</a>";	
	box		= document.getElementById("xlastseentable");	
	td		= document.createElement("td");
	td.innerHTML 	= html;
	if (box.rows.length>12) box.deleteRow(10);
	for (i = 1; i < box.rows.length; i++) {		
		if (box.rows[i].cells[0].innerHTML.toLowerCase() == td.innerHTML.toLowerCase()) {
			box.deleteRow(i); break;
		}else if (box.rows.length > 3 && box.rows[i].cells[0].innerHTML.toLowerCase() == "<a>&nbsp;</a>") {
			box.deleteRow(i); break;
		}	
	}
	row  = box.insertRow(1);	
	row.appendChild(td);
	div 		= document.getElementById("xlastseen");	
	if (box.rows.length > 5 && div.style.display != "block") {
		div.style.display = "block";
		HP_flush ("xlastseen");
	}
	HP_addhist_count++;
}

function HP_flush_find (root, path) {
	if (root.nodeName == "TBODY") { root.style.backgroundImage = "url(/img/nav/boxm_ani2.gif)";	return;	}
	if (root.nodeName == "TFOOT") { root.style.backgroundImage = "url(/img/nav/boxu_ani2.gif)"; 	return;	}
	for (var i=0; i<root.childNodes.length; i++) {
		HP_flush_find (root.childNodes[i], path + " > " + root.childNodes[i].nodeName);
	}
}

function HP_flush (name) {
	divelement = document.getElementById(name);
	if (divelement)	{
		divelement.display = 'none';
		HP_flush_find (divelement, name);
		divelement.display = 'block';
		return;
	}
	if (frames.length > 0) for (i=0; i<frames.length; i++) {
		divelement = frames[i].document.getElementById(name);
		if (divelement) {
			HP_flush_find (divelement, name);
			return;
		}
	}
}

HPV_divoldid = "";
function HP_togglediv (divid) {
	if (HPV_divoldid != "" && divid != HPV_divoldid) {
		togglediv (HPV_divoldid)
	}
	obj = document.getElementById(divid)
	if (obj.style.visibility == "hidden") {
		obj.style.visibility = "visible"
		obj.style.height = "auto"
		HPV_divoldid = divid;
	} else {
		obj.style.visibility = "hidden"
		obj.style.height = "1px"
		HPV_divoldid = "";
	}
}


function einAusBlenden(layer) {  
  if (document.getElementById(layer).style.visibility == "visible") { 
    document.getElementById(layer).style.visibility = "hidden";
    return;
  } 
  if (document.getElementById(layer).style.visibility == "hidden" || !document.getElementById(layer).style.visibility ) { 
  	document.getElementById(layer).style.visibility = "visible";
    return;
  } 
} 


function showCampaignsWithoutEffect(group,div, main){
	myDiv = document.getElementById(div);
	
	//Effect.BlindDown(myDiv, {duration:0.4});
	myDiv.style.display = "block";
	
	mymain = document.getElementById(main);
	//alert(mymain);
	
	mymain.style.border = "none"; 	
	mymain.style.borderTop = " 1px solid #980004";
	mymain.style.borderLeft = " 1px solid #980004";
	mymain.style.borderRight = " 1px solid #980004";
	mymain.style.borderBottom = " 1px solid #FAFAFA";
	
	for (c=1; c<=20; c++){
		// 
		cname = group + "_campaign_"+ c;
		otherDiv = document.getElementById(cname);
		
		if(otherDiv){
			if (cname != div){
				//Effect.BlindUp (otherDiv,{duration:0.4});
				otherDiv.style.display = "none";
			}
		}else{
			break;
		}

		cheadName = mymain.id;
		headIdentifier = cheadName.split("_");
		
		chead = headIdentifier[0] + "_main_" + c;
		headDiv = document.getElementById(chead);
		if (headDiv != mymain){
			headDiv.style.borderTop = "1px solid #CCC";
			headDiv.style.borderLeft = "1px solid #CCC";
			headDiv.style.borderRight = "1px solid #CCC";
			headDiv.style.borderBottom = "1px solid #980004";
		}
		
	}
}

function selectIT(div) {

	if (window.getSelection) {
		var selection = window.getSelection();
		selection.selectAllChildren(div);
	} else if (document.body.createTextRange) {
		var range = document.body.createTextRange();
		range.moveToElementText(div);
		range.select();
	}
}
