(function() {
var jQuery = null;
var jCorner = null;
if (!jQuery || window.jQuery.fn.jquery < '1.4.2') {
var script_tag = document.createElement ('script');
script_tag.setAttribute ("type","text/javascript");
script_tag.setAttribute ("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
script_tag.onload = loadJQueryCorner;
script_tag.onreadystatechange = function () { // Same thing but for IE
if (this.readyState == 'complete' || this.readyState == 'loaded') {
loadJQueryCorner();
}
};
// Try to find the head, otherwise default to the documentElement
(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
} else {
// The jQuery version on the window is the one we want to use
jQuery = window.jQuery;
loadJQueryCorner();
}
function loadJQueryCorner()
{
if (!jCorner) {
var script_tag = document.createElement ('script');
script_tag.setAttribute ("type","text/javascript");
script_tag.setAttribute ("src", "http://www.tourradar.com/include/js/jquery-corner.js");
script_tag.onload = scriptLoadHandler;
script_tag.onreadystatechange = function () { // Same thing but for IE
if (this.readyState == 'complete' || this.readyState == 'loaded') {
scriptLoadHandler();
}
};
// Try to find the head, otherwise default to the documentElement
(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
} else {
// The jQuery version on the window is the one we want to use
jCorner = window.jQuery.fn.corner;
jQuery.fn.corner = window.jQuery.fn.corner;
scriptLoadHandler();
}
}
function scriptLoadHandler() {
// Restore $ and window.jQuery to their previous values and store the
// new jQuery in our local jQuery variable
jQuery = window.jQuery.noConflict(true);
// Call our main function
main();
}
function load_countries (country_preselected)
{
if (jQuery('#trse_continent').val() > 0) {
jQuery('#trse_code_1007_07b0883c2fc2 #trse_country option:first').html ('-- Please wait... --');
jQuery('#trse_code_1007_07b0883c2fc2 #trse_country').attr ('disabled', true);
jQuery.getJSON ('http://www.tourradar.com/index.php?c=iframes&m=select_tours_ajax&user=1007&cont=' + jQuery('#trse_continent').val() + '&callback=?', function (data) {
if (data.status == 'OK') {
jQuery('#trse_country option:not(:first)').remove();
for (var i = 0; i < data.countries.length; i ++) {
jQuery('#trse_country').append ('');
}
jQuery('#trse_country option:first').html ('-- All countries --');
jQuery('#trse_country').attr ('disabled', false);
} else {
alert ('ERROR! Try again later.');
}
});
} else {
jQuery('#trse_country option:first').html ('-- Choose continent first --');
jQuery('#trse_country option:not(:first)').remove();
jQuery('#trse_country').attr ('disabled', true);
}
}
function main() {
jQuery(document).ready (function () {
jQuery('#trse_code_1007_07b0883c2fc2').append ('
');
jQuery.getJSON ('http://www.tourradar.com/index.php?c=iframes&m=select_tours&user=1007&code=07b0883c2fc2&callback=?', function (data) {
if (data.status == 'OK') {
jQuery('#trse_code_1007_07b0883c2fc2 #trse-loading').remove();
jQuery('#trse_code_1007_07b0883c2fc2').append ('