﻿
function openup(newpage, name) { 
	window.name = "main";
	switch (name){ 
		case 'ALLCOUNTRIESMAP' : 
		  win=window.open(newpage, name, "width=1050, height=650, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");  
		  break;
	   case 'SCUBACHART' : 
		  win=window.open(newpage, name, "width=780, height=550, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");  
		  break; 
	   case 'SLIDESHOW' : 
		  win=window.open(newpage, name, "width=525, height=380, scrollbars=no, resizable=no, toolbar=no, status=no, location=no, menubar=no"); 
		  break; 
	   case 'SLIDESHOWPOP' : 
		  win=window.open(newpage, name, "width=525, height=380, scrollbars=no, resizable=no, toolbar=no, status=no, location=no, menubar=no"); 
		  break; 
	   case 'LARGEMAP' : 
		  win=window.open(newpage, name, "width=615, height=460, scrollbars=no, resizable=no, toolbar=no, status=no, location=no, menubar=no");
		  break;
	   case 'PHOTO' : 
		  win=window.open(newpage, name, "width=525, height=550, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break;
	   case 'STAFFPHOTO' : 
		  win=window.open(newpage, name, "width=675, height=500, scrollbars=no, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break;
		case 'STAFFBIO' : 
		  win=window.open(newpage, name, "width=610, height=700, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break;
		case 'VIDEO' : 
		  win=window.open(newpage, name, "width=500, height=460, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break;
		case 'TELLAFRIEND' : 
		  win=window.open(newpage, name, "width=643, height=550, scrollbars=yes, resizable=no, toolbar=no, status=no, location=no, menubar=no");
		  break;
	   case 'VIDEOPG' : 
		  win=window.open(newpage, name, "width=850, height=750, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break; 
		case 'VIDEOPOP' : 
		  win=window.open(newpage, name, "width=850, height=750, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break; 
	   case 'ADMINDETAIL' : 
		  win=window.open(newpage, name, "width=780, height=550, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");  
		  break; 
	   case 'ADMINTRACE' : 
		  win=window.open(newpage, name, "width=275, height=200, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");  
		  break; 
		case 'TRIPSPECIAL' : 
		  win=window.open(newpage, name, "width=525, height=400, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break;
		case 'AJOURNAL' : 
		  win=window.open(newpage, name, "width=738, height=600, scrollbars=yes, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
		  break;
		case 'PHOTOALBUM' : 
			win=window.open(newpage, name, "width="+eval(screen.availWidth-100)+", height="+eval(screen.availHeight-100)+", top=50, left=50 , scrollbars=no, resizable=yes, toolbar=no, status=no, location=no, menubar=no");
			break;
	   default : 
		  // Nothing happens if default; 
	} 
	if (win.focus){win.focus();}  // BRING TO FRONT
	if (win.opener == null) {win.opener = self;}

}

function loadIntoOpener(page) {
    if (opener && !opener.closed)
        opener.location=page;
    else {
		var myWin = window.open(page, '', "width=800, height=600, scrollbars=yes, resizable=yes, toolbar=yes, status=yes, location=yes, menubar=yes");
        //var myWin = window.open(page,'','width=100,height=100');
        // trick the window into thinking it was opened by this new window:
        opener = myWin;
    }
}

