<!--

function turnOn(imageName) {

  if (document.images) {

    document[imageName].src = eval(imageName + "on.src");

  }

}



function turnOff(imageName) {

  if (document.images) {

    document[imageName].src = eval(imageName + "off.src");

  }

}



function openWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



function frippleguides() {

      ver = navigator.appVersion;

	  var is = new Is();

	  if ( is.ie4up ) {

     	if ( is.win ) {

       	 	open('/critical_thinking/FrippleShop/ReleaseJS/fripple_WMP_IE.html','FrippleShop', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=600,height=400');



        } else {

        	open('/critical_thinking/FrippleShop/ReleaseQT/frippleShopQT.html','FrippleShop', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=600,height=400');



      	}

      } else if ( is.nav4up ) {

        if ( is.win ) {

        	navWindow =	open('/critical_thinking/FrippleShop/ReleaseJS/fripple_WMP_Nav.html', 'FrippleShop', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=600,height=400');



      	} else {

         	if ( is.nav5up ) {

         		open('/critical_thinking/FrippleShop/ReleaseQT/frippleShopQT.html','FrippleShop', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=639,height=430');      	



      		} else

         		open('/critical_thinking/FrippleShop/ReleaseJS/frippleJS_QT.html','FrippleShop', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=600,height=400');



     	}

      } else {

      	alert('Browser version not supported');

      }

	  

	function Is () {

	   // convert all characters to lowercase to simplify testing

	    var agt=navigator.userAgent.toLowerCase()



	    // *** BROWSER VERSION ***

	    this.major = parseInt(navigator.appVersion)

	    this.minor = parseFloat(navigator.appVersion)



	    //test for Netscape browser

		this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)

	                && (agt.indexOf('compatible') == -1)))

	    this.nav2 = (this.nav && (this.major == 2))

	    this.nav3 = (this.nav && (this.major == 3))

	    this.nav4 = (this.nav && (this.major == 4))

	    this.nav4up = this.nav && (this.major >= 4)

	    this.nav5up = this.nav && (this.major >= 5)

	    this.nav6up = this.nav && (this.major >= 6)

	    

	    //test for IE browser

	    this.ie   = (agt.indexOf("msie") != -1)

	    this.ie3  = (this.ie && (this.major == 2))

	    this.ie4  = (this.ie && (this.major == 4))

	    this.ie4up  = (this.ie  && (this.major >= 4))    

		

		//test for OS

	    this.win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) )

	    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all

	    //        Win32, so you can't distinguish between Win95 and WinNT.

	    this.win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1))



	    // NOTE: Reliable detection of Win98 may not be possible. It appears that:

	    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.

	    //       - On Mercury client, the 32-bit version will return "Win98", but

	    //         the 16-bit version running on Win98 will still return "Win95".

	    this.win98 = ((agt.indexOf("win98")!=-1)||(agt.indexOf("windows 98")!=-1))

	    this.winnt = ((agt.indexOf("winnt")!=-1)||(agt.indexOf("windows nt")!=-1))	

	    this.win32 = this.win95 || this.winnt || this.win98 || 

	                 ((this.major >= 4) && (navigator.platform == "Win32")) ||

	                 (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1)

	                 

	    this.mac    = (agt.indexOf("mac")!=-1)

	}    

}



var taskBarHeight = 55; // for netscape (ok to be constant)

var UserID = 0;

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

var MacPlatform = navigator.platform == "MacPPC";



function openDMath(in_strURL)

{

	g_strDynamoSessionID = "";

	g_iDynamoUserID = UserID;

	openActivityWin(in_strURL, 0);

}



function openActivityWin(in_strURL, in_iAssignmentID)

{

	var theHeight = InternetExplorer ? screen.availHeight : (screen.height)-taskBarHeight;

	var theWidth = InternetExplorer ? screen.availWidth : screen.width;

	var windowProperties = "top=0,left=0,resizable=no,scrollbars=no,height="+theHeight+",width="+theWidth;

	var theURL = in_strURL + g_strDynamoSessionID +"?USERID=" + g_iDynamoUserID + "&ASSIGNID=" + in_iAssignmentID;

	sessionWindow=window.open(theURL, "activityWin", windowProperties);

	if (MacPlatform && InternetExplorer)

		sessionWindow.resizeTo(theWidth, theHeight);

	sessionWindow.focus();

}

// for drop down menus to open in new windows

function jumpPage(newLoc) 

{ 

	var winName,features;

	newPage = newLoc.options[newLoc.selectedIndex].value;

	if ( newPage != "" )openDMath(newPage);

}

//Destination Reading open window

function openFlashWindow(redirectURL)

{

	var IsIE = navigator.appName.indexOf("Microsoft") != -1;

	var IsNetscape = !IsIE;

	var IsMac = navigator.platform.indexOf("MacPPC") != -1;

	var IsWin = !IsMac;

	var IsNS6 = navigator.appVersion.substr(0, 1) > "4";

	

	var flashWindow;



	//open the flash player window, fullscreen, no chrome

	if(IsIE)

	{

		//d'oh - scrollbars=yes causes NO SCROLLBARS on IE/Win!

		flashWindow = window.open(redirectURL, "flashWindow", "fullscreen=yes, scrollbars=no, left=0, top=0");



		//d'oh - IE/Mac can't take a hint and size to full screen

		if(IsMac)

		{

			flashWindow.resizeTo(window.screen.width - 10, window.screen.height);

		}

	}

	else

	{

		//allow for bug in NS4x that computes height of task bar incorrectly

		var ah = IsNS6 ? window.screen.availHeight : window.screen.availHeight - 32;

		var aw = IsNS6 ? window.screen.availWidth : window.screen.availWidth - 10;

		if(IsNS6)

			flashWindow = window.open(redirectURL, 'flashWindow', 'toolbar=0,outerWidth=' + aw + ',outerHeight=' + ah + ',screenX=0,screenY=0');

		else

			flashWindow = window.open(redirectURL, 'flashWindow', 'toolbar=0,innerWidth=' + aw + ',innerHeight=' + ah + ',screenX=0,screenY=0');

	}

}



function selSupport(gurl) {

selSupportWin = window.open(gurl, 'SelectSupport',

'width=761,height=374,left=20,top=50');

}


// -->



