// function for handling the episode guide dropdown

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}


// function for login and bbs

function talkcity(bbslink) {

bbswindow=window.open(bbslink,"","personalbar=no,menubar=yes,toolbar=no,location=no,resizable=yes,scrollbars=yes,status=yes,height=500,width=710")
}


// function for popup poll results

function popUpResultsWin(height, width, url) {
window.open(
            "",
            "PollResults",
            "width="+width+",height="+height+",RESIZABLE=NO,SCROLLBARS=YES"
     );
}


// functions for video

function seriesVideo(formX) {
	var num = eval("document." + formX + ".menudo.selectedIndex");
	var infostring = eval("document." + formX + ".menudo.options[num].value");
	if (infostring == "blank") {
		alert("Choose a clip first from the pulldown menu, then click your player to view!") ;
		return;
	}
	var vplayWin = window.open('/scripts/video/vidplayer.html?movie=' + infostring,'vplay','width=700,height=515,status=yes');
}

// function for kostas flash objects


var extWin;

function openWin(url,w,h){
	var x = (screen.width - w)/2;
	var y = (screen.height - h)/3;
	if(typeof(extWin)=="undefined" || extWin.closed==true){
		extWin = window.open(url,"external","width="+w+",height="+h+",left="+x+",top="+y+",toolbar=no,location=no,menubar=no,status=no,scrollbars=no,resizable=no");
		if(extWin.opener == null) extWin.opener = window;
		extWin.w = w;
		extWin.h = h;
	} else {
		if(w != extWin.w || h != extWin.h){
			extWin.resizeTo(w,h);
			extWin.moveTo(x,y);
			extWin.w = w;
			extWin.h = h;
		}
		if(extWin.location != url) extWin.location = url;
		extWin.focus();
	}
}

// generic open window script

function openWindow(theURL,winName,features) {

window.open(theURL,winName,features);

}
