// image loads and swaps

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// netscape resize fix

function MM_reloadPage(init) {  //reloads the window if nn4 is 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);

// random photos

function randomPhoto() { //By Paul Davis - www.kaosweaver.com
  var j,l="",m="",p="",q="",z="",list= new Array()
  list[list.length]='/photos/students_03.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_04.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_05.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_06.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_07.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_08.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_09.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_10.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_11.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_12.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_13.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_14.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_15.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_16.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_17.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_18.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_19.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_20.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_21.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_22.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_23.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_24.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_25.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_26.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_27.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_28.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_29.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_32.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_33.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_34.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_35.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_36.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_37.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_38.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_39.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_40.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_41.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_42.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_43.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_44.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  list[list.length]='/photos/students_45.jpg?&width=199&height=132&name=photo&alt=Student photograph&border=0';
  j=parseInt(Math.random()*list.length);
  j=(isNaN(j))?0:j;
  if (list[j].indexOf('?')==-1) {
    document.write("<img src='"+list[j]+"'>");
  }
  else {
    nvp=list[j].substring(list[j].indexOf('?')+2).split('&');
    for(var i=0;i<nvp.length;i++) {
      sub=nvp[i].split('=');
   	  switch(sub[0]) {
 	    case 'link':
          l="<a href='"+unescape(sub[1])+"'>";
          p="</a>";
		  break;
	    case 'target':
          q=" target='"+unescape(sub[1])+"'";
  		  break;
  	    default:
          m+=" "+sub[0]+"='"+unescape(sub[1])+"'";
  		  break;
      }
    }
    z=(l!="")?((q!="")?l.substring(0,l.length-1)+q+">":l):"";
    z+="<img src='"+list[j].substring(0,list[j].indexOf('?'))+"'"+m+">"+p;
  document.write(z);
  }
}

// standard popup window

function popUp(newPage) {
var features = "width=580,height=400,scrollbars,resizable,location,toolbar,status,screenX=10,screenY=10,top=10,left=10";
        window.open(newPage,'popUp',features);
        return false;
}

// midsize popup window

function popUpMid(newPageMid) {
var featuresMid = "width=500,height=300,scrollbars,resizable,status,screenX=10,screenY=10,top=10,left=10";
        window.open(newPageMid,'popUpMid',featuresMid);
        return false;
}

// small popup window

function popUpSmall(newPageSmall) {
var featuresSmall = "width=400,height=220,scrollbars,resizable,screenX=10,screenY=10,top=10,left=10";
        window.open(newPageSmall,'popUpSmall',featuresSmall);
        return false;
}

// flash popup window (called from flash)

function popUpFlash(newPageFlash) {
var featuresFlash = "width=750,height=550,scrollbars,resizable,location,toolbar,status,screenX=10,screenY=10,top=10,left=10";
        window.open(newPageFlash,'popUpFlash',featuresFlash);
		// don't return true or false
}

// image map popup window

var featuresMap = "width=500,height=250,resizable,screenX=10,screenY=10,top=10,left=10";
function popUpMap(newPageMap) {
        window.open(newPageMap,'popUpMap',featuresMap);
		return false;
}

// nn6 image map popup window

var featuresMap = "width=500,height=250,resizable,screenX=10,screenY=10,top=10,left=10";
function popUpnn6(newPageMap) {
        window.open(newPageMap,'popUpMap',featuresMap);
}

// cfm popup window

function nirvana_positionWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

// game popup (called from Flash NOT html)

function popUpGame(newPage) {
var features = "width=780,height=470,resizable,screenX=10,screenY=10,top=10,left=10";
        window.open(newPage,'popUpGame',features);
}

// game popup (called from html NOT Flash)

function popUpGoin(newPage) {
var features = "width=780,height=470,resizable,screenX=10,screenY=10,top=10,left=10";
        window.open(newPage,'popUpGoin',features);
		return false;
}

// close popup window

function closePop() {
	parent.close();
	opener.focus();
}


// openClode Row
function toggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none') {
		el.style.display = 'none';
	}
	else {
			el.style.display = '';
			}
}