function hso_paint(){
	document.write(innerText.join(''));
	hso_initializeSearchBox();
	}

function hso_innerElement(elementId){
	document.getElementById(elementId).innerHTML = innerText.join('');
	hso_initializeSearchBox();
	}

function hso_load_script(src_script) {
	var scripts_loaded;
	var found = false;
	scripts_loaded = document.getElementsByTagName("script");
	for (var i= 0; i < scripts_loaded.length && !found ; i++) {
		if (scripts_loaded[i].src.slice(scripts_loaded[i].src.lastIndexOf("/")) == src_script.slice(src_script.lastIndexOf("/"))) {
			found = true;
		}
	}
	if (!found){ document.writeln('<script type="text\/javascript" src="' + src_script + '"><\/script>\r\n');}
}

function hso_initializeSearchBox(){
	var specialoffers_box
	if (specialoffers_box = document.getElementById("ctn_so")) {
		specialoffers_box.style.width = ctn_width;
		if (ctn_use_external_css == "0") {
			var elements = specialoffers_box.getElementsByTagName("TD");
			var i;
			for (i=0; i < elements.length; i++) {
				
				if (elements[i].className == "title") elements[i].style.backgroundColor = ctn_color_dark;
				if (elements[i].className == "specialoffer") {
					elements[i].style.borderLeft = "solid " + ctn_color_medium +" 1px";
					elements[i].style.borderBottom = "solid " + ctn_color_medium +" 1px";
					elements[i].style.borderRight = "solid " + ctn_color_medium +" 1px";
				}
				if (elements[i].className == "button") elements[i].style.backgroundColor = ctn_color_medium;
				if (elements[i].className == "bottom") {
					elements[i].style.backgroundColor = ctn_color_clear;
					elements[i].style.borderLeft = "solid " + ctn_color_medium +" 1px";
					elements[i].style.borderBottom = "solid " + ctn_color_medium +" 1px";
					elements[i].style.borderRight = "solid " + ctn_color_medium +" 1px";
				}
			}
			elements = specialoffers_box.getElementsByTagName("P");
			for (i=0; i < elements.length; i++) if (elements[i].className == "title") elements[i].style.color = ctn_color_dark;
			elements = specialoffers_box.getElementsByTagName("A");
			for (i=0; i < elements.length; i++) if (elements[i].className == "title") elements[i].style.color = ctn_color_dark;
			elements = specialoffers_box.getElementsByTagName("INPUT");
			for (i=0; i < elements.length; i++) if (elements[i].className == "button") elements[i].style.backgroundColor = ctn_color_dark;
		}
	}

}

if (typeof ctn_color_dark== 'undefined' ) { ctn_color_dark= "#000000"; }
if (typeof ctn_color_medium== 'undefined' ) { ctn_color_medium= "#097864";}
if (typeof ctn_color_clear== 'undefined' ) { ctn_color_clear= "#ffffff";}
if (typeof ctn_affiliate_id== 'undefined' ) { ctn_affiliate_id= "SCT-TestAff";}
if (typeof ctn_language== 'undefined' ) { ctn_language= "en";}
if (typeof ctn_country== 'undefined' )  {ctn_country= "CUB";}
if (typeof ctn_currency== 'undefined' ) { ctn_currency= "EUR"; }
if (typeof ctn_site_from== 'undefined' ) { ctn_site_from= "http://www.fast-manager.com";}
if (typeof ctn_use_external_css== 'undefined' ) { ctn_use_external_css= "0";}
if (typeof ctn_template== 'undefined' ) { ctn_template= "so_featured_table";}
if (typeof ctn_number_hotels== 'undefined' ) { ctn_number_hotels= ""; }
if (typeof ctn_width== 'undefined' ) { ctn_width= "100%"; }
if (typeof ctn_destination== 'undefined' ) { ctn_destination= ""; }
if ((typeof ctn_featured_hotels_only== 'undefined' ) || (ctn_featured_hotels_only=="0")) { ctn_featured_hotels_only= "-1";}

hso_load_script(ctn_site_from + "/comun/scripts/hso_get.js.asp?language_id=" + ctn_language + "&country_id=" + ctn_country +"&affiliate_code=" + ctn_affiliate_id + "&currency_id=" + ctn_currency + "&number_hotels=" + ctn_number_hotels + "&template_name=" + ctn_template + "&destination_name=" + ctn_destination + "&featured_hotels=" + ctn_featured_hotels_only);

hso_load_script(ctn_site_from + "/comun/scripts/fblibbiz.js");

if (ctn_use_external_css == "0") {
	document.writeln('<link href="' + ctn_site_from + '\/comun\/styles\/hso_get.css" rel="stylesheet" type="text\/css">\r\n');
}

