 //var propertyID = '3272';
	    var brand = 'aloft';
	    var requestedChainCode = 'AL';
	    var requestedAffiliationCode = 'AL';
	    var langID = '1033';
	    var langCode = 'en_US';
	    var successPath = 'http://www.starwoodhotels.com/alofthotels/search/ratelist.html';

  var aLoginFormArgs = new Array();
  aLoginFormArgs[0] = new Array("FormName","login");
  aLoginFormArgs[1] = new Array("FormAction","http://www.starwoodhotels.com/alofthotels/account/sign_in.html");
  aLoginFormArgs[2] = new Array("returnURL",window.location.href);
  function LoginForm_Submit()
  {
      location.href = ISS_FS_ReturnFormGet(aLoginFormArgs);
      //alert(ISS_FS_ReturnFormGet(aLoginFormArgs));
  }
		function ISS_FS_ReturnFormGet(aFormArgs, siteLoc)
		{
			//alert('here->' + aFormArgs.length); 
			var sArgs = '';
			for (var aNum = 2; aNum < aFormArgs.length; aNum++)
			{   
			    var sThisArgName = aFormArgs[aNum][0];
			    var sThisArgValue = aFormArgs[aNum][1];
				sArgs = sArgs + sThisArgName + "=" + sThisArgValue + "&";
				//alert(sArgs);
			}
			sArgs = sArgs + "flashContent=nonflash&" + siteLoc;
			return aFormArgs[1][1] + "?" + sArgs;
		}
		 function openBrWindow(theURL,winName,features) {
        window.open(theURL,winName,features);
      }
	 
	 
	 
$(document).ready(function( ) {
	$('div.dhtmlSelectDropDown').click(function(event) {
		if($(this).find('ul').css('display') == 'none'){
			$(this).find('ul').show( );
			$('div#languageSelectorButton').addClass('show');
		}else{
			$(this).find('ul').hide( );
			$('div#languageSelectorButton').removeClass('show');
		}
		if(event.stopPropagation){
			  event.stopPropagation();
		}
	});
	$(document).click(function(e) {
		(e.target && e.target.id == 'languageSelectorButton') || $('div#languageSelectorButton').find('ul').hide( );
		$('div#languageSelectorButton').removeClass('show');
	});
});

function includeCSS(p_file) {
	var v_css  = document.createElement('link');
	v_css.rel = 'stylesheet'
	v_css.type = 'text/css';
	v_css.href = p_file;
	document.getElementsByTagName('head')[0].appendChild(v_css);
}
	 
function brandNavClose()	{
	document.getElementById("brandNavBrandList").style.visibility = "hidden";
	document.getElementById("brandNavIframeShim").style.display = "none";
}

function brandNavOpen()	{
	document.getElementById("brandNavBrandList").style.visibility = "visible";
	document.getElementById("brandNavIframeShim").style.display = "block";
}

function popUp(URL,popWidth,popHeight, scrollbars) {
	var useScrollBars = scrollbars || "0";
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars="+useScrollBars+",location=0,statusbar=0,menubar=0,resizable=0,width="+popWidth+",height="+popHeight+",left=242,top=114');");
}

