// JavaScript Document
	var holdtools = false;
	var holdasp = false;
	var fs;
	var requiredMajorVersion = 7;
	var requiredMinorVersion = 0;
	var requiredRevision = 0;

	function NewWindow(mypage, myname, w, h, scroll){ var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no,status=yes'; win = window.open(mypage, myname, winprops); if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } }
	function movepic(img_name,img_src){ document[img_name].src=img_src; }
	function setcookie(name, value, days, path, domain, secure) { var expires = -1; if(typeof days == "number" && days >= 0) { var d = new Date(); d.setTime(d.getTime()+(days*24*60*60*1000)); expires = d.toGMTString(); } value = escape(value); document.cookie = name + "=" + value + ";" + (expires != -1 ? " expires=" + expires + ";" : "") + (path ? "path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "; secure" : ""); }
	function delcookie(name) { setcookie(name, "-", 0); }
	function getcookie(name) { var idx = document.cookie.indexOf(name+'='); if(idx == -1) { return null; } value = document.cookie.substring(idx+name.length+1); var end = value.indexOf(';'); if(end == -1) { end = value.length; } value = value.substring(0, end); value = unescape(value); return value; }		
	function sd(id){document.getElementById(id).style.display = "";}			
	function hd(id){document.getElementById(id).style.display = "none";}
	function close_asp() { if(!holdasp)	{ hd("myaspon"); sd("onlinetools"); sd("fokusfrage");	}}
	function set_asp_timeout() { if(!holdtools) { document.getElementById("myasp_img").src = "html_templates/data/myasp.gif"; document.getElementById("onlinetools_img").src = "html_templates/data/onlinetools.gif"; window.setTimeout("close_asp()", 1000); }}
	function close_tools(){if(!holdtools){document.getElementById("onlinetools_img").src = "html_templates/data/onlinetools.gif"; sd("fokusfrage"); hd("onlinetoolson");}}
	function set_tools_timeout(){if(!holdtools){window.setTimeout("close_tools()", 2000);}}
	function hold_tools(){
		document.getElementById("onlinetools_img").src = "html_templates/data/onlinetools_h.gif";
		holdtools = true;}
	function hide_tools(){holdtools = false; set_tools_timeout();}
	function show_tools(){
		document.getElementById("onlinetools_img").src = "html_templates/data/onlinetools_h.gif";
		holdtools = true; hd("fokusfrage");	sd("onlinetoolson");}
	function hold_asp(){
		document.getElementById("myasp_img").src = "html_templates/data/myasp_h.gif";
		holdasp = true;}
	function hide_asp(){holdasp = false; set_asp_timeout();}
	function show_asp(){
		document.getElementById("myasp_img").src = "html_templates/data/myasp_h.gif";
		holdasp = true;hd("onlinetoolson");hd("fokusfrage");hd("onlinetools");sd("myaspon");}			
	function changeFontSize(percent){fs += percent;if(fs >17){fs = 17;}if(fs < 11){fs = 11;}document.getElementById("aspcontent").style.fontSize=fs+"px";setcookie('asp_consulting_fontsize', fs, 365, '/');}
			function check_poll(id)
			{
				radio_choice = false;
				radio_form = document.forms['poll'+id];
				for (counter = 0; counter < radio_form.pollvalue.length; counter++)
				{
					if (radio_form.pollvalue[counter].checked)
					radio_choice = true; 
				}
				
				if(radio_choice == true)
				{
					document.forms['poll'+id].submit();
				}
				else
				{
					alert("Bitte teffen Sie eine Auswahl!");
				}
			}
			
			
	function show_fokus()
	{
		document.getElementById("fokus_img").src = "html_templates/data/fokus_h.gif";
	}
	
	function hide_fokus()
	{
		document.getElementById("fokus_img").src = "html_templates/data/fokus.gif";
	}
			
	/*Preload Images */
	var menulevel1 = new Image();
	menulevel1.src = 'html_templates/data/asp_h.gif'; 
	var menulevel1 = new Image();
	menulevel1.src = 'html_templates/data/references_h.gif'; 
	var menulevel1 = new Image();
	menulevel1.src = 'html_templates/data/competeces_h.gif'; 
	var menulevel1 = new Image();
	menulevel1.src = 'html_templates/data/knowledge_h.gif'; 
	var menulevel1 = new Image();
	menulevel1.src = 'html_templates/data/press_h.gif'; 
	var menulevel2 = new Image();
	menulevel2.src = 'html_templates/data/onlinetools_h.gif'; 
	var menulevel3 = new Image();
	menulevel3.src = 'html_templates/data/myasp_h.gif'; 

		
	window.onload = function()
	{
		if(getcookie('asp_consulting_fontsize'))
		{ 
			fs = eval(getcookie('asp_consulting_fontsize')); 
		}	
		else
		{
			fs = 11;
		}
		changeFontSize(0);
		
		document.getElementById("onlinetoolslink").onmouseover = show_tools;
		document.getElementById("onlinetoolslink").onmouseout = hide_tools;
		document.getElementById("onlinetoolson").onmouseover = hold_tools;
		document.getElementById("onlinetoolson").onmouseout = hide_tools;
		document.getElementById("myasplink").onmouseover = show_asp;
		document.getElementById("myasplink").onmouseout = hide_asp;
		document.getElementById("myaspon").onmouseover = hold_asp;
		document.getElementById("myaspon").onmouseout = hide_asp;
				document.getElementById("fokus_link").onmouseover = show_fokus;
		document.getElementById("fokus_link").onmouseout = hide_fokus;

		
		setNews();		
	}
		function setNews()
		{
			
			document.getElementById('topnews_date').innerHTML = newsticker[online_news][0];
			document.getElementById('topnews_headline').innerHTML = newsticker[online_news][1];
			document.getElementById('topnews_text').innerHTML = newsticker[online_news][2];
			
			
			if(online_news == 4)
				online_news = 0;
			else
				online_news++;
			setContentHeight();
			setTimeout("setNews()",10000);
		}
	
	function setContentHeight()
	{
		//alert(document.getElementById("left_layer").offsetHeight +"xx"+document.getElementById("right_layer").offsetHeight+"xx"+document.getElementById("aspcontent").offsetHeight);
		if(document.getElementById("left_layer").offsetHeight-document.getElementById("right_layer").offsetHeight+20 > 0)
		{
			document.getElementById("aspcontent").style.height =document.getElementById("aspcontent").offsetHeight + document.getElementById("left_layer").offsetHeight-document.getElementById("right_layer").offsetHeight+80+"px";
		}
	}
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
			