<!--
function sortSelected() 
{
	var querystring = window.location.search.substring(1);
	
	var array = querystring.split("&");
	var newQueryString = "";
	
	for (var x = 0; x < array.length; x++) {
		if (array[x].toLowerCase().indexOf("sortby") == -1) {
			if (x == 0) {
				newQueryString = newQueryString + array[x];
			} else {
				newQueryString = newQueryString + "&" + array[x];
			}
		}
	}
	
	document.location.href = "searchResults.asp?" + newQueryString + "&sortby=" + document.getElementById("sltSortBy").value;
}

/*******************************************************************************************************
	Opens a window with disclaimer
*******************************************************************************************************/
function PortPromo() {

	eval("page = window.open('http://www.alaskacruiseexperts.com/ACE_external.asp', 'externalWin', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=600,height=600,left = 262,top = 84');");
}


/*******************************************************************************************************
	Opens a window with Port Promotions
*******************************************************************************************************/
function openPortPromo(URL) {

	day = new Date();
	id = day.getTime();
	
	eval("page" + id + " = window.location.href='" + URL + "'");

}


/*******************************************************************************************************
	Opens a window with BBBOnline
*******************************************************************************************************/
function openBBB() {
	
		var pageURL = "http://www.bbbonline.org/cks.asp?id=101081616503918680";	

		//open a new sized window with only scrollbars
		var bbbWindow=window.open(pageURL,"bbbWindow","width=500, height=400, scrollbars=yes, resizable=yes, location=no, toolbar=no, menubar=no");

		//bring window to top
		bbbWindow.focus();
}



/***********************************************************************
	Open window for deck plan images
************************************************************************/
function openDeck(pageURL) {

		//set the url of the page
//		var pageURL = "ship_deck.asp?shipID=" + shipID + "&deckID=" + deckRefID + "&deckName=" + deckName;		

		//open a new sized window with only scrollbars
		var deckWin=window.open(pageURL,"deckWin","width=300, height=600, scrollbars=yes, location=no, toolbar=no, menubar=no, resizable=yes");

		//bring window to top
		deckWin.focus();
	}




/***********************************************************************
	Open window for stateroom/public room images
************************************************************************/
function openRoom(pageURL) {
		
//		//set the url of the page
//		var pageURL = "ship_room.asp?shipID=" + shipID + "&roomID=" + roomID + "&roomType=" + roomType;
//		
		//open a new sized window with only scrollbars
		var roomWin=window.open(pageURL,"roomWin","width=300, height=625, scrollbars=yes, location=no, toolbar=no, menubar=no, resizable=no");

		//bring window to top
		roomWin.focus();
	}



/***********************************************************************
	Open window for stateroom/public room images
************************************************************************/
function openWallpaper(pageURL) {


    try {		

//		//set the url of the page
//		var pageURL = "ship_room.asp?shipID=" + shipID + "&roomID=" + roomID + "&roomType=" + roomType;
//		
		//open a new sized window with only scrollbars
		var posterWin=window.open(pageURL,"posterWin","width=900, height=800, scrollbars=yes, location=no, toolbar=no, menubar=no, resizable=no");

		//bring window to top
		posterWin.focus();
		
		} catch (Error)
		{
		
		  
		}
	}
	
	

///***********************************************************************
//	Open window for deck plan images
//************************************************************************/
//function openDeck(shipID, deckRefID, deckName) {
//		
//		//set the url of the page
//		var pageURL = "ship_deck.asp?shipID=" + shipID + "&deckID=" + deckRefID + "&deckName=" + deckName;		

//		//open a new sized window with only scrollbars
//		var deckWin=window.open(pageURL,"deckWin","width=300, height=600, scrollbars=yes, location=no, toolbar=no, menubar=no, resizable=yes");

//		//bring window to top
//		deckWin.focus();
//	}


///***********************************************************************
//	Open window for stateroom/public room images
//************************************************************************/
//function openRoom(shipID, roomID, roomType) {
//		
//		//set the url of the page
//		var pageURL = "ship_room.asp?shipID=" + shipID + "&roomID=" + roomID + "&roomType=" + roomType;
//		
//		//open a new sized window with only scrollbars
//		var roomWin=window.open(pageURL,"roomWin","width=300, height=425, scrollbars=yes, location=no, toolbar=no, menubar=no, resizable=no");

//		//bring window to top
//		roomWin.focus();
//	}


/***********************************************************************
	Open window for printable version of Directions to Pier
************************************************************************/
//function openPDprint(portID) {
function openPDprint(pageURL) {
		
		//set the url of the page
	//	var pageURL = "pierDirect_print.asp?id=" + portID;
		
		//open a new sized window with only scrollbars
		var PDprintWin=window.open(pageURL,"PDprintWin","width=750, height=550, scrollbars=yes, location=no, toolbar=no, menubar=yes, resizable=yes");

		//bring window to top
		PDprintWin.focus();
	}


/***********************************************************************
	Open window for Send to a Friend form
************************************************************************/
function openSendFriend(productIDQryStr) {
		
		//set the url of the page
//		var pageURL = "https://www.alaskacruiseexperts.com/ACE_sendProduct.asp?id=" + productID;

		var pageURL = "/PopupWindows/send-product.aspx?" + productIDQryStr;
		
		//open a new sized window with only scrollbars
		var sendWin=window.open(pageURL,"sendWin","width=520, height=620, scrollbars=no, location=no, toolbar=no, menubar=no, resizable=no");

		//bring window to top
		sendWin.focus();
	}



/***********************************************************************
	Opens a window with no status, location, menu or toolbar
	of a specified width and height.
************************************************************************/
function openSizedWindow(width, height, url) {
		
		//set the url of the page
		var pageURL = url;		

		//open a new sized window with only scrollbars
		var genericWindow=window.open(pageURL,"genericWindow","width=" + width + ", height=" + height + ", scrollbars=yes, location=no, toolbar=no, menubar=no");

		//bring window to top
		genericWindow.focus();
	}


/*********************************************************************
	Writes contact information on the window status area
	(bottom of browser window).
**********************************************************************/
var stringStatus = "Call the Europe Cruise Experts: 1-800-565-2784       Mon - Thu 7:00am - 7:00pm  | Fri 7:00am - 5:30pm  |  Sat & Sun 8:00am - 5:30pm  (Pacific)";
window.status = stringStatus;

//-->
