function searchfor(formobj, page_link) {
	term = formobj.search.value
	if (!term) {
		alert("Please enter a search term");
		return (false);
	}
	term = replace2(term, "  ", " ");
	term = replace2(term, "  ", " ");
	term = replace2(term, "  ", " ");
	term = replace2(term, " ", "-");
	term = trim(term);
	term = term.toLowerCase();
	term = page_link + term + "/";
	location.href= term;
	return(false);
}

function replace2(string,text,by) {
// Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace2(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}

function trim(s) {
  while (s.substring(0,1) == ' ') {
    s = s.substring(1,s.length);
  }
  while (s.substring(s.length-1,s.length) == ' ') {
    s = s.substring(0,s.length-1);
  }
  return s;
}	 

function open_comments(video){window.open('/comments.php?video=' + video, 'comments', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=500,height=525') ;}
function open_partners(){window.open('/partners.php', 'partners', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=500,height=320') ;}
function open_videoalerts(){window.open('/videoalerts.php', 'videoalerts', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=444,height=430') ;}
function open_contact(){window.open('/contact.php', 'contact', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=444,height=430') ;}
function open_send(id){window.open('/send.php?id=' + id, 'send', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=475,height=522') ;}
function open_popup(id){window.open('/popup.php?id=' + id, 'popup', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=475,height=527') ;}
function open_sendstream(){window.open('/sendstream.php', 'sendstream', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=475,height=522') ;}
function open_sendmoviefd(){window.open('/sendmoviefd.php', 'sendmoviefd', 'left=0,top=0,menubar=0,location=0,scrollbars=1,resizable=1,status=0,width=475,height=522') ;}

function checkform() {
  var wherecheck = 1;
  for (i=0;i<4;i++) {
    if (document.form1.whereFrom[i].checked) wherecheck=0; }
    if (document.form1.name.value == '') {alert ('Please enter your name');}
    else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.form1.email.value)) {alert ('Please enter a valid email address');}
    else if (document.form1.subject.value == '') {alert ('Please enter your reason for contact');}
    else if (document.form1.message.value == '') {alert ('Please type your message');}
    else if (wherecheck) { alert ('Please select how you found us');}
    else {document.form1.submit();}
}  



function copyurl()
{document.Form2.url.focus();
document.Form2.url.select();
CopiedTxt = document.selection.createRange();
CopiedTxt.execCommand("Copy");}

function copyembed()
{document.Form3.embed.focus();
document.Form3.embed.select();
CopiedTxt = document.selection.createRange();
CopiedTxt.execCommand("Copy");}


function addfav(){
if (document.all){
window.external.AddFavorite(location.href, document.title);
}else if (window.sidebar){
window.sidebar.addPanel(document.title, location.href, "");
}
}


/* video alerts email sign up form */
<!-- Begin
function emailCheck (emailStr) {
var checkTLD=1;
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
var emailPat=/^(.+)@(.+)$/;
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
var matchArray=emailStr.match(emailPat);

if (matchArray==null) {
alert("Email address seems incorrect (try again)");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];
for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}
if (user.match(userPat)==null) {
alert("The username doesn't seem to be valid.");
return false;
}
var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
return false;
   }
}
return true;
}
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("The domain name does not seem to be valid.");
return false;
   }
}
if (checkTLD && domArr[domArr.length-1].length!=2 &&
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The address must end in a well-known domain or two letter " + "country.");
return false;
}
if (len<2) {
alert("This address is missing a hostname!");
return false;
}
return true;
}
//  End -->

function eq(){for(var i=1;i<=16;i++){if(document.getElementById('smenu'+i)){document.getElementById('smenu'+i).style.display='none';}}};function t(id){var d=document.getElementById(id);if(d.style.display!="block"){eq();if(d){d.style.display='block';}}else{d.style.display="none";}}


function search_google(sengine, searchterm) {
if (sengine == "m" && searchterm == "") {
alert('Please enter a movie title or TV show');
return false;
}
if (sengine == "y" && searchterm == "") {
alert('Please enter a song, band or person\'s name');
return false;
}
if (sengine == "w" && searchterm == "") {
alert('Please enter a search term');
return false;
}
document.getElementById("goog_" + sengine).q.value = searchterm;
document.getElementById("goog_" + sengine).submit();
}



<!--

if (parent.frames.length > 0) {
    parent.location.href = self.document.location
}


//-->