
/*                  psi scripts


*/

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function hideItems() { //an attempt to hide all items
	MM_showHideLayers('intro','','hide','introquestion','','hide','introductionp2','','hide','introquestion2','','hide','question1','','hide','q1question','','hide','q1question1','','hide','q1question2','','hide','q1answer','','hide','q1scoring','','hide','question2','','hide','question2p1','','hide','q2question1','','hide','q2question','','hide','q2answer','','hide','q2answer1','','hide','q2scoring','','hide','q2scoring1','','hide','question2p2','','hide','q2question2','','hide','q2answer2','','hide','q2scoring2','','hide','question3','','hide','q3question','','hide','question3p1','','hide','q3question1','','hide','q3answer','','hide','q3answer1','','hide','q3scoring','','hide','q3scoring1','','hide','question3p2','','hide','q3question2','','hide','q3answer2','','hide','q3scoring2','','hide','question3p3','','hide','q3question3','','hide','q3answer3','','hide','q3scoring3','','hide','question4','','hide','question4p1','','hide','q4question','','hide','q4question1','','hide','q4answer','','hide','q4answer1','','hide','q4scoring','','hide','q4scoring1','','hide','question4p2','','hide','q4question2','','hide','q4answer2','','hide','q4scoring2','','hide','question5','','hide','q5question','','hide','q5answer','','hide','q5scoring','','hide','question6','','hide','q6question','','hide','q6answer','','hide','q6scoring','','hide' );
	}
function hideMenus() { //an attempt to hide all the menus
	MM_showHideLayers('menu1','','hide','menu2','','hide','menu3','','hide','menu4','','hide','menu5','','hide' );
	}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}