// JavaScript Document

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_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_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];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


//Funktion für Bildergalerie
function openPictureWindow_Fever(imageName) {
	newWindow = window.open("","newWindow","width=400,height=400,left='300',top='300'");
	newWindow.document.open();
	newWindow.document.write('<html><title>Jugendreise.de</title><body leftmargin="0" topmargin="0" marginheight="5" marginwidth="10" onLoad="window.resizeTo((document.loaded_image.width+30),(document.loaded_image.height+50))" onBlur="self.close()">');
	newWindow.document.write('<center>');
	newWindow.document.write('<img src='+imageName+' name=loaded_image><br>'); 
	newWindow.document.write('<A href="javascript://" onClick="self.close();">Fenster schliessen</a></center>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
//------------------------------------


function image_open(image_location,ID)
                                {
                                  page="<html><style>body{margin:0px 0px 0px 0px}</style><title></title><body onLoad='self.focus()'><a href='javascript:self.close()'><center>";
                                  page+="<img src='"+ image_location +"' border='0' name='loaded_image' alt='Klicken um zu Schliessen' onLoad='window.resizeTo((document.loaded_image.width+10),(document.loaded_image.height+25))'>";
                                  page+="</center></a></body></html>";
                                  popupImage = window.open('','_blank','width=600,height=518,toolbar=no,scrollbars=no');
                                  popupImage.document.open();
                                  popupImage.document.write(page);

                                  popupImage.document.close();
}

// Funktion zum Unterbinden von Mehrfachausfuehrungen

//onsubmit="if (checkForm('feedbackform',new Array('bemerkung'))) { track_submit_feedback();return only_once(this)

var only_once_list = new Array();

function only_once(obj) {
	if(only_once_list[obj.name] == 1) {
		return true;
	}
	if(obj.href) {
		obj.disabled;
		if(obj.style) {
			obj.style.color = "#999999";
			obj.style.textDecoration = "none";
			obj.style.cursor = 'wait';
		}
		return true;
	}
	for(var i = 0; ; i++) {
		if(!obj[i]) { break; }
		if(obj[i].type != 'button' && obj[i].type != 'submit') { continue; }
		if(obj[i].name == 'execonce') {
			obj[i].disabled;
			if(obj[i].style) {
				obj[i].style.backgroundColor = "#CCCCCC";
				obj[i].style.color = "#999999";
				obj[i].style.border = "solid #999999 1px";
			}
		}
	}
	only_once_list[obj.name] = 1;
	return true;
}

function statusline(text)
  {
  window.status = text;
  return true;
  }
//title=" statustext here"
//onmouseover="return Caption(this.title);"
//onmouseout="return Caption(document.title);"
  
  
//google things
//function funk(){location.href="javascript:location.replace('http://www.urlauba.de?kwdef=jugendreise_spanien_balearen_guenstig')"}
//window.setTimeout("funk()",100);

