<!-- get date -->
   var currTime= new Date();
   var currYear = currTime.getFullYear();
<!-- end date -->


// Make column layout have same height
matchHeight=function(){ 
      var divs,contDivs,maxHeight,divHeight,d; 
      // get all <div> elements in the document 
      divs=document.getElementsByTagName('div'); 
      contDivs=[]; 
      // initialize maximum height value 
      maxHeight=0; 
      // iterate over all <div> elements in the document 
      for(var i=0;i<divs.length;i++){ 
           // make collection with <div> elements with class attribute 'container' 
           if(/\bcontainer\b/.test(divs[i].className)){ 
                 d=divs[i]; 
                 contDivs[contDivs.length]=d; 
                 // determine height for <div> element 
                 if(d.offsetHeight){ 
                      divHeight=d.offsetHeight; 
                 } 
                 else if(d.style.pixelHeight){ 
                      divHeight=d.style.pixelHeight; 
                 } 
                 // calculate maximum height 
                 maxHeight=Math.max(maxHeight,divHeight); 
           } 
      } 
      // assign maximum height value to all of container <div> elements 
      for(var i=0;i<contDivs.length;i++){ 
           contDivs[i].style.height=maxHeight; 
      } 
 } 
 // execute function when page loads 
 window.onload=function(){ 
      if(document.getElementsByTagName){ 
           matchHeight(); 
      } 
 }
/* pop up */
var newwindow;
function poptastic(url)
{
	newwindow=window.open(url,'name','height=750,width=700,left=150,top=100,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}

/* end pop up */

/* send this */

function EmailLink(){
   window.location = "mailto:"+"?subject=I thought this link might interest you." + "&body="+document.title+"  "+window.location;
}
/* end send this */
 
/* video */
function vid(url){
	window.open(url, 'video',"height=600,width=725,left=100,top=100,,status=yes,toolbar=no,menubar=no,location=no")
}
function vidLG(url){
	window.open(url, 'video',"height=750,width=800,left=100,top=100,,status=yes,toolbar=no,menubar=no,location=no")
}
 
/* end video */
function csa(){
	window.open('/superkids-reading-program/peek_into/L1-csa.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}


/* K peek into */

function peekInto(url) {
	newwindow=window.open(url, 'name', 'height=900,width=1000,status=yes,toolbar=no,menubar=no,location=no');
	if (window.focus) {newwindow.focus()}
}

/* grade 1 peek into */
function peekL3sb(){
	window.open('/superkids-reading-program/peek_into/L3-student-books.html', 'video',"height=950,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL3sd(){
	window.open('/superkids-reading-program/peek_into/L3-super-duper.html', 'video',"height=950,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL3sb2(){
	window.open('peek_into/L3-student-books-back.html', 'video',"height=950,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL3tb(){
	window.open('/superkids-reading-program/peek_into/L3-teacher-binder.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL3trk(){
	window.open('/superkids-reading-program/peek_into/L3-resource-kit.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}

function peekL4sb(){
	window.open('/superkids-reading-program/peek_into/L4-student-books.html', 'video',"height=800,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL4sd(){
	window.open('/superkids-reading-program/peek_into/L4-super-duper.html', 'video',"height=950,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL4sb2(){
	window.open('peek_into/L4-student-books-back.html', 'video',"height=800,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL4tb(){
	window.open('/superkids-reading-program/peek_into/L4-teacher-binder.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL4trk(){
	window.open('/superkids-reading-program/peek_into/L4-resource-kit.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
/* end grade 1 peek */

/* grade 2 peek */

function peekL5sb2(){
	window.open('peek_into/L5-student-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL5super2(){
	window.open('peek_into/L5-super-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL5book2(){
	window.open('peek_into/L5-book-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL5write2(){
	window.open('peek_into/L5-write-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}

function peekL6sb2(){
	window.open('peek_into/L6-student-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL6super2(){
	window.open('peek_into/L6-super-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL6book2(){
	window.open('peek_into/L6-book-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL6write2(){
	window.open('peek_into/L6-write-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
function peekL6cursive2(){
	window.open('peek_into/L6-cursive-back.html', 'video',"height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no")
}
/* end grade 2 */


function pkInto(url) {
	newwindow=window.open(url, 'name', 'height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no');
	if (window.focus) {newwindow.focus()}
}
/* general popup */

function popUG(url) {
	newwindow=window.open(url, 'name', 'height=780,width=1000,status=yes,toolbar=no,menubar=no,location=no');
	if (window.focus) {newwindow.focus()}
}

/* tp - password list popup */

function popTP(url) {
	newwindow=window.open(url, 'name', 'height=650,width=800,status=yes,toolbar=no,menubar=no,location=no');
	if (window.focus) {newwindow.focus()}
}

/* game demos */
function launch(html) {
	var features = "dialog=yes,height=775,width=975,chrome=yes,directories=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no";
	var hwnd = window.open(html, "_new", features);
}
/* end game demos */

