function validate() {
  fn=fm.first_name.value;
  fn=fm.last_name.value;
  em=fm.email.value;

function isEmail(strValue){
  var objRegExp = /^[a-z0-9](.+)@[a-z0-9](.+)$/;
   return objRegExp.test(strValue);
}
function isLetters(strValue){
 return (strValue.replace(/[A-Za-z]/g,"") == "");
}
msg=new String("");
if (fn.length==0){
  msg+="First Name\n ";
}
if(!isLetters(fm.first_name.value)){
       alert("Please enter letters only for your first name.");
              fm.first_name.select();
}
if (fn.length==0){
  msg+="Last Name\n ";
}
if(!isLetters(fm.last_name.value)){
       alert("Please enter letters only for your last name.");
              fm.last_name.select();
}
if (em.length==0){
  msg+="E-mail\n ";
}
if(!isEmail(fm.email.value)){
	alert("Please enter a VALID email address.");
	event.returnValue=false;
	fm.email.focus();
}
if (msg.length>1){
  msg="The following fields are required:\n "+msg;
  alert(msg);
  //event.returnValue=false;
  return false;
} else {
	fm.action='emaillistAdd2.php';
	fm.submit();
  }
}


function get(str){
	return document.getElementById(str);
}
function getN(str){
	return document.getElementsByName(str);
}

function RunFoo()
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="885" height="235" align="middle">\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash/main.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" />\n');
    document.write('<embed src="flash/main.swf" quality="high" width="885" height="235" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />\n');
    document.write('</object>\n');
}
function RunFoo2()
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="700" height="467" align="middle">\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash/vtour.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" />\n');
    document.write('<embed src="flash/vtour.swf" quality="high" width="700" height="467" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />\n');
    document.write('</object>\n');
}
function RunFoo300()
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="62" height="15" align="middle">\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash/xspf_player_old300.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" />\n');
    document.write('<embed src="flash/xspf_player_old300.swf" quality="high" width="62" height="15" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />\n');
    document.write('</object>\n');
}
function RunFooD()
{
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="450" height="395" align="middle">\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash/50vid.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" />\n');
    document.write('<embed src="flash/50vid.swf" quality="high" width="450" height="395" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />\n');
    document.write('</object>\n');
}



var TheSeparator = "/";
var TheSeparator2 = ", ";
var ShowDay ="yes";
var Days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var TheDate = new Date();

var TheWeekDay = TheDate.getDay();
var Day ="";
if (ShowDay == "yes"){
    Day = Days[TheWeekDay];
    Day += "";}

var TheMonth = TheDate.getMonth() + 1;
if (TheMonth < 10) TheMonth = "0" + TheMonth;

var TheMonthDay = TheDate.getDate();
if (TheMonthDay < 10) TheMonthDay = "0" + TheMonthDay;

var TheYear = TheDate.getYear();
if (TheYear < 1000) TheYear += 1900;

var D = "";
D += TheYear;


//MAKE COLUMNS EQUAL ON SUBPAGES
function P7_colH(){
 var i,oh,hh,h=0,dA=document.p7eqc,an=document.p7eqa;if(dA&&dA.length){
 for(i=0;i<dA.length;i++){dA[i].style.height='auto';}for(i=0;i<dA.length;i++){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=0;i<dA.length;i++){if(an){
 dA[i].style.height=h+'px';}else{P7_eqA(dA[i].id,dA[i].offsetHeight,h);}}if(an){
 for(i=0;i<dA.length;i++){hh=dA[i].offsetHeight;if(hh>h){
 dA[i].style.height=(h-(hh-h))+'px';}}}else{document.p7eqa=1;}
 document.p7eqth=document.body.offsetHeight;
 document.p7eqtw=document.body.offsetWidth;}
}
function P7_eqT(){
 if(document.p7eqth!=document.body.offsetHeight||document.p7eqtw!=document.body.offsetWidth){
 P7_colH();}
}
function P7_equalCols(){
 if(document.getElementById){document.p7eqc=new Array;for(var i=0;i<arguments.length;i++){
 document.p7eqc[i]=document.getElementById(arguments[i]);}setInterval("P7_eqT()",10);}
}
function P7_eqA(el,h,ht){
 var sp=2,inc=100,nh=h,g=document.getElementById(el),oh=g.offsetHeight,ch=parseInt(g.style.height);
 ch=(ch)?ch:h;var ad=oh-ch,adT=ht-ad;nh+=inc;nh=(nh>adT)?adT:nh;g.style.height=nh+'px';
 oh=g.offsetHeight;if(oh>ht){nh=(ht-(oh-ht));g.style.height=nh+'px';}
 if(nh<adT){setTimeout("P7_eqA('"+el+"',"+nh+","+ht+")",sp);}
}

function loadCurves(){
	settings3 = {
          tl: { radius: 3 },
          tr: { radius: 3 },
          bl: { radius: 0 },
          br: { radius: 0 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
	}
	var myBoxObjectMain = new curvyCorners(settings3, "curve3");
	myBoxObjectMain.applyCornersToAll();
}

function tDisplay(id){
	var divs = document.getElementsByTagName("div");
	var tbl = get("lowerBoxInner");
	var theRow = (tbl.firstChild,"row1");

    for(var x=0;x<divs.length;x++){
	var d = divs[x];
	if ((theRow == 'row1') && (get(d.id).style.display != 'none' || get(d.id).style.display != '')){
		get(id).style.display = 'block';
	} else {
		get(d.id).style.display = 'none';
	}
    }
}



function createXHR(){
	var xhr;
	try{
		xhr = new ActiveXObject("MSXML2.XMLHTTP");
	}catch(e){
		try{
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(E){
			xhr=false;
		}
	}
	if(!xhr && typeof XMLHttpRequest != 'undefined'){
		xhr= new XMLHttpRequest();
	}
	return xhr;
}
function setDiv(){
	if (xhr.readyState == 4){
		var res = xhr.responseText;
		l = getN("frm").length -1;
		get('frm').innerHTML = res;
		get('mp3player').style.width = '852px';
		//get('QE_Toolbar').reload(true);
	}
}
function getContents(file){
	xhr = createXHR();
	xhr.onreadystatechange = setDiv;
	xhr.open("GET","sub1.php?tvid=" + file);
	xhr.send(null);
}
function getContents2(file){
	xhr = createXHR();
	xhr.onreadystatechange = setDiv;
	xhr.open("GET","sub2.php?tvid=" + file);
	xhr.send(null);
}


function openFP(){
	SecWin = window.open('fps.html','SecWin','width=700,height=467,toolbar=no,status=no,resizable=no,scrollbars=no,location=no,directories=no,menubar=no');return false;
}