function setSearchCriteria() {

	var HTMLString = '';
	var criteriaValue = document.searchForm.searchBy.value;
//	var criteriaValue = document.getElementById("searchBy").value;

/*
1 == title
2 == actors
3 == directors
*/
	if ('-1' == criteriaValue) {
		HTMLString = 
			' <td height="30" valign="middle" class="bodyTextSm" align="left">' +
			'<select name="movieTypeId" class="formInput">' +
			'<option value="-1">ALL</option>' + 
			'<option value="2">DVD</option>' + 
			'<option value="3">BLU-RAY</option>' + 
			'</select>' + 	
			'</'+'td>';
	}
	else {
		HTMLString = '&nbsp;';
	}
	
	document.getElementById("searchCriteria").innerHTML = HTMLString;
}

function keypressevent() {
   if (event.keyCode == 10 || event.keyCode == 13) {
       document.searchForm.submit();
/*
      if (typeof document.searchForm.onsubmit == 'function') {
      }
      
      event.returnValue = false;
   } else {
      event.returnValue = true;
*/
   }
}
function categorySubmit()
{
	var categoryId = document.forms[1].categoryId.value;
	if (categoryId !='-1'){
		document.forms[1].submit();
	} else {
		return true;
	}
	
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,menubar=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion)>= 4) { win.window.focus(); }
}


function NewWindow2(mypage, myname, w, h, scroll, wint,winl) {
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,menubar=yes,setZOptions=alwaysRaised'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion)>= 4) { win.window.focus(); }
}

//no menubar
function NewWindow3(mypage, myname, w, h, scroll,wint,winl) {
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,menubar=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion)>= 4) { win.window.focus(); }
}

//no menubar
function currentWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable,menubar=no'
win = window.open(mypage, myname, winprops)
self.close();
if (parseInt(navigator.appVersion)>= 4) { win.window.focus(); }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  var winprops=',scrollbars=yes';
  window.open(theURL,winName,features+winprops);
}

