// JavaScript Document
<!--
	//alert("asdf");
	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();
	}

	function Lang() {
		if(window.self.location.href.indexOf("/de/") != -1) {
			// deutsch
			return 1;
		}
		else {
			// griechisch
			return 2;
		}
	}
	
	function Go(x,y) {
		if(y == 0) {
			var newlocation = x;
			//alert(newlocation);
			window.self.location.href = newlocation;
		}
		else {
			//var newlocation = "";
			//var before = window.self.location.href;
			//alert("before> " + before);
			//if(window.self.location.href.indexOf("show") != -1) {
				//alert("if" + window.self.location.href.indexOf("show"));
				//newlocation = window.self.location.href.replace(/show=./,"show=" + x);
			//}
			//else {
				//alert("else");
				//newlocation = window.self.location.href + "&show=" + x + "&from=0";
			//}
			var newlocation = "";
			if (Lang() == 1) {
				newlocation = "/de/t_3.php?menu=1&show=" + x + "&from=0";
			}
			else {
				alert("jooojo");
				newlocation = "/gr/t_3.php?menu=1&show=" + x + "&from=0";
			}
			//alert(newlocation);
			window.self.location.href = newlocation;
		}
	}
	
	function Send2Friend(x,y,z) {
		var url = "/send2friend.php?url=" + x + "&title=" + y + "&lg=" + z;		
		var vers=window.open(url,"Sendpage","width=519,height=395,screenX=300,screenY=300,left=300,top=300,resizable=yes,dependent=yes");		
		vers.focus();
	}
	
	function Contact(x) {
		var url = "/contact.php?lg=" + x;		
		var vers=window.open(url,"Contact","width=519,height=395,screenX=300,screenY=300,left=300,top=300,resizable=yes,dependent=yes");		
		vers.focus();
	}
	
	function Sitemap(x) {
		var url = "/sitemap.php?lg=" + x;
		var vers=window.open(url,"Sitemap","width=519,height=395,screenX=300,screenY=300,left=300,top=300,scrollbars=yes,resizable=yes,dependent=yes");		
		vers.focus();
	}
	
	function Search(x) {
		var url = "/search.php?lg=" + x;
		var vers=window.open(url,"Search","width=519,height=395,screenX=300,screenY=300,left=300,top=300,resizable=yes,dependent=yes");		
		vers.focus();
	}
	
	function bild_popup(lg,adresse) {
		var bild_hoehe,bild_breite=0;
		var linti=window.open("","Bild","width=535,height=390,screenX=300,screenY=300,left=300,top=300,resizable=yes,scrollbars,dependent=yes");
		linti.document.open("text/html","replace");
		var anfang=adresse.lastIndexOf("/")+1;
		var ende=adresse.lastIndexOf("_");	
		var titel="Optimierte Ansicht";
		var monitor_breite=screen.availWidth;
		var monitor_hoehe=screen.availHeight;		
		linti.document.write("<html><head><title>"+titel+"</title></head>");
		linti.document.write("<body text=\"#FFFFFF\" link=\"#FFFFFF\" vlink=\"#FFFFFF\" alink=\"#FFFFFF\" bgcolor=\"#FFFFFF\" scroll=\"auto\" style=\"background-repeat: repeat-y\">");
		linti.document.write("<center><a href=\"#\"><img src="+adresse+" name=\"grafik\" border=\"1\" alt=\"Name der Grafik: "+adresse.substring(anfang,adresse.length)+"\"></a></center>");
		linti.document.write("<br><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>");
		linti.document.write("<div align=\"center\"><a href=\"#\"><img src=\"/images/schliessen_button.gif\" border=\"1\" onclick=window.close()></a></div>");
		linti.document.write("</td></tr></table>");
		linti.document.write("</body></html>");
		bild_hoehe=linti.document.images[0].height+120;
		bild_breite=linti.document.images[0].width+50;
		if ((bild_hoehe>monitor_hoehe)||(bild_breite>monitor_breite)) {
			if ((bild_hoehe>monitor_hoehe)&&(bild_breite>monitor_breite)){
				linti.resizeTo (monitor_breite,monitor_hoehe);
				return true;
				}
			if (bild_breite>monitor_breite) linti.resizeTo (monitor_breite,bild_hoehe);
			if (bild_hoehe>monitor_hoehe) linti.resizeTo (bild_breite,monitor_hoehe);
		}
		else {
			linti.resizeTo (bild_breite-15,bild_hoehe-15);
			if (bild_breite-15<380) linti.resizeTo (380,bild_hoehe-15);
			}
		linti.focus();
	}
	
	function addBookmark(url, description, text){
		if (document.styleSheets && document.all) window.external.AddFavorite(url, description)
			else if (document.getElementById && !document.all) alert(text)
			else if (document.all && !document.styleSheets) alert(text)	
	}

	function openPrint(strId){
		printwin = window.open("PrintView.wa?seIDD="+strId,"Druckfenster","width=580,height=550,resizable,left=10,top=10,scrollbars,status");
		printwin.focus();
	}
	
	function MM_preloadImages() { //v3.0
 		var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}	
	
	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
						d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	/*DESCRIPTION: These are general functions to deal with and manipulate
select boxes. Also see the OptionTransfer library to more easily 
handle transferring options between two lists

COMPATABILITY: These are fairly basic functions - they should work on
all browsers that support Javascript.
*/

// -------------------------------------------------------------------
// selectUnselectMatchingOptions(select_object,regex,select/unselect,true/false)
//  This is a general function used by the select functions below, to
//  avoid code duplication
// -------------------------------------------------------------------
function selectUnselectMatchingOptions(obj,regex,which,only) {
	if (window.RegExp) {
		if (which == "select") {
			var selected1=true;
			var selected2=false;
			}
		else if (which == "unselect") {
			var selected1=false;
			var selected2=true;
			}
		else {
			return;
			}
		var re = new RegExp(regex);
		for (var i=0; i<obj.options.length; i++) {
			if (re.test(obj.options[i].text)) {
				obj.options[i].selected = selected1;
				}
			else {
				if (only == true) {
					obj.options[i].selected = selected2;
					}
				}
			}
		}
	}
		
// -------------------------------------------------------------------
// selectMatchingOptions(select_object,regex)
//  This function selects all options that match the regular expression
//  passed in. Currently-selected options will not be changed.
// -------------------------------------------------------------------
function selectMatchingOptions(obj,regex) {
	selectUnselectMatchingOptions(obj,regex,"select",false);
	}
// -------------------------------------------------------------------
// selectOnlyMatchingOptions(select_object,regex)
//  This function selects all options that match the regular expression
//  passed in. Selected options that don't match will be un-selected.
// -------------------------------------------------------------------
function selectOnlyMatchingOptions(obj,regex) {
	selectUnselectMatchingOptions(obj,regex,"select",true);
	}
// -------------------------------------------------------------------
// unSelectMatchingOptions(select_object,regex)
//  This function Unselects all options that match the regular expression
//  passed in. 
// -------------------------------------------------------------------
function unSelectMatchingOptions(obj,regex) {
	selectUnselectMatchingOptions(obj,regex,"unselect",false);
	}
	
// -------------------------------------------------------------------
// sortSelect(select_object)
//   Pass this function a SELECT object and the options will be sorted
//   by their text (display) values
// -------------------------------------------------------------------
function sortSelect(obj) {
	var o = new Array();
	if (obj.options==null) { return; }
	for (var i=0; i<obj.options.length; i++) {
		o[o.length] = new Option( obj.options[i].text, obj.options[i].value, obj.options[i].defaultSelected, obj.options[i].selected) ;
		}
	if (o.length==0) { return; }
	o = o.sort( 
		function(a,b) { 
			if ((a.text+"") < (b.text+"")) { return -1; }
			if ((a.text+"") > (b.text+"")) { return 1; }
			return 0;
			} 
		);

	for (var i=0; i<o.length; i++) {
		obj.options[i] = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);
		}
	}

// -------------------------------------------------------------------
// selectAllOptions(select_object)
//  This function takes a select box and selects all options (in a 
//  multiple select object). This is used when passing values between
//  two select boxes. Select all options in the right box before 
//  submitting the form so the values will be sent to the server.
// -------------------------------------------------------------------
function selectAllOptions(obj) {
	for (var i=0; i<obj.options.length; i++) {
		obj.options[i].selected = true;
		}
	}
	
// -------------------------------------------------------------------
// moveSelectedOptions(select_object,select_object[,autosort(true/false)[,regex]])
//  This function moves options between select boxes. Works best with
//  multi-select boxes to create the common Windows control effect.
//  Passes all selected values from the first object to the second
//  object and re-sorts each box.
//  If a third argument of 'false' is passed, then the lists are not
//  sorted after the move.
//  If a fourth string argument is passed, this will function as a
//  Regular Expression to match against the TEXT or the options. If 
//  the text of an option matches the pattern, it will NOT be moved.
//  It will be treated as an unmoveable option.
//  You can also put this into the <SELECT> object as follows:
//    onDblClick="moveSelectedOptions(this,this.form.target)
//  This way, when the user double-clicks on a value in one box, it
//  will be transferred to the other (in browsers that support the 
//  onDblClick() event handler).
// -------------------------------------------------------------------
function moveSelectedOptions(from,to) {
	// Unselect matching options, if required
	if (arguments.length>3) {
		var regex = arguments[3];
		if (regex != "") {
			unSelectMatchingOptions(from,regex);
			}
		}
	// Move them over
	for (var i=0; i<from.options.length; i++) {
		var o = from.options[i];
		if (o.selected) {
			to.options[to.options.length] = new Option( o.text, o.value, false, false);
			}
		}
	// Delete them from original
	for (var i=(from.options.length-1); i>=0; i--) {
		var o = from.options[i];
		if (o.selected) {
			from.options[i] = null;
			}
		}
	if ((arguments.length<3) || (arguments[2]==true)) {
		sortSelect(from);
		sortSelect(to);
		}
	from.selectedIndex = -1;
	to.selectedIndex = -1;
	}	
			
	
	// -------------------------------------------------------------------
	// swapOptions(select_object,option1,option2)
	//  Swap positions of two options in a select list
	// -------------------------------------------------------------------
	function swapOptions(obj,i,j) {
		var o = obj.options;
		var i_selected = o[i].selected;
		var j_selected = o[j].selected;
		var temp = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);
		var temp2= new Option(o[j].text, o[j].value, o[j].defaultSelected, o[j].selected);
		o[i] = temp2;
		o[j] = temp;
		o[i].selected = j_selected;
		o[j].selected = i_selected;
		}
		
	// -------------------------------------------------------------------
	// moveOptionUp(select_object)
	//  Move selected option in a select list up one
	// -------------------------------------------------------------------
	function moveOptionUp(obj) {
		//alert("up");
		for (i=0; i<obj.options.length; i++) {
			if (obj.options[i].selected) {
				if (i != 0 && !obj.options[i-1].selected) {
					swapOptions(obj,i,i-1);
					obj.options[i-1].selected = true;
					}
				}
			}
		}
	
	// -------------------------------------------------------------------
	// moveOptionDown(select_object)
	//  Move selected option in a select list down one
	// -------------------------------------------------------------------
	function moveOptionDown(obj) {
		//alert("down");
		for (i=obj.options.length-1; i>=0; i--) {
			if (obj.options[i].selected) {
				if (i != (obj.options.length-1) && ! obj.options[i+1].selected) {
					swapOptions(obj,i,i+1);
					obj.options[i+1].selected = true;
					}
				}
			}
		}
		
	function selectAllItems(obj) {
		for (var i=0; i<obj.options.length; i++) {
			obj.options[i].selected = true;			
		}	
	}

//-->