var d = document;

// generic popup window
function kwb_openWindow(URL,specs) {
	window.open(URL,"kids_wb",specs)
}
//Popup For Show Schedule
function pop_sched() {
	contentWin = window.open('http://tvlistings.zap2it.com/partners/index.asp?partner_id=kwb','popup2','height=390,width=650,scrollbars=auto,resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,left=0,top=0"');
	contentWin.focus();
	return;
}

//Popup For Privacy Pages
function openPrivacy(url) {
        var Win = window.open(url,"displayPrivacy",'width=440,height=330,resizable=0,scrollbars=no,menubar=no,status=no');
		Win.focus();
}

//Popup For Video
function openVideo(url) {
        var Win = window.open(url,"displayVideo",'width=343,height=340,resizable=0,scrollbars=no,menubar=no,status=no');
		Win.focus();
}

//Popup For 440x330 Asset
function open440(url) {
        var Win = window.open(url,"displayGeneric",'width=440,height=330,resizable=0,scrollbars=no,menubar=no,status=no');
		Win.focus();
}

//Popup For Sweepstakes Rules
function openSweepstakesRules(url) {
        var Win = window.open(url,"displayRules",'width=460,height=400,resizable=0,scrollbars=yes,menubar=no,status=no');
		Win.focus();
}

//Image Rollover Script
function over(imgName, img_src) {
	d[imgName].src=img_src;
}

function out(imgName, img_src) {
	d[imgName].src=img_src;
}

//Preload Image Script
function preLoadMyImages() {
	arg=preLoadMyImages.arguments;
	imgs=new Array();
	i=imgs.length
	for(i=0; i<arg.length; i++)
	if (arg[i]!=0) {
		imgs[i]=new Image;
		imgs[i].src=location.host + arg[i];
	}
}

// **************** RIBBIT ARENA FUNCTIONS ********************

// popup for team sorter
function open_sorter(URL) {
	window.open(URL,"sorter","width=330,height=440");
}

// popup for user profile
function userProfile() {
	window.open("/web/RibbitArena/profile.jsp","profile","width=440,height=330");
}

// popup for user favorites
function userFavorites() {
	window.open("/web/RibbitArena/favoriteGames.jsp","profile","width=440,height=330");
}

// popup for password reminder
function passwordReminder(URL) {
	window.open(URL,"password","width=440,height=330");
}