



	/** =================================================================== 
	*
	* insao-hive-iwm
	* @copyright 		(c) 2007-2008 PR23 Limited. All Rights Reserved
	* @author 			PR23
	* 
	* @category 		INSAO HIVE 6.0.0.1
	* @package 			insao_hive_local/
	* @subpackage 		www/sbin/portlets/
	* @name				cruise search
	*
	* -------------------------------------------------------
	*
	*  CRUISE SEARCH PORTLET DEFAULT JS
	*
	** =================================================================== */

	shipnames = new Array();
	shipids = new Array();
	var _nwID;
	
	
	/********************************************************************************/
	/**
	*	
	* @param	tid
	*
	**/
	function cruisesearch_init(tid) {
		
		if (window.ActiveXObject) {
			document.body.innerHTML += "<style type=\"text/css\">div.cruisesearch_init { display:none; } div.cruisesearch { display:block; }</style>";
		
		} else {
			var jsstyle 		= 	 document.createElement("style");
			var jsddstyle 		=	 document.createTextNode("div.cruisesearch_init { display:none; }");
			var jsddstyle1 		=	 document.createTextNode("div.cruisesearch { display:block; }");
			
			jsstyle.appendChild(jsddstyle);
			jsstyle.appendChild(jsddstyle1);
			document.body.appendChild(jsstyle);
		}
		
	}
	


	/********************************************************************************/
	/**
	*	
	* @param	tid
	*
	**/
	function cruisesearch_show(tid, ttab) {
		
		alttab	=	(ttab == "cruisesearch_simptab_")	?	"cruisesearch_advtab_"	:	"cruisesearch_simptab_";
		document.getElementById(ttab + tid).style.display = "block";
		document.getElementById(alttab + tid).style.display = "none";
	}
	
	/********************************************************************************/
	/**
	*	
	* @param	ihash
	*
	**/
	function cruiseSearch_populateShips(sid, sthisobj) {
		zid	=	document.forms['cruisesearchform_'+sid].cruise_ship
		len	=	zid.length
		while (len >= 0) {
			zid.options[len]=null;
			len--;
		}
		val	=	sthisobj.options[sthisobj.options.selectedIndex].value
		
		var fcomopany	=	eval("company"+val);
		zid.options[0] = new Option('Select', '0');
		for(i=0;i<fcomopany.shipid_arr.length;i++){
			if(fcomopany.shipname_arr[i] != ""){
	 			zid.options[zid.length] = new Option(fcomopany.shipname_arr[i], fcomopany.shipid_arr[i]);
	 		}
	 	}
		zid.options[0].selected = true;
	
	}
	
	/********************************************************************************/
	/**
	*	
	*
	**/
	function company (id, shipname_arr, shipid_arr) { 
		this.id=id;
		this.shipname_arr=shipname_arr;
		this.shipid_arr=shipid_arr;
	}