function activeLink(objLink)
{ 
objLink.className= 'activeVid'; 
//alert(objLink.className);

} 
function checkpdf()
{ 
if (document.pdf_files.name1.value == '')
  {
    alert('Please Enter Title');
    document.pdf_files.name1.focus();
    return (false);
  }
 
  else return true;
} 
function checkpdfedit()
{ 

  if (document.files1.name.value == '')
  {
    alert('Please Enter Title');
    document.files1.name.focus();
    return (false);
  }
  else return true;
} 
function checkmusic()
{ 
if (document.music_files.name1.value == '')
  {
    alert('Please Enter Title');
    document.music_files.name1.focus();
    return (false);
  }
  if (document.music_files.name2.value == '')
  {
    alert('Please Enter Title');
    document.music_files.name2.focus();
    return (false);
  }
 
  
  else return true;
} 

function checkmusicedit()
{ 

  if (document.files1.name.value == '')
  {
    alert('Please Enter Title');
    document.files1.name.focus();
    return (false);
  }
  
  else return true;
} 


function alertbox()
{
var fname=document.category.artist.value;

if(fname=="")
{
alert("Please select one category ");
return false;
}
else return true;
}

function checks()
{
  if (document.reg.partner_email.value == '')
  {
    alert('Please enter E-mail Address');
    document.reg.partner_email.focus();
    return (false);
  }
  if (document.reg.partner_pass.value=='')
  {
    alert('Please enter password');
    document.reg.partner_pass.focus();
    return (false);
  }
  return (true);
}

function showdiv()
{
document.getElementById('news').style.display='block';
}
function showpic(path,thumb,type)
{
if(type=='image')
document.getElementById('pic').src='upload/image_small/'+path;
else
document.getElementById('pic').src='upload/image_small/'+thumb;
}

function checkAll()
{
  if (document.frm.fname.value == '')
  {
    alert('Please enter your first name');
    document.frm.fname.focus();
    return (false);
  }
 if (document.frm.lname.value=='')
  {
    alert('Please enter your last name');
    document.frm.lname.focus();
    return (false);
  }
  if (document.frm.emailadd.value == '')
  {
    alert('Please enter your email address');
    document.frm.emailadd.focus();
    return (false);
  }
  if (document.frm.remail.value == '')
  {
    alert('Please retype your email address');
    document.frm.remail.focus();
    return (false);
  }
  if (document.frm.emailadd.value!=document.frm.remail.value)
  {
    alert('Please retype correct email address');
    document.frm.remail.focus();
    return (false);
  }
  if (document.frm.pass1.value=='')
  {
    alert('Please enter your password');
    document.frm.pass1.focus();
    return (false);
  }
  if (document.frm.repass.value == '')
  {
    alert('Please retype your password');
    document.frm.repass.focus();
    return (false);
  }
  if (document.frm.pass1.value!=document.frm.repass.value)
  {
    alert('Please retype correct password');
    document.frm.repass.focus();
    return (false);
  }
  if (document.frm.address.value=='')
  {
    alert('Please enter your address');
    document.frm.address.focus();
    return (false);
  }
  if (document.frm.city.value == '')
  {
    alert('Please enter your city');
    document.frm.city.focus();
    return (false);
  }
  if (document.frm.country.value == '')
  {
    alert('Please enter your country');
    document.frm.country.focus();
    return (false);
  }
 /* if (document.frm.state.value=='')
  {
    alert('Please enter your state');
    document.frm.state.focus();
    return (false);
  }*/
  return (true);
}

function disp_confirm(artist_id)
{
var r=confirm("Are you sure you want to delete?");
if (r==true)
  {
  return artist_check(artist_id);
  }
else
  {
 return false;
  }
}

function submenu()
{
document.getElementById('div1').style.display='block';
}

function artist_check(artist_id)
{
if(artist_id=="")
{
alert("Please select an artist first");
return false;
}
else
return true;
}



function page()
{
location.replace("http://localhost/cuban/applicant_login.php");
}
function xpress() {
document._xclick.amount.value=document._xclick.noc.value;
//document._xclick.item_number.value=document._xclick.org_name.value;
}
function xpress1() {
//document._xclick.amount.value=document._xclick.noc.value;
document._xclick.item_number.value=document._xclick.org_name.value;
}
 function isInteger (s)
   {
      var i;

      if (isEmpty(s))
      if (isInteger.arguments.length == 1) return 0;
      else return (isInteger.arguments[1] == true);

      for (i = 0; i < s.length; i++)
      {
         var c = s.charAt(i);

         if (!isDigit(c)) return false;
      }

      return true;
   }

   function isEmpty(s)
   {
      return ((s == null) || (s.length == 0))
   }

   function isDigit (c)
   {
      return ((c >= "0") && (c <= "9"))
   }
function confirmation1()
{
if(document.abc.org_name.value=="")
{
alert('Please enter your name or your organization name');
    document.abc.org_name.focus();
    return (false);
	}
if(document.abc.donation_date.value=="")
{
alert('Please enter your donation date');
    document.abc.donation_date.focus();
    return (false);
	}
if(document.abc.amount.value=="")
{
alert('Please enter your donation amount');
    document.abc.amount.focus();
    return (false);
	}
 var o = document.abc.amount;
     
if(isInteger(o.value)==false)
{
alert('Please enter numeric amount');
    document.abc.amount.focus();
    return (false);
	}
return true;
}

function join_check()
{
if(document.join_today.mem_name.value=="")
{
alert('Please enter name');
    document.join_today.mem_name.focus();
    return (false);
	}
if(document.join_today.pheve.value=="")
{
alert('Please enter phone number');
    document.join_today.pheve.focus();
    return (false);
	}
if(document.join_today.amount.value=="")
{
alert('Please enter amount');
    document.join_today.amount.focus();
    return (false);
	}
var o = document.join_today.amount;
     
if(isInteger(o.value)==false)
{
alert('Please enter numeric amount');
    document.join_today.amount.focus();
    return (false);
	}
	var a=0;
var len=document.join_today.RadioGroup2.length;
for(var i=0; i<len; i++)
{
if(document.join_today.RadioGroup2[i].checked==false)
{
a+=1;
}
}
if(a==3)
{
alert('Please select a membership type first');
document.getElementById('amount').value='';
return false
}
for(var i=0; i<len; i++)
{
if(document.join_today.RadioGroup2[i].checked==true)
{
var type=document.join_today.RadioGroup2[i].value;
}
}

if(type=='friends')
{
if(document.getElementById('amount').value < 100 || document.getElementById('amount').value >500 )
{
alert('Sorry, you have to type an amount between the $100 and $500');
document.getElementById('amount').value='';
document.getElementById('amount').focus();
return false
}
}

if(type=='acircle')
{
if(document.getElementById('amount').value < 500 || document.getElementById('amount').value >2500 )
{
alert('Sorry, you have to type an amount between the $500 and $2,500');
document.getElementById('amount').value='';
document.getElementById('amount').focus();
return false
}
}

if(type=='ccircle')
{
if(document.getElementById('amount').value < 2500)
{
alert('Sorry, you have to type an amount large than $2,500');
document.getElementById('amount').value='';
document.getElementById('amount').focus();
return false
}
}
return true;
}

function amount_check()
{
var a=0;
var len=document.join_today.RadioGroup2.length;
for(var i=0; i<len; i++)
{
if(document.join_today.RadioGroup2[i].checked==false)
{
a+=1;
}
}
if(a==3)
{
alert('Please select a membership type first');
document.getElementById('amount').value='';
return false
}
for(var i=0; i<len; i++)
{
if(document.join_today.RadioGroup2[i].checked==true)
{
var type=document.join_today.RadioGroup2[i].value;
}
}

if(type=='friends')
{
if(document.getElementById('amount').value < 100 || document.getElementById('amount').value >500 )
{
alert('Sorry, you have to type an amount between the $100 and $500');
document.getElementById('amount').value='';
document.getElementById('amount').focus();
return false
}
}

if(type=='acircle')
{
if(document.getElementById('amount').value < 500 || document.getElementById('amount').value >2500 )
{
alert('Sorry, you have to type an amount between the $500 and $2,500');
document.getElementById('amount').value='';
document.getElementById('amount').focus();
return false
}
}

if(type=='ccircle')
{
if(document.getElementById('amount').value < 2500)
{
alert('Sorry, you have to type an amount large than $2,500');
document.getElementById('amount').value='';
document.getElementById('amount').focus();
return false
}
}

}

function focuson()
  { document.form1.aname.focus()}
 
function check()
	{
	if(document.form1.aname.value=='')
		{
		alert("Please enter your Name");
		document.form1.aname.focus();
		return false;
		}
	if(document.form1.email.value=='')
		{
		alert("Please enter your E-mail address");
		document.form1.email.focus();
		return false;
		}
	if(document.form1.number.value==0)
		{
		alert("Please enter varification code");
		document.form1.number.focus();
		return false;
		}
	}
	
function check_newsletter()
{
	
	if( document.frmNewsLetter.selectTemplate.value == '')
	{
		alert("Please select one PDF newsletter");
		document.frmNewsLetter.selectTemplate.focus();
		return false;
	}
	else return true;
	
}



