var windowName = null;
var url = null;
var myWindow = null;
var saveWindow = new Array();
var i = 0

//example for calling popWindow would be 
//onClick="popWindow("/assessor/help.html","HelpWindow")
function popWindow(url,windowName) {

myWindow=window.open(url,windowName,"HEIGHT=250,WIDTH=250,toolbar=no,scrollbars=no,menubar=no,resizable=no,dependent,screenX=555,screenY=4");
myWindow.moveTo(250, 5)
saveWindow[i] = myWindow
i++;

if (myWindow || myWindow.open) {
myWindow.focus();
	}

}

function validateEform() {

    if (document.notification.elements[4].value != "" && document.notification.elements[5].value != "" && document.notification.elements[6].value != "" && document.notification.elements[7].value != "" && document.notification.elements[8].value != "" ){
        document.notification.submit();

    }else{
        alert("Please make sure you have all the fields filled.");    
    }

}



function popBigWindow(url,windowName) {

myWindow=window.open(url,windowName,"Height=150,Width=150,toolbar=no,scrollbars=no,menubar=no,resizable=no,dependent,screenX=555,screenY=4");
myWindow.moveTo(250, 5)
saveWindow[i] = myWindow
i++;

if (myWindow || myWindow.open) {
myWindow.focus();
	}

}

function popWindowGeneral(url,windowName, height, width) {
	myWindow=window.open(url,windowName,"Height="+height+",Width="+width+",toolbar=no,scrollbars=no,menubar=no,resizable=no,dependent,screenX=555,screenY=4");
	myWindow.moveTo(150, 50)
	saveWindow[i] = myWindow
	i++;

	if (myWindow || myWindow.open) {
		myWindow.focus();
	}

}

//you can use this function attached to a button
//be sure to use <body onUnload="closeMe()"> in your body tag
//this will close any window that was spawned from the original window
//if the user leaves the page

function closeMe() {

	for(i=0; i<saveWindow.length; i++) {
	if(saveWindow[i]) {
	saveWindow[i].close()
		}
	}
}

function closeOpener() {
	var myWindow
	if (myWindow) {
		myWindow.close()
		}
	} 


function selectLinks(sLinks) {
    var gotolinks = sLinks.options[sLinks.selectedIndex].value 
    if(gotolinks.length > 0) {
	   window.location = gotolinks;
	}
}
