/////////////////////////////////////////////////////////////////

// determine which remote control key the user selected 
function onKeyDown(){
	try{	
		switch (window.event.keyCode) {
			case 13:  // UP button was selected.
				doSearch();
			break;
		}	
	}catch(e){}
}
document.onkeydown = onKeyDown;

function doSearch(searchStr){
	//searchStr = $F('searchStr');
	if(searchStr != ""){
		try{
			var obj = getObject("movieObj");
			obj.doSearch(searchStr);
		}catch(e){
			//alert(e);	
		}
	} else {
		alert('You have to enter a search string.');		
	}
}
///OPEN LOGIN METHOD
function openLog(url, videoURL){

    nextPlay = videoURL;
	newWin = window.open(url, 'login','width=780,height=550,scrollbars=yes');
}

var writeSchedule;
function populateSchedule(channelId){
	try {
		if(writeSchedule == undefined){
			writeSchedule = new classWriteSchedule();
			//writeSchedule.ElementPlayList = "clipsHolder";
			//writeSchedule.ElementNowPlaying = "nowPlayingHolder";
			//writeSchedule.ElementRelatedContent = "relVidHolder";
			writeSchedule.channel = channelId;
		} else {			
			writeSchedule.channel = channelId;			
		}
		writeSchedule.resetTitle();
	}
	catch(e){}	
}
