
dom1 = (document.getElementById) ? 1 : 0;
ns4 = (document.layers) ? 1 : 0;
ie4 = (document.all) ? 1 : 0;
course_id_last_highlighted = '';

function newtinywindow(desturl,winname)
{
        var dynimg=0;
        browsname = navigator.appName;
        browsver = parseInt(navigator.appVersion);
        
        if (winname=='')
        {       jetzt = new Date();
                winname=jetzt.getTime(); 
        }
        desturl = 'tinywindow/' + desturl;
        var fenster = window.open(desturl, winname, "width=200,height=100,left=20,top=20,toolbar=0,location=0,status=1,menubar=0,scrollbars=0,resizable=0");
}

function newwindow(desturl,winname)
{
        var dynimg=0;
		var getstr_sep = "?";
        browsname = navigator.appName;
        browsver = parseInt(navigator.appVersion);

		var wwidth=750;
		var wheight=450;

        if (screen.width >= 1024 && screen.height >= 768)
        {
        	//wwidth = screen.width - 150;
        	//wheight = screen.height - 200;
        	wwidth = 820;
        	wheight = 650;
        }
        
        if (winname=='')
        {       jetzt = new Date();
                winname=jetzt.getTime(); 
        }
        desturl = desturl;
		if (desturl.indexOf("?") >= 0)
		{
			getstr_sep = "&amp;";
		}
        var fenster = window.open(desturl + getstr_sep + "mode=nw1", winname, "width=" + wwidth + ",height=" + wheight + ",left=20,top=20,toolbar=1,location=1,status=1,menubar=0,scrollbars=1,resizable=1");
		fenster.window.focus();
}



function change_style(id, newClass)
{
	if (dom1)
	{
		identity=document.getElementById(course_id_last_highlighted);
		if (identity)
		{ identity.className='highlightoff'; }

		identity=document.getElementById(id);
		if (identity)
		{
			identity.className=newClass;
		}
	}
	course_id_last_highlighted = id;
}

function check_form_submit()
{
		if (lang == "de")
		{
			return window.confirm("Formular abschicken ?");	
		}
		else if (lang == "en")
		{
			return window.confirm("send data ?");	
		}
}
