// JavaScript Document

/*---Popup window ----------------------------------*/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,resize){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resize;
	win = window.open(mypage,myname,settings);
}

function NewWindowTop(mypage,myname,w,h,scroll,resize){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resize;
	win = window.open(mypage,myname,settings);
	if (window.focus) {win.focus()}
	return false;

}
function make_blank()
{document.form.s.value ="";}
//Expedia award popup///////////////////////////////
var cX = 0; var cY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
if(dd.style.display == "none") { dd.style.display = "block"; }
else { dd.style.display = "none"; }
}
function AssignPosition(d) {
d.style.left = (cX+40) + "px";
d.style.left = (cX+20) + "px";
d.style.top = (cY+250) + "px";
var a = cY-120+10;
if(cY>500){	d.style.top = 650 + "px";}
if(cY<340){ d.style.top = 600 + "px";}
}

