// ALS 9/22/2005
// Client side JavaScript files for Scholehouse site 

function NavigateTo(url) {
	parent.window.location.href = url;
}

function MM_findObj(n, d) {
  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_nbGroup(event, grpName) {
var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function FWOnLoad() {
    if (FwPrevHook) {
        FwPrevHook();
    }
    FWLoadInit();
}

function FWHookLoad() {
    var agent = navigator.userAgent;
    var hookPrev = true;
    if (agent.indexOf("MSIE") != -1 && agent.indexOf("Mac_") != -1) {
        hookPrev = false;
    }
    if (hookPrev) {
        FwPrevHook = window.onload;
    } else {
        FwPrevHook = false;
    }
    window.onload = FWOnLoad;
}

function MM_preloadImages() {
 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 nocopy() {
if (event.button==2) {alert ("All pictures and graphics on this website are covered by Copyright Laws and may not be copied, reproduced or used in any way without express written consent from SFTN Designs, LLC."); }
} 

function ShowPic(pagename) {

var newWindow;
	switch (pagename){
		case "Shute" :
			newWindow = window.open("Shute.html","BetseyShute","Height=600,Width=600");
			newWindow.moveTo(50,50);
			break
		case "Markley" :
			newWindow = window.open("Markley.html","DaborahMarkley","Height=600,Width=600");
			newWindow.moveTo(50,50);
			break
		case "House" :
			newWindow = window.open("House.html","House","Height=600,Width=600");
			newWindow.moveTo(50,50);
			break
		case "Hush" :
			newWindow = window.open("Hush.html","Hush","Height=600,Width=700");
			newWindow.moveTo(50,50);
			break
		case "Truth" :
			newWindow = window.open("Truth.html","Truth","Height=600,Width=600");
			newWindow.moveTo(50,50);
			break
		case "Ackworth" :
			newWindow = window.open("Ackworth.html","Ackworth","Height=600,Width=800");
			newWindow.moveTo(50,50);
			break
		case "Laura" :
			newWindow = window.open("LauraL.html","LLudington","Height=600,Width=800");
			newWindow.moveTo(50,50);
			break
		case "ElizabethM" :
			newWindow = window.open("ElizabethMeadow.html","EMeadow","Height=900,Width=600");
			newWindow.moveTo(50,50);
			break
		case "JHBook" :
			newWindow = window.open("JudithHayleSamplers.html","JHBook","Height=600,Width=600");
			newWindow.moveTo(50,50);
			break
		case "WeeBits1" :
			newWindow = window.open("WeeBits1.html","WeeBits1","Height=700,Width=800");
			newWindow.moveTo(50,50);
			break
		case "WeeBits2" :
			newWindow = window.open("WeeBits2.html","WeeBits2","Height=700,Width=700");
			newWindow.moveTo(50,50);
			break
		case "WeeBits3" :
			newWindow = window.open("WeeBits3.html","WeeBits3","Height=700,Width=700");
			newWindow.moveTo(50,50);
			break
		case "WeeBits4" :
			newWindow = window.open("WeeBits4.html","WeeBits4","Height=700,Width=700");
			newWindow.moveTo(50,50);
			break
		case "WeeBits5" :
			newWindow = window.open("WeeBits5.html","WeeBits5","Height=700,Width=700");
			newWindow.moveTo(50,50);
			break
		case "WeeBits6" :
			newWindow = window.open("WeeBits6.html","WeeBits6","Height=700,Width=700");
			newWindow.moveTo(50,50);
			break
		case "Acorne" :
			newWindow = window.open("Acorne.html","Acorne","Height=700,Width=800");
			newWindow.moveTo(50,50);
			break
		case "SBT" :
			newWindow = window.open("SBT.html","SBT","Height=650,Width=800");
			newWindow.moveTo(50,50);
			break
		case "SBI" :
			newWindow = window.open("SBI.html","SBI","Height=650,Width=800");
			newWindow.moveTo(50,50);
			break
		case "TBJ" :
			newWindow = window.open("TBJ.html","TBJ","Height=600,Width=800");
			newWindow.moveTo(50,50);
			break
		case "SBJ" :
			newWindow = window.open("SBJ.html","SBJ","Height=600,Width=800");
			newWindow.moveTo(50,50);
			break
		default :
	}
	
	newWindow.focus();
}


function LinkMouseOver() {
	window.event.srcElement.style.color = '#88922F';
	window.event.srcElement.style.cursor = 'hand';
}

function LinkMouseOut() {
	window.event.srcElement.style.color = '#A57929';
	window.event.srcElement.style.cursor = 'arrow';
}


function ShowDiv(div) {
   var d=document ;
   switch (div){
	case "Roses" :
	   d.getElementById("Linen").style.display = "none";
	   d.getElementById("Hints").style.display = "none";
	   d.getElementById("Nests").style.display = "none";
	   d.getElementById("Roses").style.display = "";
	   d.getElementById("Linen").style.visibility = "hidden";
	   d.getElementById("Hints").style.visibility = "hidden";
	   d.getElementById("Nests").style.visibility = "hidden";
	   d.getElementById("Roses").style.visibility = "visible";
	   break
	case "Linen" :
	   d.getElementById("Roses").style.display = "none";
	   d.getElementById("Hints").style.display = "none";
	   d.getElementById("Nests").style.display = "none";
	   d.getElementById("Linen").style.display = "";
	   d.getElementById("Roses").style.visibility = "hidden";
	   d.getElementById("Hints").style.visibility = "hidden";
	   d.getElementById("Nests").style.visibility = "hidden";
	   d.getElementById("Linen").style.visibility = "visible";
	   break
	case "Hints" :
	   d.getElementById("Roses").style.display = "none";
	   d.getElementById("Linen").style.display = "none";
	   d.getElementById("Nests").style.display = "none";
	   d.getElementById("Hints").style.display = "";
	   d.getElementById("Roses").style.visibility = "hidden";
	   d.getElementById("Linen").style.visibility = "hidden";
	   d.getElementById("Nests").style.visibility = "hidden";
	   d.getElementById("Hints").style.visibility = "visible";
	   break
	case "Nests" :
	   d.getElementById("Roses").style.display = "none";
	   d.getElementById("Linen").style.display = "none";
	   d.getElementById("Hints").style.display = "none";
	   d.getElementById("Nests").style.display = "";
	   d.getElementById("Roses").style.visibility = "hidden";
	   d.getElementById("Linen").style.visibility = "hidden";
	   d.getElementById("Hints").style.visibility = "hidden";
	   d.getElementById("Nests").style.visibility = "visible";
	   break
	default:
   }
	
}


