// JavaScript Document



function submitForm() {

if (document.form_message.name.value == "") {

    alert( "Please enter your name." );

    document.form_message.name.focus();

    return false ;

  }
  
  
  
 
 
 
 
  email = document.form_message.email.value

AtPos = email.indexOf("@")

StopPos = email.lastIndexOf(".")



if (AtPos == -1 || StopPos == -1) {

alert( "Please enter a valid email address, eg. myname@gmail.com" );

 document.form_message.email.focus();

    return false ;

}

 
  
  else if (document.form_message.wedding_date.value == "dd/mm/yyyy" || document.form_message.wedding_date.value == "") {

    alert( "Please enter the date of your wedding." );

    document.form_message.wedding_date.focus();

    return false ;

  }
 


 
  
 


 else if (document.form_message.hearofus.value == "") {

    alert( "Please leave a brief description of how you heard of us." );

    document.form_message.hearofus.focus();

    return false ;

  }
  
  
  
 else if (document.form_message.user_code.value == "" || document.form_message.user_code.value == "Type the code here please.") {

    alert( "Please enter the security code." );

    document.form_message.user_code.focus();

    return false ;

  }
  


//else {
//window.open('', 'foo', 'width=320,height=140,status=no,resizable=no,scrollbars=no');
//}

}






	
function submitBooking() {

if (document.form_booking.bname.value == "") {

    alert( "Please enter the Bride's name." );

    document.form_booking.bname.focus();

    return false ;

  }
  
  else if (document.form_booking.bnumber.value == "") {

    alert( "Please enter the Bride's number." );

    document.form_booking.bnumber.focus();

    return false ;

  }
  
  
  else if (document.form_booking.gname.value == "") {

    alert( "Please enter the Groom's name." );

    document.form_booking.gname.focus();

    return false ;

  }
  
  else if (document.form_booking.gnumber.value == "") {

    alert( "Please enter the Groom's number." );

    document.form_booking.gnumber.focus();

    return false ;

  }
  
  
   else if (document.form_booking.address.value == "") {

    alert( "Please enter the contact address." );

    document.form_booking.address.focus();

    return false ;

  }
  
 
  
  
   
   email = document.form_booking.email.value

AtPos = email.indexOf("@")

StopPos = email.lastIndexOf(".")



if (AtPos == -1 || StopPos == -1) {

alert( "Please enter a valid email address, eg. myname@gmail.com" );

 document.form_booking.email.focus();

    return false ;

}








  
  
  else if (document.form_booking.wedding_date.value == "") {

    alert( "Please enter the date of your wedding." );

    document.form_booking.wedding_date.focus();

    return false ;

  }
  

  
  else if (document.form_booking.address_venue.value == "") {

    alert( "Please enter the Venue address." );

    document.form_booking.address_venue.focus();

    return false ;

  }
  
  
 
  


 else if (document.form_booking.hearofus.value == "") {

    alert( "Please leave a brief description of how you heard of us." );

    document.form_booking.hearofus.focus();

    return false ;

  }
  
   else if (document.form_booking.tc.checked == false) {

    alert( "Please ensure that you have read the Terms & Conditions." );

    document.form_booking.tc.focus();

    return false ;

  }

  
 else if (document.form_booking.user_code.value == "" || document.form_booking.user_code.value == "Type the code here please.") {

    alert( "Please enter the security code." );

    document.form_booking.user_code.focus();

    return false ;

  }
  


//else {
//window.open('', 'foo', 'width=320,height=140,status=no,resizable=no,scrollbars=no');
//}

}








function submitSurvey() {

if (!(document.form_survey.enjoy1.checked || document.form_survey.enjoy2.checked)) {

    alert( "Please tell us if you've enjoyed using the site." );

    document.form_survey.enjoy1.focus();

    return false ;

  }
  
 else if (!(document.form_survey.friendly1.checked || document.form_survey.friendly2.checked)) {

    alert( "Please tell us if you think the site is user friendly." );

    document.form_survey.friendly1.focus();

    return false ;

  }
  
  
 
  
  else if (document.form_survey.showreel.selectedIndex == 0 || document.form_survey.showreel.value == "Please choose:") {

    alert( "Please can you tell us how you would rate the showreel." );

    document.form_survey.showreel.focus();

   return false ;

  }
  
  else if (!(document.form_survey.gallery1.checked || document.form_survey.gallery2.checked)) {

    alert( "Please tell us if you've visted the gallery and what you think of it." );

    document.form_survey.gallery1.focus();

    return false ;

  }
  
  
  
   else if (!(document.form_survey.testimonials1.checked || document.form_survey.testimonials2.checked)) {

    alert( "Please tell us if you've visted the testimonials page" );

    document.form_survey.testimonials1.focus();

    return false ;

  }
  
  
  
   else if (document.form_survey.work_comments == "") {

    alert( "Please can tell us what you think of our work" );

    document.form_survey.work_comments.focus();

    return false ;

  }
  
  
  
  
  
  
 else if (document.form_survey.importance.selectedIndex == 0 || document.form_survey.importance.value == "Please choose:") {

    alert( "Please can you fill out this menu choice." );

    document.form_survey.importance.focus();

   return false ;

  }
  
  
  
  
  
  
  else if (document.form_survey.magazines.selectedIndex == 0 || document.form_survey.magazines.value == "Please choose:") {

    alert( "Please can you fill out this menu choice." );

    document.form_survey.magazines.focus();

   return false ;

  }
  
  
  
  
  
  
   else if (document.form_survey.fairs.selectedIndex == 0 || document.form_survey.fairs.value == "Please choose:") {

    alert( "Please can you fill out this menu choice." );

    document.form_survey.fairs.focus();

   return false ;

  }
  
  
   
   
   
   
   else if (document.form_survey.directories.selectedIndex == 0 || document.form_survey.directories.value == "Please choose:") {

    alert( "Please can you fill out this menu choice." );

    document.form_survey.directories.focus();

   return false ;

  }
  
 







  
 
  




  
 else if (document.form_survey.user_code.value == "" || document.form_survey.user_code.value == "Type the code here please.") {

    alert( "Please enter the security code." );

    document.form_survey.user_code.focus();

    return false ;

  }
  


//else {
//window.open('', 'foo', 'width=320,height=140,status=no,resizable=no,scrollbars=no');
//}

}















function form() {

if (form.fname.value == "") {

    alert( "Please enter your first name." );

    form.fname.focus();

    return false ;

  }
  
  else if (form.lname.value == "") {

    alert( "Please enter your last name." );

    form.lname.focus();

    return false ;

  }
  
  
  
   
   address = form.address.value

AtPos = address.indexOf("@")

StopPos = address.lastIndexOf(".")



if (AtPos == -1 || StopPos == -1) {

alert( "Please enter a valid email address, eg. myname@gmail.com" );



 form.address.focus();

    return false ;

}
 else if (form.comments.value == "") {

    alert( "Please leave some comments or a message in the comments box." );

    form.comments.focus();

    return false ;

  }
  
  
if (form.research.selectedIndex == 0 || form.research.selectedIndex == 1) {

    alert( "Please can you pick an option from the list." );

    form.research.focus();

   return false ;

  }
  
   else if (form.user_code.value == "Type the code in to this box please.") {

    alert( "Please type the code in to the box provided." );

    form.user_code.focus();
	//onClick="document.forms[0].user_code.value=''"
	form.user_code.value = "";
    return false ;

  }
  



//else {
//window.open('', 'foo', 'width=320,height=140,status=no,resizable=no,scrollbars=no');
//}

}























function submitTestimonial() {

if (document.form_testimonials.name.value == "") {

    alert( "Please enter your name." );

    document.form_testimonials.name.focus();

    return false ;

  }
  
  
  
 
 
 
 
  email = document.form_testimonials.email.value

AtPos = email.indexOf("@")

StopPos = email.lastIndexOf(".")



if (AtPos == -1 || StopPos == -1) {

alert( "Please enter a valid email address, eg. myname@gmail.com" );

 document.form_testimonials.email.focus();

    return false ;

}

 
  

  
  
  
  else if (document.form_testimonials.comments.value == "") {

    alert( "Please enter your testimonial." );

    document.form_testimonials.comments.focus();

    return false ;

  }
  
 


  
  
  
 else if (document.form_testimonials.user_code.value == "" || document.form_testimonials.user_code.value == "Type the code here please.") {

    alert( "Please enter the security code." );

    document.form_testimonials.user_code.focus();

    return false ;

  }
  



}


















//** Dynamic Drive Equal Columns Height script v1.01 (Nov 2nd, 06)
//** http://www.dynamicdrive.com/style/blog/entry/css-equal-columns-height-script/

var ddequalcolumns=new Object()
//Input IDs (id attr) of columns to equalize. Script will check if each corresponding column actually exists:
ddequalcolumns.columnswatch=["side_bar", "main_content"]

ddequalcolumns.setHeights=function(reset){
var tallest=0
var resetit=(typeof reset=="string")? true : false
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null){
if (resetit)
document.getElementById(this.columnswatch[i]).style.height="auto"
if (document.getElementById(this.columnswatch[i]).offsetHeight>tallest)
tallest=document.getElementById(this.columnswatch[i]).offsetHeight
}
}
if (tallest>0){
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null)
document.getElementById(this.columnswatch[i]).style.height=tallest+"px"
}
}
}

ddequalcolumns.resetHeights=function(){
this.setHeights("reset")
}

ddequalcolumns.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}

ddequalcolumns.dotask(window, function(){ddequalcolumns.setHeights()}, "load")
ddequalcolumns.dotask(window, function(){if (typeof ddequalcolumns.timer!="undefined") clearTimeout(ddequalcolumns.timer); ddequalcolumns.timer=setTimeout("ddequalcolumns.resetHeights()", 200)}, "resize")











////// rollover stuff




<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->



MM_preloadImages('images/packages_over.gif',
								'images/more_videos_over.gif',
                                'images/more_news_over.gif',
                                
                                'images/artists_over2.png',
                                'images/contact_us2.png',
                                'images/faqs_over2.png',
                                'images/gallery_over2.png',
								 'images/testimonials_over2.png',
                                
                                'images/home_over2.png',
                                'images/pricing_over2.png'                
                                );





//// open window

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}







