var s1 = new SWFObject('audio/player-viral.swf','player','300','20','9');
function play(name){
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','&file=audio/'+name+'.mp3&autostart=true');
s1.write('player');
}
var currCol = "";
function highlight(name){
	for (var x = 1 ; x < 7 ; x++){
		document.getElementById('link'+x).style.color = "#cccccc";
	}	
	document.getElementById(name).style.color = "#000000";
	currCol = document.getElementById(name).style.color;
}

function hoverOver(name){
	currCol = document.getElementById(name).style.color;	
	document.getElementById(name).style.color = "#eeeeee";
}
function hoverOff(name){	
	document.getElementById(name).style.color = currCol;
}

function isEmpty(strfield1, strfield2, strfield3) {


	//change "field1, field2 and field3" to your field names
	strfield1 = document.forms[0].name.value 
	strfield2 = document.forms[0].email.value
	strfield3 = document.forms[0].comments.value

	  //name field
	    if (strfield1 == "" || strfield1 == null || !isNaN(strfield1) || strfield1.charAt(0) == ' ')
	    {
	    alert("\"Name\" is a mandatory field and should not be a number.\nPlease amend and retry.")
	    return false;
	    }

	  //url field 
	    if (strfield2 == "" || strfield2 == null || strfield2.charAt(0) == ' ')
	    {
	    alert("\"Your email address\" is a mandatory field.\nPlease amend and retry.")
	    return false;
	    }

	  //title field 
	    if (strfield3 == "" || strfield3 == null || strfield3.charAt(0) == ' ')
	    {
	    alert("\"Comments\" is a mandatory field.\nPlease amend and retry.")
	    return false;
	    }
	    return true;
	}


	//function to check valid email address
	function isValidEmail(strEmail){
	  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
	  strEmail = document.forms[0].email.value;

	   // search email text for regular exp matches
	    if (strEmail.search(validRegExp) == -1) 
	   {
	      alert('A valid e-mail address is required.\nPlease amend and retry');
	      return false;
	    } 
	    return true; 
	}

function check(form){
	if (isEmpty(form.name)){
	  if (isEmpty(form.email)){
	    if (isEmpty(form.comments)){
			if (isValidEmail(form.email)){
			  return true;
			}
		  }
	  }
	}
	return false;
}

function init(){
	document.getElementById('stripNav0').style.display='none';
	
	if(document.getElementById) {
		alert('sdsd');// avoid problem with older browsers versions.
		var elem = document.getElementById('stripNav0');
			if (elem) { elem.style.display = "none"; }	
  }
}
	