function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//preload images
function preloadRollovers() {
	MM_preloadImages('http://cdn.umg3.net/iamduffy/images/contact/submit-button-ON.gif', 'http://cdn.umg3.net/iamduffy/images/discog/buy-now_ON.gif', 'http://cdn.umg3.net/iamduffy/images/gigs/buy-tickets-ON.gif', 'http://cdn.umg3.net/iamduffy/images/news/viewMore_on.gif', 'http://cdn.umg3.net/iamduffy/images/signup/register-button-ON.gif', 'http://cdn.umg3.net/iamduffy/images/next.gif', 'http://cdn.umg3.net/iamduffy/images/prev.gif', 'http://cdn.umg3.net/iamduffy/images/nextOff.gif', 'http://cdn.umg3.net/iamduffy/images/prevOff.gif');
}



function submitRegForm() {
//alert(document.reg_form.countrycode.options[document.reg_form.countrycode.selectedIndex].value);
  // The fields are checked for blanks
  if ( document.reg_form.firstname.value   == "" ||
       document.reg_form.lastname.value   == "" ||
	   document.reg_form.countrycode.options[document.reg_form.countrycode.selectedIndex].value == "" ||
       //document.reg_form.countrycode.value  == "Select Country" ||
       document.reg_form.email.value  == "" )
  {
      alert( "You haven't completed the form.\nPlease ensure that all required fields are filled in." );
      return false;
  }

	// check for valid email address
	else if ( document.reg_form.email.value.length <= 6 ||
		  document.reg_form.email.value.indexOf ('@', 0) == -1 ||
		  document.reg_form.email.value.indexOf ('.', 0) == -1){
		  alert("Sorry, " + document.reg_form.email.value + " is not a valid Email Address.");
		   return false;
	} else { 
 		document.reg_form.submit();
		return true;
	}
}


function submitContactForm() {
//alert(document.reg_form.countrycode.options[document.reg_form.countrycode.selectedIndex].value);
  // The fields are checked for blanks
  if ( document.contact_form.subject.options[document.contact_form.subject.selectedIndex].value == "" ||
	   document.contact_form.name.value   == "" ||
       document.contact_form.message.value   == "" ||
	   
       //document.contact_form.countrycode.value  == "Select Country" ||
       document.contact_form.email.value  == "" )
  {
      alert( "You haven't completed the form.\nPlease ensure that all required fields are filled in." );
      return false;
  }

	// check for valid email address
	else if ( document.contact_form.email.value.length <= 6 ||
		  document.contact_form.email.value.indexOf ('@', 0) == -1 ||
		  document.contact_form.email.value.indexOf ('.', 0) == -1){
		  alert("Sorry, " + document.contact_form.email.value + " is not a valid Email Address.");
		   return false;
	} else { 
 		document.contact_form.submit();
		return true;
	}
}

