function popitup(url,name,width,height,left,top,screenX,screenY)
{
        newwindow=window.open(url,name, "width="+width+",height="+height+",left="+left+",top="+top+",screenX="+screenX+",screenY="+screenY+",resizable=yes");
}

function addFavs(url)
{
        var status = "<?php echo $_SESSION['status']; ?>";
        if (status=='ok')
{
        newwindow2=window.open(url,"addFav", "width=300,height=30,toolbar=no,scrollbars=yes,resizable=yes");
        newwindow2.focus()
        }
        else
        {
        alert ("Plase Login to Add to Favorites");
        }
}

function formCheck(){
        var status = "<? echo $_SESSION['status']; ?>";
        if (status=='ok')
        {
        return true;
        }
        else
        {
        alert("Please Login To Upload");
        return false;
        }
}
function checkPosts(){
        if (document.post_read.poster.value=="")
    {
        alert("Please Login");
        return false;
        }
        if (document.post_read.comment.value=="")
    {
        alert("Please Enter Your Comment");
        return false;
        }
}
function updateParent()
{
	kwd=document.search_form.kwd.value;
	newLink="search.php?search="+kwd;
	opener.document.location = newLink;
}

function submitPopup(myForm)
{
		var w = window.open('about:blank','Popup_Window');
        myForm.target = 'Popup_Window';
		return true;
}
function registerCheck(){

        re=/^\w+$/
        if ((re.test(members.login_name.value))&(re.test(members.pass.value))&(re.test(members.pass1.value)))
    {
        return true;
        }
        else
        {
        alert("Login name and password must be only 0-20 and/or a-z");
        return false;
        }
}
function checkArtist(){
  if (document.upload_form.artistList.value=="")
    {
        alert("Please Type Video Description");
        return false
        }
}
