/**
 * Oeffnet die URL eines Test in einer angegebenen Groesse
 **/
function openGoalwallshooting(site) {

	var w = 550;
	var h = 400;
	var x = screen.availWidth/2-w/2;
	var  y = screen.availHeight/2-h/2;
	var popupWindow = window.open('http://www.skppsc.ch/games/goalwallshooting','tests','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y+',scrollbars=no');
}

/**
 * Oeffnet die URL eines Test in einer angegebenen Groesse
 **/
function openTests(site) {

	var w = 690;
	var h = 520;
	var x = screen.availWidth/2-w/2;
	var  y = screen.availHeight/2-h/2;
	var popupWindow = window.open(site,'tests','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y+',scrollbars=no');
}

/**
 * Oeffnet die URL eines Test in einer angegebenen Groesse
 **/
function openFrappr() {

	var site = '';
	var w = 320;
	var h = 320;
	var x = screen.availWidth/2-w/2;
	var  y = screen.availHeight/2-h/2;
	var popupWindow = window.open('http://www.skppsc.ch/blog/index.php/weblog/frappr_popup','tests','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y+',scrollbars=no');
}

/**
 * Oeffnet die URL eines Test in einer angegebenen Groesse
 **/
function openPopup(site) {

	var w = 690;
	var h = 560;
	var x = screen.availWidth/2-w/2;
	var  y = screen.availHeight/2-h/2;
	var popupWindow = window.open(site,'tests','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y+',scrollbars=no');
}

function setAlt2Text() {
        if (document.all && !window.opera) {
                var nodeId = 1;
        } else {
                var nodeId = 3;
        }

        for (i=0; i < document.getElementsByTagName("a").length;i++) {
                if (document.getElementsByTagName("a")[i].className == 'highslide') {
                        var pTag = document.createElement("p");
                        var text = document.createTextNode( document.getElementsByTagName("a")[i].childNodes[ nodeId ].alt );
                        pTag.appendChild(text);
                        document.getElementsByTagName("a")[i].parentNode.appendChild(pTag);
                }
        }
}

