function validateAndRedirect(baseUrl,searchBoxId){
	var keyword=document.getElementById(searchBoxId).value;
	if(keyword=='' || keyword=='SEARCH KEYWORD HERE'){
		alert("Please enter keyword for search.");
		return false;
	}
	else{
		window.location.href=baseUrl+"keywordsearch/"+keyword;
	}
}
function validateEnterKey(baseUrl,searchBoxId){
	var keyword=document.getElementById(searchBoxId).value;	
	if(keyword=='' || keyword=='SEARCH KEYWORD HERE'){
		alert("Please enter keyword for search.");
		return false;
	}
	else{
		window.location.href=baseUrl+"keywordsearch/"+keyword;
		return false;
	}
}
function emptySearchBox(searchBoxId){	
	if(document.getElementById(searchBoxId).value=='SEARCH KEYWORD HERE'){
		document.getElementById(searchBoxId).value=''
	}
}
function shareDown(){
	//document.getElementById('at16p').style.marginTop='190px';
	document.getElementById('at16pcc').style.Top='143px';
}
function testSkipCheck(ControlId){
	if(!document.getElementById(ControlId).checked){		
		alert("Please accept legal terms and privacy policy.");
		return false;
	}		
}
function chgLinkBackDivColor(divId,linkId,inOut){
	if(inOut==1){
		document.getElementById(divId).style.background='#d1d1d1';
		document.getElementById(linkId).style.color='#920000';
	}
	else{
		document.getElementById(divId).style.background='#fff';
		document.getElementById(linkId).style.color='#333';
	}
}
function loginControl(){
	var obj=document.getElementById('loginLogos');
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	document.getElementById('aboveControl').style.top=curtop +"px";
	document.getElementById('aboveControl').style.left=curleft +"px";
}
function printItinerary(){
	var iframe;
	iframe = document.getElementById('PreviewPage');
	var check = iframe.innerHTML;	
	pWin = window.open('','pWin','location=yes, menubar=yes, toolbar=yes');
	pWin.document.open();
	pWin.document.write('<html><head></head><body class="body">');
	pWin.document.write(check);
	pWin.document.write('</body></html>');
	pWin.print();
	pWin.document.close();
	pWin.close();
}


