function draw2012(zanox_tracking_dll,zanox_tracking_param) {
	var form_action = "_";
	var zanox = zanox_tracking_dll + '?' + zanox_tracking_param + '=';
document.writeln('<SCRIPT language=JavaScript>');
document.writeln('rightnow = new Date();');
document.writeln('function month(i,name) {');
document.writeln('var thisyear = rightnow.getFullYear();');
document.writeln('var nextyear = thisyear + 1;');
document.writeln('var a = \"<option value=\\\"\";');
document.writeln('(i<rightnow.getMonth()) ? a +=nextyear : a +=thisyear;');
document.writeln('(i<9) ? a += \"0\"+(i+1) : a +=(i+1);');
document.writeln('a += \"\\\">\"+name+\"</option>\\n\";');
document.writeln('this.option = a;');
document.writeln('}');
document.writeln('months = new Array(new month(0,\"Jan\"), new month(1,\"Feb\"),new month(2,\"Mär\"),new month(3,\"Apr\"),new month(4,\"Mai\"), new month(5,\"Jun\"), new month(6,\"Jul\"), new month(7,\"Aug\"), new month(8,\"Sep\"), new month(9,\"Okt\"), new month(10,\"Nov\"), new month(11,\"Dez\"));');
document.writeln('');
document.writeln('function opodoSetDate2012() {');
document.writeln('	tomorrow = new Date(rightnow.getTime()+(86400000));');
document.writeln('	document.flightSearch2012.D_Day.selectedIndex = tomorrow.getDate()-1;');
document.writeln('	document.flightSearch2012.D_Month.selectedIndex = tomorrow.getMonth();');
document.writeln('	then = new Date(tomorrow.getTime()+(604800000))');
document.writeln('	document.flightSearch2012.R_Day.selectedIndex = then.getDate()-1;');
document.writeln('	document.flightSearch2012.R_Month.selectedIndex = then.getMonth();');
document.writeln('}');
document.writeln('');
document.writeln('function opodoIsLeapYear(year){');
document.writeln('	((((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))) ? true : false;');
document.writeln('}');
document.writeln('');
document.writeln('function opodoValidMonthDay(dayVal, monthVal, yearVal){');
document.writeln('	var error = 0;');
document.writeln('	if ((monthVal.substr(4,2) == 4)||(monthVal.substr(4,2) == 6)||(monthVal.substr(4,2) == 9)||(monthVal.substr(4,2) == 11)){');
document.writeln('		if (dayVal>30) error = 1;');
document.writeln('	}');
document.writeln('	else if (monthVal.substr(4,2) == 2){');
document.writeln('		 		if (opodoIsLeapYear(yearVal)){');
document.writeln('				    if (dayVal>29) error = 1;');
document.writeln('				} else if (dayVal>29) error = 1;');
document.writeln('	}');
document.writeln('	return (error == 1) ? false : true;');
document.writeln('}');
document.writeln('');
document.writeln('function opodoCreateDate(day, monthYear) {');
document.writeln('	dayVal = day.options[day.selectedIndex].value;');
document.writeln('	monthYearVal = monthYear.options[monthYear.selectedIndex].value;');
document.writeln('	x = dayVal.substr(0,1);');
document.writeln('	(x == \"0\") ? day = parseInt(dayVal.substr(1,1)) : day = parseInt(dayVal.substr(0,2));');
document.writeln('	y = monthYearVal.substr(4,1);');
document.writeln('	(y == \"0\") ? month = parseInt(monthYearVal.substr(5,1)) : month = parseInt(monthYearVal.substr(4,2));');
document.writeln('	year = parseInt(monthYearVal.substr(0,4));');
document.writeln('	if (year < 1900) year = year + 1900;');
document.writeln('	date = new Date(year, month-1, day);');
document.writeln('	return date;');
document.writeln('}');
document.writeln('function opodoValidReturnDate(formName, elementArray) {');
document.writeln('	firstDayField = eval(\'document.\' + formName + \'.\'  + elementArray[0]);');
document.writeln('	firstMonthField = eval(\'document.\' + formName + \'.\'  + elementArray[1]);');
document.writeln('	secondDayField = eval(\'document.\' + formName + \'.\'  + elementArray[2]);');
document.writeln('	secondMonthField = eval(\'document.\' + formName + \'.\'  + elementArray[3]);');
document.writeln('	firstDay = eval(\'document.\' + formName + \'.\'  + elementArray[0] + \".options[\" + \'document.\' + formName + \'.\' + elementArray[0] + \'.selectedIndex].value\');');
document.writeln('	firstMonth = eval(\'document.\' + formName + \'.\'  + elementArray[1] + \".options[\" + \'document.\' + formName + \'.\' + elementArray[1] + \'.selectedIndex].value\');');
document.writeln('	firstYear = firstMonth.substr(0,4);');
document.writeln('	secondDay = eval(\'document.\' + formName + \'.\'  + elementArray[2] + \".options[\" + \'document.\' + formName + \'.\' + elementArray[2] + \'.selectedIndex].value\');');
document.writeln('	secondMonth = eval(\'document.\' + formName + \'.\'  + elementArray[3] + \".options[\" + \'document.\' + formName + \'.\' + elementArray[3] + \'.selectedIndex].value\');');
document.writeln('	secondYear = secondMonth.substr(0,4);');
document.writeln('	if ((opodoValidMonthDay(firstDay, firstMonth, firstYear))&& (opodoValidMonthDay(secondDay, secondMonth, secondYear))){');
document.writeln('		opodoCreateDate(firstDayField, firstMonthField);');
document.writeln('		outboundDate = date;');
document.writeln('		opodoCreateDate(secondDayField, secondMonthField);');
document.writeln('		returnDate = date;');
document.writeln('		return (outboundDate.valueOf() <= returnDate.valueOf() && (outboundDate.valueOf() >= rightnow.valueOf())) ? true : false;');
document.writeln('	} else {return false;}');
document.writeln('}');
document.writeln('');
document.writeln('function opodoFlightSearchSubmit2012(buttonValue)');
document.writeln('{');
document.writeln('  document.flightSearch2012.whereTo.value = buttonValue;');
document.writeln('  document.flightSearch2012.BE_QUICK_SEARCH_FLAG.value = true;');
document.writeln('  var datesArray= new Array(\'D_Day\', \'D_Month\', \'R_Day\', \'R_Month\');');
document.writeln('  var formN = \'flightSearch2012\';');
document.writeln('');
document.writeln('  if (document.flightSearch2012.A_City.value.length > 0) {');
document.writeln('    if (opodoValidReturnDate(formN, datesArray)) {');
document.writeln('  		return true;');
document.writeln('    } else {');
document.writeln('	  	alert(\"Sie haben ein ungültiges Datum angegeben. Bitte prüfen Sie Ihre Angaben\");');
document.writeln('		return false;');
document.writeln('    }');
document.writeln('  } else {');
document.writeln('    alert(\"Geben Sie bitte einen Ankunftsort ein, und versuchen Sie es erneut\");');
document.writeln('    return false;');
document.writeln('  }');
document.writeln('}');
document.writeln('');
document.writeln('</SCRIPT>');
document.writeln('	<table width=\"200\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"background-color:#FF3300;\">');
if (zanox_tracking_dll){
     document.writeln('<form name=\"flightSearch2012\" onSubmit=\"return opodoFlightSearchSubmit2012();\" action=\"' + zanox_tracking_dll + '\" method=\"GET\" target=\"_blank\">');
	 document.writeln('<input type=\"hidden\" name=\"' + zanox_tracking_param + '\" value=\"' + form_action + '\">');
} else {
	document.writeln('<form name=\"flightSearch2012\" onSubmit=\"return opodoFlightSearchSubmit2012();\" action=\"' + form_action + '\" method=\"GET\" target=\"_blank\">');
}
document.writeln('	<input type=\"HIDDEN\" NAME=\"Locale\" value=\"de\">');
document.writeln('	<input type=\"HIDDEN\" NAME=\"searchType\" value=\"flight\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"performFlightSearch\"  value=\"TRUE\">');
document.writeln('	<input type=\"hidden\" name= \"BE_QUICK_SEARCH_FLAG\" value=FALSE>');
document.writeln('	<input type=\"HIDDEN\" NAME= \"BE_AIR_IS_FROM_SAVED\"  value=\"TRUE\">');
document.writeln('	<input type=\"hidden\" name= \"HP_QUICKSEARCH_USED\" value=\"TRUE\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"whereTo\" value=\"\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"D_Time\"  value= \"ANY\" >');
document.writeln('	<input type=\"HIDDEN\" NAME= \"BE_AIR_R_Time\"  value= \"ANY\" >');
document.writeln('	<input type=\"HIDDEN\" NAME= \"SEARCH_BY\"  value=\"2\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"_TripType\" value=\"2\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"ClassOfService\"  value=\"E\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"Destination#1_DIRECT_NON_STOP\"  value=\"N\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"Destination%231_Airline%231\"  value=\"\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"Destination%231_Airline%232\"  value=\"\">');
document.writeln('  	<input type=\"HIDDEN\" name= \"Destination%231_Airline%233\"  value=\"\">');
document.writeln('  	<input type=\"HIDDEN\" NAME= \"ARRANGE_BY\" value=\"2\">');
document.writeln('	<input type=\"HIDDEN\" NAME= \"availSubmit\" value=\"*\">');
document.writeln('    <input type=\"HIDDEN\" name= \"availSearchSubmit\" value=\"*\">');
document.writeln('	<input type=\"hidden\" NAME= \"ParamSet\" value=\"1\">');
document.writeln('	<input type=\"hidden\" NAME= \"Prepop\" value=\"N\">');
document.writeln('	<input type=\"hidden\" NAME= \"BE_AIR_NUM_OF_ADULTS\" value=\"1\">');
document.writeln('	<input type=\"hidden\" NAME= \"CMP\" value=\"de-zx-fl-110009\">');
document.writeln('	');
document.writeln('		<tr> ');
document.writeln('			<td colspan=\"3\" valign=\"top\"><a href=\"' + zanox + 'http://www.opodo.de/otpbvpl/Booking/Page/BE_FlightSearch.jsp?de-zx-fl-110009\" target=\"_blank\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/l_opodo_gr.gif\" width=\"200\" height=\"55\" border=\"0\"></a></td>');
document.writeln('		</tr>');
document.writeln('		<tr> ');
document.writeln('			<td width=\"10\" style=\"background-color:#FFFFFF;\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"10\" height=\"16\"></td>');
document.writeln('			<td width=\"178\" style=\"background-color:#FFFFFF;\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/h_flug.gif\" width=\"178\" height=\"16\"></td>');
document.writeln('			<td width=\"12\" style=\"background-color:#FFFFFF;\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"10\" height=\"10\"></td>');
document.writeln('		</tr>');
document.writeln('		<tr> ');
document.writeln('			<td rowspan=\"3\" valign=\"top\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_border_left_kl.gif\" width=\"10\" height=\"129\"></td>');
document.writeln('			<td><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"10\" height=\"9\"></td>');
document.writeln('			<td rowspan=\"3\" valign=\"top\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_border_right_kl.gif\" width=\"12\" height=\"129\"></td>');
document.writeln('		</tr>');
document.writeln('		<tr> ');
document.writeln('			<td height=\"110\"> <table width=\"178\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">');
document.writeln('					<tr> ');
document.writeln('						<td align=\"right\" height=\"16\" style=\"font:10px Verdana, Arial; color:#FFFFFF;\">Von</td>');
document.writeln('						<td colspan=\"3\" align=\"right\"><input style=\"width:98px; height:17px; font:10px Verdana, Arial; color:#000000;\" name=\"D_City\"></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td width=\"77\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"77\" height=\"4\"></td>');
document.writeln('						<td width=\"30\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"30\" height=\"4\"></td>');
document.writeln('						<td width=\"14\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"14\" height=\"4\"></td>');
document.writeln('						<td width=\"57\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"57\" height=\"4\"></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td height=\"16\" align=\"right\" style=\"font:10px Verdana, Arial; color:#FFFFFF;\">Nach</td>');
document.writeln('						<td colspan=\"3\" align=\"right\"><input style=\"width:98px; height:17px; font:10px Verdana, Arial; color:#000000;\" name=\"A_City\"></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td colspan=\"4\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"10\" height=\"5\"></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td height=\"16\" align=\"right\" style=\"font:10px Verdana, Arial; color:#FFFFFF;\">Hinflug</td>');
document.writeln('						<td colspan=\"2\" align=\"right\"><select style=\"width:42px; height:16px; font:10px Verdana, Arial; color:#000000;\" name= \"D_Day\" >');
document.writeln('			  <script language=\"JavaScript\">');
document.writeln('				for (d=1;d<32;d++) document.write(\"<option value=\\\"\"+((d<10)?\"0\"+d:d)+\"\\\">\"+((d<10)?\"0\"+d:d)+\"</option>\");</script></select></td>');
document.writeln('						<td align=\"right\"><select style=\"width:52px; height:16px; font:10px Verdana, Arial; color:#000000;\" name= \"D_Month\" >');
document.writeln('			  <SCRIPT language=\"JavaScript\">');
document.writeln('			  for(i=0;i<12;i++) document.write(months[i].option);');
document.writeln('			  </SCRIPT></select></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td colspan=\"4\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"10\" height=\"4\"></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td height=\"16\" align=\"right\" style=\"font:10px Verdana, Arial; color:#FFFFFF;\">R&uuml;ckflug</td>');
document.writeln('						<td colspan=\"2\" align=\"right\"><select style=\"width:42px; height:16px; font:10px Verdana, Arial; color:#000000;\" name= \"R_Day\" >');
document.writeln('                <script language=\"JavaScript\">');
document.writeln('				for (d=1;d<32;d++) document.write(\"<option value=\\\"\"+((d<10)?\"0\"+d:d)+\"\\\">\"+((d<10)?\"0\"+d:d)+\"</option>\");');
document.writeln('				</script></select></td>');
document.writeln('						<td align=\"right\"><select style=\"width:52px; height:16px; font:10px Verdana, Arial; color:#000000;\" name= \"R_Month\" >');
document.writeln('                <SCRIPT language=\"JavaScript\">');
document.writeln('			  for(i=0;i<12;i++) document.write(months[i].option);');
document.writeln('			  </SCRIPT></select></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td colspan=\"4\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_no.gif\" width=\"10\" height=\"4\"></td>');
document.writeln('					</tr>');
document.writeln('					<tr> ');
document.writeln('						<td height=\"17\" colspan=\"2\" valign=\"bottom\"><a href=\"' + zanox + 'http://www.opodo.de/otpbvpl/Booking/Page/BE_FlightSearch.jsp?CMP=de-zx-fl-110009\" target=\"_blank\" style=\"font:10px Verdana, Arial; color:#FFFFFF;\">Erweiterte Suche</a></td>');
document.writeln('						<td colspan=\"2\" align=\"right\"><input type=image src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/b_suchen.gif\" border=0 name=\"Submit\" value=\"Submit\" width=\"67\" height=\"17\"></td>');
document.writeln('					</tr>');
document.writeln('				</table></td>');
document.writeln('		</tr>');
document.writeln('		<tr> ');
document.writeln('			<td valign=\"top\"><img src=\"http://images.opodo.com/affiliates/de/de_qs_aff_2012_200x200/img/i_border_bottom.gif\" width=\"178\" height=\"10\"></td>');
document.writeln('		</tr></form>');
document.writeln('	</table>');
document.writeln('<script language=\"JavaScript\" type=\"text/javascript\">');
document.writeln('opodoSetDate2012();');
document.writeln('</script>');
}

