var context = "";
var idxSlide = 0; 
var duration = 3000;
var s = document.URL;
var context = '';
// all used by some pages
function fensterzu () { window.close();};
function navi1in(){};
function navi1out(){};
function navi2in(){};
function navi2out(){};
function navi3in(aTable) { };
function navi3out(aTable) { };
// simple form check
function checkFormdata(f){
	var messageText = '';
	if (f.surname.value == "") {
	   messageText= f.surname.title+'\n'
	   alert(messageText);
	   f.surname.focus();
	   return false;
	}
	if (f.email.value == "") {
	   messageText= f.email.title+'\n'
	   f.email.focus();
	   alert(messageText);
	   return false;
	}else{
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(f.email.value)){
			// YES! Correct email address
		}else{
		   // Incorrect email address	
		   messageText= f.email.title+'\n'
		   f.email.focus();
		   alert(messageText);
		   return false;
		}
	}
	if (f.country.value == "") {
	   messageText= f.country.title+'\n'
	   f.country.focus();
	   alert(messageText);
	   return false;
	}
	if (f.country.message == "") {
	   messageText= f.message.title+'\n'
	   f.message.focus();
	   alert(messageText);
	   return false;
	}
	return true;
};
// slide show
function slideShow() { 	
	if(arrSlide){
		idxSlide++; 
		if(idxSlide  >= arrSlide.length) { idxSlide = 0; } 
		imgslide.src = arrSlide[idxSlide]; 
		window.setTimeout("slide()",duration); 
	}
};

// opens a standard popup with the passed html file
function openstandardpopup(aLink){
	width = 800;
	height = 500;
	mycontext = ""; 
	if(aLink.match(/\.jsp$/)) { mycontext = context; }	
	window.open(mycontext + aLink, 'wndStandard', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,');
};
	
// opens an image popup with the passed html file
function openimagepopup(aLink){
	width = 684;
	height = 433;
	window.open(context + aLink, 'wndImage', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,');
};
	
// opens a glossar popup for the passed letter. file will be computed from lang and letter
function openglossarpopup(aletter, anAnchor){
	if(!anAnchor) { anAnchor = ""; }
	width = 800;
	height = 433;
	aLink = context + "/dynamicspace/" + lang + "/glossar/" + aletter + "_popup.jsp#" + anAnchor;
	window.open(aLink, 'wndGlossar', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,');
};

// old function
function openglossar(aletter) {
	openglossarpopup(aletter);
};	
// opens a media popup with the passed html file
function openmediapopup(aLink) {
	width = 490;
	height = 395;
	window.open(context + aLink, 'wndMedia', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,');
	//alert("Mediapage '" + aLink + "' would be opened now");
};
function VideoPlayer(movieUrl){
  document.write('<object id="VideoPlayer" width="384" height="288" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95">\n');
  document.write('<param name="FileName" value="'+movieUrl+'" />\n');
  document.write('<param name="AutoStart" value="true" />\n');
  document.write('<param name="ShowControls" value="true" />\n');
  document.write('<param name="Loop" value="false" />\n');
  document.write('</object>\n');
};
	