var camPopUpWindow=null;
function camPopUp(mypage,myname,w,h,pos,infocus){
if (confirm("Project webcams may take a few moments to load. We appreciate your patience. Click \'OK\' to continue.")) {
		if(pos=='random'){
LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=='center'){
LeftPosition=(screen.width)?(screen.width-w)/2:100;
TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!='random') || pos==null){LeftPosition=100;TopPosition=100;}settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
camPopUpWindow=window.open('',myname,settings);
if(infocus=='front'){camPopUpWindow.focus();camPopUpWindow.location=mypage;}
}
}

function guestPrompt(mypage,myname,w,h,pos,infocus){
if (confirm("Please enter \'guest\' in the \'User Name\' field to view webcam. No password is necessary. Project webcams may take a few moments to load. We appreciate your patience. Click \'OK\' to continue.")) {
		if(pos=='random'){
LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=='center'){
LeftPosition=(screen.width)?(screen.width-w)/2:100;
TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!='random') || pos==null){LeftPosition=100;TopPosition=100;}settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
camPopUpWindow=window.open('',myname,settings);
if(infocus=='front'){camPopUpWindow.focus();camPopUpWindow.location=mypage;}
}
}
	


