
function string_space(string){
	var n = "";
	var l = string.length;
	if(l==0) return;
	 	for (i=0;i<l;i++){
		 	n += string.charAt(i) + "&nbsp;";	
		 } 
	document.write(n);
}

var btoplink=false;

function toplink(){
if (btoplink)build_toplink();
}

function build_toplink(){
if (navigator.appName == "Microsoft Internet Explorer"){
y = document.body.offsetHeight;
}
else
{
y = window.innerHeight;
}

if(!ns){
if (document.getElementById('main').offsetHeight > y){
a = (Math.round(document.getElementById('main').offsetHeight / 300)-2);
showtoplink(a);
}
}
}

function showtoplink(a){
for(i=0;i<a;i++){
document.getElementById('toptar').innerHTML += '<div style="position:absolute; left:147; top:'+ (600 + (i*300)) +';z-index:50'+i+'" id="topnav'+i+'"><a href="#top"><img src="www.agiv.de/cms/system/modules/de.solveit.modules.frontend/pics/link_top.gif" width="15" height="15" alt="" border="0"></a></div>';
}
}
									
		
var sh = 0;													
function showhideanchnav(){		
if(sh == 0){															
getdiv('anchnav').visibility = "visible";
sh = 1;
return;
}
if(sh == 1){
getdiv('anchnav').visibility = "hidden";
sh = 0;
return;
}
}																			

function getdiv(layerid){
if (dhtml)return document.getElementById(layerid).style;
if (ns) return document.layers[layerid];
if (ie4) return document.all[layerid].style;
}

function print_it(str){
var printwin = window.open(str,'Druckversion','width=450,height=600,scrollbars=yes');
printwin.focus();
}

function chartwindow(url){
	if (screen.width >= 800){
		var chart_w = window.open(url,"Aktieninfo","width=580,height=520,resizable=yes,scrollbars=yes");
	}
	else{
		var chart_w = window.open(url,"Aktieninfo","width=574,height=620");
	}
chart_w.focus();
}

function newwindow(url,param){
var mywin = window.open(url,"newwindow",param);
mywin.focus();
}
