Bestil fly og hotel i Barcelona

Test handheldteaser

<?php
$sitename = get_sitename(); // get_sitename() bor i fdm_theme-modulet
$siteinfo = get_siteinfo($sitename); // get_siteinfo() bor i fdm_theme-modulet
?>

<!-- temporary static booking element -->
<div style="border-style:solid;border-width:5px;border-color:#555555;margin-top:20px">

<div style="padding-left:14px;padding-top:15px;background-color:#EEEEEE" id="bookingform">
<form accept-charset="UTF-8" action="http://book.<?php print $siteinfo->field_sitetitle[0]['value']; ?>/soeg.aspx" method="get" name="fdmform" onsubmit="javascript:return adjustFields()" onClick="javascript: pageTracker._trackPageview('/ext/book/fra-soegeboxen');">

<input type="hidden" class="hidden" name="channel" value="www" />
<input type="hidden" class="hidden" name="searchtype" value="0" />
<input type="hidden" class="hidden" name="rooms" />
<input type="hidden" class="hidden" name="partnerid" value="<?php print $siteinfo->field_partnerid[0]['value']; ?>" />
<input type="hidden" class="hidden" name="partnersite" value="<?php print $siteinfo->field_partnersite[0]['value']; ?>" />
<input type="hidden" class="hidden" name="continue" value="1" />
<input type="hidden" class="hidden" name="children" />
<input type="hidden" class="hidden" name="departuredate" />
<input type="hidden" class="hidden" name="returndate" />

<div style="font-size:18px;padding-bottom:30px">
<label for="departurecity" class="departurecity">Fra</label>
<select style="font-size:16px;width:160px;padding:2px" "name="departurecity" id="departurecity" class="departurecity">
<option value="BLL">Billund</option>
<option value="KRP">Karup</option>
<option selected="selected" value="CPH">K&#248;benhavn</option>
<option value="RNN">R&#248;nne</option>
<option value="SGD">S&#248;nderborg</option>
<option value="AAL">Aalborg</option>
<option value="AAR">&#197;rhus</option>
<option value="HAM">Hamburg</option>
</select>

<label style="padding-left:10px" for="arriveat" class="arriveat">Til</label>
<input style="font-size:16px;width:160px;padding:2px" name="arriveat" id="arriveat" class="arriveat" type="text" value="<?php print $siteinfo->field_arriveat[0]['value']; ?>"/>
</div>
<div style="padding-bottom:8px;font-size:16px" class="form-row clearfix departuredate">
<label style="padding-right:17px;padding-left:37px" for="departuredateDD" class="departuredateDD">Udrejse <img class="" src="<?php print '/' . path_to_theme() . '/' . $sitename . '/'; ?>images/gx_icon_departureplane.gif" alt="Udrejse" /></label>
<select style="font-size:16px;width:60px;padding:2px" name="departuredateDD" id="departuredateDD" class="departuredateDD number"><option></option></select>
<select style="font-size:16px;padding:2px" name="departuredateMM" id="departuredateMM" class="departuredateMM month"><option></option></select>
</div>
<div style="padding-bottom:30px;font-size:16px" class="form-row clearfix returndate">
<label style="padding-left:37px" for="returndateDD" class="returndateDD">Hjemrejse <img class="" src="<?php print '/' . path_to_theme() . '/' . $sitename . '/'; ?>images/gx_icon_returnplane.gif" alt="Hjemrejse" /></label>
<select style="font-size:16px;width:60px;padding:2px" name="returndateDD" id="returndateDD" class="returndateDD number"><option></option></select>
<select style="font-size:16px;padding:2px" name="returndateMM" id="returndateMM" class="returndateMM month"><option></option></select>
</div>
<div style="padding-bottom:4px;font-size:16px" class="form-row clearfix adultsCount">
<label style="padding-right:5px" for="adults" class="adults">Antal voksne</label>
<select style="font-size:16px;width:60px;padding:2px" name="adults" id="adults" class="adults number">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<!-- </div>
<div style="padding-bottom:30px" class="form-row clearfix childrenCount">-->
<label style="font-size:16px;padding-left:10px" for="children2" class="children2">B&oslash;rn (0-17)</label>
<select style="font-size:16px;width:60px;padding:2px" name="children2" class="children2 number" onchange="javascript:showChildren()">
<option value="0">-</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
<div style="display:none;padding-bottom:4px" class="form-row clearfix childrensAge" id="childAge">
<label style="font-size:16px" class="childAge" for="childAge">B&oslash;rnenes alder</label>
<input style="font-size:16px;width:30px;padding:2px;margin-bottom:4px" name="text" id="child1" type="text" class="childAge" />
<input style="font-size:16px;width:30px;padding:2px;margin-bottom:4px" name="text" id="child2" type="text" class="childAge" />
<input style="font-size:16px;width:30px;padding:2px;margin-bottom:4px" name="text" id="child3" type="text" class="childAge" />
<input style="font-size:16px;width:30px;padding:2px;margin-bottom:4px" name="text" id="child4" type="text" class="childAge" />
</div>
<div style="text-align:right;padding-right:20px;padding-top:10px;padding-bottom:10px" class="form-row clearfix submitButtons">
<input name="submit" type="image" class="button" id="booking-knap" title="Klik og find en billig rejse" src="<?php print '/' . path_to_theme() . '/' . $sitename . '/'; ?>images/gx_btn_findtrip.gif" />
</div>

</form>
<script type="text/javascript">
var ff=document.forms["fdmform"];
var childrenFields=document.getElementById("childAge").getElementsByTagName("input");
var months=new Array("januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december");
function ddprep(n) {
return (n<10?"0"+n:""+n);
}
function fillDates(elDD,elMM, d2) {
var selDate=new Date();
selDate.setDate(selDate.getDate()+d2);
for (var i=0;i<31;i++) {
var date=ddprep(i+1);
elDD.options[i]=new Option(date,date);
}
elDD.options[selDate.getDate()-1].selected=true;
var d=new Date();
d.setDate(1);
for (var i=0;i<12;i++) {
var mm=ddprep(d.getMonth()+1);
var yyyy=d.getFullYear();
elMM.options[i]=new Option(months[mm-1],yyyy+mm);

if (d.getMonth()==selDate.getMonth()) {
elMM.options[i].selected=true;
}
d.setMonth(d.getMonth()+1);
}
}

fillDates(document.forms["fdmform"].departuredateDD,document.forms["fdmform"].departuredateMM,7);
fillDates(document.forms["fdmform"].returndateDD,document.forms["fdmform"].returndateMM,9);

function adjustFields()

{

if (ff.children2.options[ff.children2.selectedIndex].value>0) {
var newvalue=ff.children2.options[ff.children2.selectedIndex].value;
for (var i=0;i<ff.children2.options[ff.children2.selectedIndex].value;i++) {
newvalue += ","+childrenFields[i].value;
}
ff.children.value=newvalue;
} else {
ff.children.value=0;
}
ff.departuredate.value=ff.departuredateMM.value+ff.departuredateDD.value;
ff.returndate.value=ff.returndateMM.value+ff.returndateDD.value;
ff.rooms.value=Math.round(ff.adults.value/2+0.1);
return validate();
}
function validate() {
chBack(ff.departuredateDD);chBack(ff.departuredateMM);chBack(ff.returndateDD);chBack(ff.returndateMM);chBack(ff.arriveat);chBack(ff.children2);
var msg="";
var ok=true;
if (ff.arriveat.value=="") {
msg += "Flyv til skal udfyldesn";
changeCol(ff.arriveat);
ok=false;
}
if (new Number(ff.departuredate.value)>new Number(ff.returndate.value)) {
msg += "Afrejsedato skal være før hjemkomstdaton";
changeCol(ff.departuredateDD);
changeCol(ff.departuredateMM);
changeCol(ff.returndateDD);
changeCol(ff.returndateMM);
ok=false;
}

var check2=false;
for (var j=0;j<ff.children2.value;j++) {
var el=childrenFields[j];
if (el.value.match("^([0-9]|1[0-8])$")!=null) chBack(el);
else {
changeCol(el);
check2=true;
}
}

if (check2) {
msg += "Børnenes alder skal være mellem 0 og 18 år";
ok=false;
}
if (!ok) {
alert(msg);
}
return ok;
}
function changeCol(el) {
el.style.backgroundColor="#F8CF9F";
}
function chBack(el) {
el.style.backgroundColor="";
}
function showChildren() {
for (var i=0;i<childrenFields.length;i++) {
if (i>ff.children2.options[ff.children2.selectedIndex].value-1) {
childrenFields[i].value="";
childrenFields[i].style.display="none";
} else {
childrenFields[i].style.display="block";
}
}
if (ff.children2.options[ff.children2.selectedIndex].value>0) {
document.getElementById("childAge").style.display="block";
} else {
document.getElementById("childAge").style.display="none";
}
}
</script>
</div>
<div class="clearfix"> </div>

<!-- /booking-form -->
</div></div> <text align="left">
<p>
<?php print $siteinfo->field_sitetitle[0]['value']; ?> er din ekspert på rejser til <?php print $siteinfo->field_destination[0]['value']; ?>. Vi gør det let og billigt for dig at rejse til <?php print $siteinfo->field_destination[0]['value']; ?>, da vi tilbyder et stort udvalg af billige fly og lækre hoteller.
</p>
<ul>
<li class="tick">Overblik over alle fly til <?php print $siteinfo->field_destination[0]['value']; ?> fra Danmark</li>
<li class="tick">Centrale hoteller fra budget til luksus</li>
<li class="tick">Billige totalpriser uden skjulte gebyrer</li>
<li class="tick">Professionel kundeservice</li>
</ul>
<p>
Brug søgebanneret ovenfor og se hvor billigt, du kan rejse til <?php print $siteinfo->field_destination[0]['value']; ?>!
</p>