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 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);
	}

}
