// ###############################################
// Clear input box script
// ###############################################

function needClear(level, obj)
{
	if(level==1&&obj.value=="Search Cougar.ca") { obj.value=""; }
	if(level==0&&obj.value=="") { obj.value="Search Cougar.ca"; }
}

// ###############################################
// Web Login Pop-up script
// ###############################################
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


// ###############################################
// Photo Gallery Pop-up script
// ###############################################

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=768,height=512,left = 260,top = 289.5');");
}


// ###############################################
// Immersion Suit Pop-up script
// ###############################################

function ISpopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=495,left = 280,top = 180');");
}

// ###############################################
// Fleet Pop-up script
// ###############################################

function fullscreen(theURL) { 
window.open(theURL, '', 'fullwindow=yes, scrollbars=0'); 
} 

// ###############################################
// Flight Information Pop-up script
// ###############################################
  
function fullscreen(targeturl)
      {        
       window.open(targeturl,"","fullscreen,scrollbars,statusbar")
	// window.open(targeturl, '', 'fullscreen=yes, scrollbars=auto');
	//window.open(targeturl,"",'menubar=no,toolbar=no,directories=no,resizable=no,scrollbars=no,location=no,status=yes');
	//window.status="";
	
      }

// ###############################################
// Google Analytics
// ###############################################
	  
//<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

//<script type="text/javascript">
//_uacct = "UA-3561938-1";
//urchinTracker();


// ###############################################
// Flight Information Pop-up script
// ###############################################

function addCaption( oImgElem, bUseCaptionMarker )
{
  // Insert Caption
  var oCaptionElem = document.createElement("div");
  oCaptionElem.className = "caption";

  if( bUseCaptionMarker)
  {
    var oCaptionMarkerElem = document.createElement("div");
    oCaptionMarkerElem.className = "caption-marker";
    var oCaptionMarkerTextElem = document.createTextNode("\u00bb");
    oCaptionMarkerElem.appendChild(oCaptionMarkerTextElem);
    oCaptionElem.appendChild(oCaptionMarkerElem );
  }

  var oCaptionTextElem = document.createElement("div");
  oCaptionTextElem.className = "caption-text";
  var oCaptionText = document.createTextNode( oImgElem.alt );
  oCaptionTextElem.appendChild(oCaptionText );
  oCaptionElem.appendChild(oCaptionTextElem);

  if( oImgElem.getAttribute("copyright") != null )
  {
    var oCopyrightElem = document.createElement("div");
    oCopyrightElem.className = "copyright";
    var oCopyrightText = document.createTextNode( 
      oImgElem.getAttribute("copyright") );
    oCopyrightElem.appendChild(oCopyrightText);
    oCaptionElem.appendChild(oCopyrightElem );
  }

  if(oImgElem.nextSibling) 
    oImgElem.parentNode.insertBefore(oCaptionElem,
      oImgElem.nextSibling);
  else
    oImgElem.parentNode.appendChild(oCaptionElem);

  with(oImgElem.style)
  {
    oCaptionElem.style.width = (oImgElem.width+borderLeft+
      borderRight+paddingLeft+paddingRight)+"px";
  }

  return true; 
}




// ###############################################
// 360 Pop-up script
// ###############################################

function ISpopUpBR360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=428,height=335,left = 300,top = 180');");
}

function ISpopUpPAXW360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=428,height=320,left = 300,top = 180');");
}

function ISpopUpCF360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=428,height=307,left = 300,top = 180');");
}

function ISpopUpHG360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=428,height=320,left = 300,top = 180');");
}

function ISpopUpTR360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=428,height=300,left = 300,top = 180');");
}

function ISpopUpPAXL360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=427,height=297,left = 300,top = 180');");
}

function ISpopUpS92360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=428,height=286,left = 300,top = 180');");
}

function ISpopUpRamp360(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=428,height=326,left = 300,top = 180');");
}
