<!--
var remWin = 0;
var infoWin = new Array(10);
var iWin = 2;

function newWin(load) 
{       
	if ( remWin != 0)
	{
		if (infoWin[remWin].closed == false)
		{
			infoWin[remWin].close();
		}
	}

	infoWin[iWin] = window.open(load, iWin, "width=524,height=600,resizable=no,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,location=no,left=50,top=0")

	remWin = iWin;

	if (iWin < 7) iWin++;
	else iWin = 1;
}
/*
function File ( vars)
{       
	var url = "../addfile/file.php?" + vars;
	openPopupWin ( url, 250 );
}
*/
function File(vars)
{       
	if (document.frm.save_html.value == 1)
		save_all_HTML();

	openPopupWin("../pages/empty.php", 250);

	document.frm.action = "../addfile/file.php?" + vars;
	document.frm.target = "popup";
	document.frm.submit();
}

function FileDelete(action, filedel)
{
	if (document.frm.save_html.value == 1)
		save_all_HTML();

	document.frm.action = action + "?filedel=" + filedel;
	document.frm.submit();
}

function openPopupWin( url, height )
{
        var name = "popup";
        var my_x = screen.availWidth/2-200;
        var my_y = screen.availHeight/2-220;
        var fenster = "width=400,height=" + height + ",left="+my_x+", top="+my_y+",resizable=no,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,location=no";

        w = open(url, name, fenster);

	w.focus();        
}

function setState(type)
{
	var name_country = "aip[country_" + type + "]";	
	//var element_country = document.getElementById(name_country);	
	var element_country = document.alumni[name_country];	

	var name = "l_state_" + type + "_"; 
	switch(element_country.value)
	{
	case 'Germany':
		hideElement ( name + "usa" );
		hideElement ( name + "other" );
		showElement ( name + "germany" );
		break;

	case 'United States':
		hideElement ( name + "germany" );
		hideElement ( name + "other" );
		showElement ( name + "usa" );
		break;

	default:
		hideElement ( name + "germany" );
		hideElement ( name + "usa" );
		showElement ( name + "other" );
	}
}

function hideElement ( name )
{
	var element = document.getElementById ( name );	
	element.style.display = "none";
}

function showElement ( name )
{
	var element = document.getElementById ( name );	
	element.style.display = "block";
}

function getState(type)
{
	var name_country = "aip[country_" + type + "]";	
	var element_country = document.getElementById ( name_country );	

	var key;
	switch ( element_country.value )
	{
	case 'Germany':
		key = 'germany';
		break;

	case 'United States':
		key = 'usa';
		break;

	default:
		key = 'other';
	}

	var name = "aip[state_" + type + "_" + key + "]";
	var element_state = document.getElementById ( name );	
	return element_state.value;
}

function GoTo ( task )
{
	if ( document.frm.save_html.value == 1 )
		saveHTML();

	switch ( task ) 
	{
	case 'save':		
		if ( checkForm ( ) )
		{
			document.frm.action = "save_page.php";
			document.frm.target = 'content';
			document.frm.submit();
		}		
		break;
	}
}

function UpdateMenu(params)
{
	window.open('../home/menu.php?um=1'+params,'menu');
}

			function open_window(url) {
				mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,screenx=0,screeny=0,width=800,height=570');
				mywin.focus();
			}
			
			function open_team(url) {
				mywin = window.open(url,"bild",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,screenx=360,screeny=20,width=350,height=290');
				mywin.focus();
			}
			
			function open_bild(url) {
				mywin = window.open(url,"bild",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,screenx=360,screeny=20,width=340,height=390');
				mywin.focus();
			}
			
			function open_modell(url) {
				mywin = window.open(url,"bild",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,screenx=360,screeny=20,width=380,height=375');
				mywin.focus();
			}
			
			function MM_reloadPage(init) {  //reloads the window if Nav4 resized
				if (init==true) with (navigator) {
			  		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			    		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
					}
				}
			  	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
			}
			
			MM_reloadPage(true);
//-->
