﻿/*--------------Javascript for Transcript pop ups-----------------------*/
function transcriptlink(){

    var p = getElementsByClass('popup');
	for(i=0; i<p.length; i++) {
	    var link = p[i].getElementsByTagName("a");
	    for (j=0;j<link.length;j++) {
	        //alert(link[j].href);
            link[j].onclick = function() {
                myPopup2(this.href);
                return false;
            }
        }
    }
}
addLoadListener(transcriptlink);

function getElementsByClass( searchClass, domNode, tagName) {
	if (domNode == null) domNode = document;
	if (tagName == null) tagName = '*';
	var el = new Array();
	var tags = domNode.getElementsByTagName(tagName);
	var tcl = " "+searchClass+" ";
	for(i=0,j=0; i<tags.length; i++) {
		var test = " " + tags[i].className + " ";
		if (test.indexOf(tcl) != -1)
			el[j++] = tags[i];
	}
	return el;
}
function myPopup(path) {
var h=(document.all)? 416:418;
var w=(document.all)? 350:333;
window.open( path, "myWindow", 
"status = 1, height = " + h + ", width = " + w + ", resizable = 0, scrollbars = 1")
}
function myPopup2(path) {
var h=(document.all)? 548:548;
var w=(document.all)? 370:365;
window.open(path,"myWindow","status=0,height="+h+",width="+w+",resizable=0,scrollbars=1")
}
