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'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function doOpen(url,target){
var w = window.open(url,target,"width=450,height=400");
w.focus();
return false; //cancels href
}
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=1, status=1, toolbar=0, menu=0';
win = window.open(mypage, myname, winprops);
if (win && parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function doClear(theText) {
   if (theText.value == 'Search the web' || theText.value == 'Search Movies' || theText.value == 'Search Music Info' || theText.value == 'Search Movie Info')
   { theText.value = "" }
    }

function highlightCurrent(current){
cat=document.getElementById(current);
cat.className="highlight";
}


function add2fav(vid, user)
{
  if (!user)
  {
     alert("Please Login to Add this video to your Favorites");
  }

  else
  {
   if (window.XMLHttpRequest)
    { // Mozilla, Safari, ...
      request2 = new XMLHttpRequest();
    }
  else if (window.ActiveXObject)
    { // IE
      request2 = new ActiveXObject("Msxml2.XMLHTTP");
    }

  request2.open("GET",'/video/add2fav.php?vid='+vid+'&user='+user);
  request2.send(null);

  hideObj("no_fav");
  unhideObj("add_fav");


  return false;
}

}





function openplayer(publishedid,list,feedsrc){
	if (feedsrc == "vd")
	{
		window.name = 'videodetective';
		var PlayerUrl = 'http://www.videodetective.com/player.asp?SRC=BROADCASTER&customerid=92204&';
		var Win = window.open(PlayerUrl + "PublishedId=" + publishedid + "&List=" + list,"Player",'width=740,height=410,resizable=1,scrollbars=no,menubar=no,status=no' );
	}

	if (feedsrc == "sf")
	{
		window.name = 'singingfool';
		var PlayerUrl = 'http://www.singingfool.com/player.asp?SRC=BROADCASTER&customerid=99076&';
		var Win = window.open(PlayerUrl + "PublishedId=" + publishedid + "&List=" + list,"Player",'width=740,height=390,resizable=1,scrollbars=no,menubar=no,status=no' );
	}
	if (feedsrc == "ap")
	{
		window.name = 'ap video';
		var Win = window.open(publishedid);
	}

}
function mklist(lname,category){

	theform = d.getElementById('searchForm');
	theform.category.options.length = 0;
	thelist = eval('optlist_'+lname);
	//theform.s.value = eval('boxtext_'+lname);
	for(i=0; i<thelist.length; i++)
	{
		theform.category.options[theform.category.options.length] = new Option(thelist[i][0],thelist[i][1]);
	}
}



// each data source gets an array
// [0] = list name
// [1] = name search engine expects
bikini = ['Bikini','broadcaster_bk'];
ap_news = ['AP News','ap_news'];
cinema_adult = ['CinemaNow','cinema_adult'];
cinema = ['On-Demand Video','cinema'];
broadcaster = ['Video Library','broadcaster'];
weird = ['Weird Clips','weird'];
dvde = ['DVD Store','dvde'];
passport = ['PassportX','skeletor'];
advde = ['DVD Empire','advde'];
all_adult = ['All Databases','all_adult'];
all = ['All AMDB','all'];
album = ['Album Info','album'];
a_name = ['Artist Info','name'];
track = ['Song Info','track'];
m_name = ['Actor and Crew Info','name'];
dvd = ['DVD Info','dvd'];
movies = ['Movie Info','movie'];
upload = ['Upload Comm.','upload'];


// each section has a group of db's - Parental Lock On
optlist_web = [all,broadcaster,weird,cinema,ap_news,dvde,upload];
optlist_videos = [all,broadcaster,weird,cinema,dvde,upload];
optlist_music = [a_name,album,track];
optlist_movies = [movies,m_name,dvd];


boxtext_videos = 'Search Movies';
boxtext_web ='Search the web';
boxtext_images = 'Search Images';
boxtext_music = 'Search Music Info';
boxtext_movies = 'Search Movie Info';