// JavaScript Document
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];}
}

// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
	this[i] = ' '

  }
}

image = new StringArray(3)
image[0] = '../images/banner1.jpg'
image[1] = '../images/banner2.jpg'
image[2] = '../images/banner3.jpg'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
	return(image[core])
}

function validateDate(fld) {
    var RegExPattern = /^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$/;
    
    if ((fld.value.match(RegExPattern))) {
        return true; 
    } else {
        return false;
    } 
}

function validatePhone(strng){
	var stripped = strng.replace(/[\(\)\.\-\ ]/g, '');
	
	//strip out acceptable non-numeric characters
	if (isNaN(parseInt(stripped))) {
		return false;
	}
}

function echeck(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		alert("Invalid E-mail ID")
		return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
		alert("Invalid E-mail ID")
		return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert("Invalid E-mail ID")
		return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
		alert("Invalid E-mail ID")
		return false
	 }
	
	 if (str.indexOf(" ")!=-1){
		alert("Invalid E-mail ID")
		return false
	 }

	 return true					
}

function echeck(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   //alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   //alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		//alert("Invalid E-mail ID")
		return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
	   //alert("Invalid E-mail ID")
		return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		//alert("Invalid E-mail ID")
		return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
		//alert("Invalid E-mail ID")
		return false
	 }
	
	 if (str.indexOf(" ")!=-1){
		//alert("Invalid E-mail ID")
		return false
	 }

	 return true					
}

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function checkSubmit() {
   checkAll();
   document.regoptions.rno.value='X';

   //Check to see if the user has selected a payment method
   payment_method_selected = false;
   for (i=0;i<document.regoptions.paymenttype.length;i++){
		if (document.regoptions.paymenttype[i].checked==true){
			payment_method_selected = true;
		}
   }
  
   //Check to see if the total US $ for the registration is greater than 0
   if (document.regoptions.ttotal.value <=0)
   {
		alert('Please select at least one program before continuing with the registration process.');
   }
   else if (payment_method_selected == false)
   {
		alert('Please select a payment method.');
   }
   //If the payment method is invoice check to see if the user has entered all the relevant information
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_name.value) == '')
   {
		alert('Please provide a contact name for your invoice.');
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_phone.value) == '')
   {
		alert('Please provide a contact phone for your invoice.');
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_email.value) == '')
   {
		alert('Please provide a contact email address for your invoice.');
   }
   else if (document.regoptions.paymenttype[0].checked==true && echeck(document.regoptions.invoice_email.value) == false)
   {
	   alert('Please provide a valid contact email address for your invoice.');
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_address.value) == '')
   {
		alert('Please provide a contact address for your invoice.');
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardName.value) == '')
   {
		alert('Please provide a name as it appears on credit card.');
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardContactPhone.value) == '')
   {
		alert('Please provide a contact phone number with credit card information.');
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardEmail.value) == '')
   {
		alert('Please provide a contact email address with credit card information.');
   }
   else if (document.regoptions.paymenttype[1].checked==true && echeck(document.regoptions.cardEmail.value) == false)
   {
	   alert('Please provide a valid contact email address for your credit card.');
   }
   else if (trim(document.regoptions.firstname.value) == '')
   {
	   alert('Please enter first name of registrant.');
   }
   else if (trim(document.regoptions.lastname.value) == '')
   {
	   alert('Please enter last name of registrant.');
   }
   else if (trim(document.regoptions.prefname.value) == '')
   {
	   alert('Please enter preferred name of registrant.');
   }
   else if (trim(document.regoptions.company.value) == '')
   {
	   alert('Please enter company of registrant.');
   }
   else if (trim(document.regoptions.company.value) == '')
   {
	   alert('Please enter company of registrant.');
   }
   else if (trim(document.regoptions.title.value) == '')
   {
	   alert('Please enter title of registrant.');
   }
   else if (trim(document.regoptions.address.value) == '')
   {
	   alert('Please enter address of registrant.');
   }
   else if (trim(document.regoptions.city.value) == '')
   {
	   alert('Please enter city of registrant.');
   }
   else if (trim(document.regoptions.state.value) == '')
   {
	   alert('Please enter state of registrant.');
   }
   else if (trim(document.regoptions.zip.value) == '')
   {
	   alert('Please enter zip code of registrant.');
   }
   else if (trim(document.regoptions.phone.value) == '')
   {
	   alert('Please enter phone number of registrant.');
   }
   else if (trim(document.regoptions.email.value) == '')
   {
	   alert('Please enter email address of registrant.');
   }
   else if (echeck(document.regoptions.email.value) == false)
   {
	   alert('Please enter a valid email address of registrant.');
   }
   else if (trim(document.regoptions.email2.value) == '')
   {
	   alert('Please re-confirm email address of registrant.');
   }
   else if (document.regoptions.email.value != document.regoptions.email2.value)
   {
	   alert('The re-confirmed email address does not match the original email address.');
   }
   else if (document.regoptions.hear_about.value == "0" || document.regoptions.hear_about.value == "")
      {
   	   alert('Please select an option under a category for how you heard about us');
   }
   else
   {
		document.regoptions.submit();
   }
}

function corporate_checkSubmit() {
   checkAll();
   document.regoptions.rno.value='X';

   //Check to see if the user has selected a payment method
   payment_method_selected = false;
   submit_form = true;

   for (i=0;i<document.regoptions.paymenttype.length;i++){
		if (document.regoptions.paymenttype[i].checked==true){
			payment_method_selected = true;
		}
   }
  
   //Check to see if the total US $ for the registration is greater than 0
   if (document.regoptions.ttotal.value <=0)
   {
		alert('Please select at least one program before continuing with the registration process.');
		submit_form = false;
   }
   else if (payment_method_selected == false)
   {
		alert('Please select a payment method.');
		submit_form = false;
   }
   //If the payment method is invoice check to see if the user has entered all the relevant information
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_name.value) == '')
   {
		alert('Please provide a contact name for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_phone.value) == '')
   {
		alert('Please provide a contact phone for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_email.value) == '')
   {
		alert('Please provide a contact email address for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && echeck(document.regoptions.invoice_email.value) == false)
   {
	   alert('Please provide a valid contact email address for your invoice.');
	   submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_address.value) == '')
   {
		alert('Please provide a contact address for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardName.value) == '')
   {
		alert('Please provide a name as it appears on credit card.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardContactPhone.value) == '')
   {
		alert('Please provide a contact phone number with credit card information.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardEmail.value) == '')
   {
		alert('Please provide a contact email address with credit card information.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && echeck(document.regoptions.cardEmail.value) == false)
   {
	   alert('Please provide a valid contact email address for your credit card.');
	   submit_form = false;
   }
   else
   {
		//Get the max of qty101566 and qty101567. the minimum qty for i_max is 1
		if (document.regoptions.page_name.value=='corporateRegistration')
		{
			i_max = Math.max(document.regoptions.qty101562.value,document.regoptions.qty101563.value,document.regoptions.qty101566.value,document.regoptions.qty101567.value,document.regoptions.qty101564.value);
			i_registrants = 1;
		}
		else
	    {
			i_max = Math.max(document.regoptions.qty101566.value,document.regoptions.qty101567.value);
			i_registrants = 1;
	    }
		
		document.regoptions.h_number_of_registrants.value = i_max;
		
		//We have to see, for how many registrants the user has entered information.
		if (
			document.regoptions.firstname_4.value != '' ||
			document.regoptions.lastname_4.value != '' ||
			document.regoptions.prefname_4.value != '' ||
			document.regoptions.company_4.value != '' ||
			document.regoptions.city_4.value != '' ||
			document.regoptions.state_4.value != '' ||
			document.regoptions.zip_4.value != '' ||
			document.regoptions.phone_4.value != '' ||
			document.regoptions.email_4.value != '' ||
			document.regoptions.email2_4.value != ''
		)
		{
			i_registrants = 4;
		}
		else if (
			document.regoptions.firstname_3.value != '' ||
			document.regoptions.lastname_3.value != '' ||
			document.regoptions.prefname_3.value != '' ||
			document.regoptions.company_3.value != '' ||
			document.regoptions.city_3.value != '' ||
			document.regoptions.state_3.value != '' ||
			document.regoptions.zip_3.value != '' ||
			document.regoptions.phone_3.value != '' ||
			document.regoptions.email_3.value != '' ||
			document.regoptions.email2_3.value != ''
		)
		{
			i_registrants = 3;
		}
		else if (
			document.regoptions.firstname_2.value != '' ||
			document.regoptions.lastname_2.value != '' ||
			document.regoptions.prefname_2.value != '' ||
			document.regoptions.company_2.value != '' ||
			document.regoptions.city_2.value != '' ||
			document.regoptions.state_2.value != '' ||
			document.regoptions.zip_2.value != '' ||
			document.regoptions.phone_2.value != '' ||
			document.regoptions.email_2.value != '' ||
			document.regoptions.email2_2.value != ''
		)
		{
			i_registrants = 2;
		}
		//If the user has entered information for more registrants than the quantity
		//he has entered previously, we have to give him a message.
		if (i_registrants > i_max)
		{
			alert("You have entered information for " + i_registrants + " registrants. However you have entered the maximum quantity for any of the chosen programs as " + i_max + ". Please verify!");
			submit_form = false;
		}

		for (i=1;i<=i_max;i++ )
		{
			var_firstname = "document.regoptions.firstname_"+i+".value";
			var_lastname = "document.regoptions.lastname_"+i+".value";
			var_prefname = "document.regoptions.prefname_"+i+".value";
			var_company = "document.regoptions.company_"+i+".value";
			var_title = "document.regoptions.title_"+i+".value";
			var_address = "document.regoptions.address_"+i+".value";
			var_city = "document.regoptions.city_"+i+".value";
			var_state = "document.regoptions.state_"+i+".value";
			var_zip = "document.regoptions.zip_"+i+".value";
			var_phone = "document.regoptions.phone_"+i+".value";
			var_email = "document.regoptions.email_"+i+".value";
			var_email2 = "document.regoptions.email2_"+i+".value";

			if (trim(eval(var_firstname)) == '')
			{
				alert('Please enter first name of Registrant #'+i+'.');
				submit_form = false;
			}
			else if (trim(eval(var_lastname)) == '')
			{
				alert('Please enter last name of Registrant #'+i+'.');
				submit_form = false;
			}
			else if (trim(eval(var_prefname)) == '')
		    {
			    alert('Please enter preferred name of Registrant #'+i+'.');
				submit_form = false;
		    }
			else if (trim(eval(var_company)) == '')
		    {
			    alert('Please enter company of Registrant #'+i+'.');
				submit_form = false;
		    }
			else if (trim(eval(var_title)) == '')
		    {
			    alert('Please enter title of Registrant #'+i+'.');
				submit_form = false;
		    }
			 else if (trim(eval(var_address)) == '')
			 {
				alert('Please enter address of Registrant #'+i+'.');
				submit_form = false;
			 }
			 else if (trim(eval(var_city)) == '')
			 {
				alert('Please enter city of Registrant #'+i+'.');
				submit_form = false;
			 }
			 else if (trim(eval(var_state)) == '')
			 {
				alert('Please enter state of Registrant #'+i+'.');
				submit_form = false;
			 }
			 else if (trim(eval(var_zip)) == '')
			 {
				 alert('Please enter zip code of Registrant #'+i+'.');
				 submit_form = false;
			 }
			 else if (trim(eval(var_phone)) == '')
			 {
				 alert('Please enter phone number of Registrant #'+i+'.');
				 submit_form = false;
			 }
			 else if (trim(eval(var_email)) == '')
		     {
			     alert('Please enter email address of Registrant #'+i+'.');
				 submit_form = false;
		     }
			 else if (echeck(eval(var_email)) == false)
		     {
			     alert('Please enter a valid email address of Registrant #'+i+'.');
				 submit_form = false;
		     }
			 else if (trim(eval(var_email2)) == '')
		     {
			     alert('Please re-confirm email address of Registrant #'+i+'.');
				 submit_form = false;
		     }
			 else if (eval(var_email) != eval(var_email2))
			 {
				 alert('The re-confirmed email address does not match the original email address for Registrant #'+i+'.');
				 submit_form = false;
			 }
		}
   }
   if (submit_form == true)
   {
	   document.regoptions.submit();
   }
}








function corporate_checkSubmit1(reg) {
   checkAll();
   document.regoptions.rno.value='X';

   //Check to see if the user has selected a payment method
   payment_method_selected = false;
   submit_form = true;

   for (i=0;i<document.regoptions.paymenttype.length;i++){
		if (document.regoptions.paymenttype[i].checked==true){
			payment_method_selected = true;
		}
   }
  
   //Check to see if the total US $ for the registration is greater than 0
   if (document.regoptions.ttotal.value <=0)
   {
		alert('Please select at least one program before continuing with the registration process.');
		submit_form = false;
   }
   else if (payment_method_selected == false)
   {
		alert('Please select a payment method.');
		submit_form = false;
   }
   //If the payment method is invoice check to see if the user has entered all the relevant information
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_name.value) == '')
   {
		alert('Please provide a contact name for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_phone.value) == '')
   {
		alert('Please provide a contact phone for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_email.value) == '')
   {
		alert('Please provide a contact email address for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && echeck(document.regoptions.invoice_email.value) == false)
   {
	   alert('Please provide a valid contact email address for your invoice.');
	   submit_form = false;
   }
   else if (document.regoptions.paymenttype[0].checked==true && trim(document.regoptions.invoice_address.value) == '')
   {
		alert('Please provide a contact address for your invoice.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardName.value) == '')
   {
		alert('Please provide a name as it appears on credit card.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardContactPhone.value) == '')
   {
		alert('Please provide a contact phone number with credit card information.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && trim(document.regoptions.cardEmail.value) == '')
   {
		alert('Please provide a contact email address with credit card information.');
		submit_form = false;
   }
   else if (document.regoptions.paymenttype[1].checked==true && echeck(document.regoptions.cardEmail.value) == false)
   {
	   alert('Please provide a valid contact email address for your credit card.');
	   submit_form = false;
   }
   else
   {
		//Get the max of qty101566 and qty101567. the minimum qty for i_max is 1
		if (document.regoptions.page_name.value=='corporateRegistration')
		{
			i_max = Math.max(document.regoptions.qty101562.value,document.regoptions.qty101563.value,document.regoptions.qty101566.value,document.regoptions.qty101567.value,document.regoptions.qty101564.value);
			i_registrants = 1;
		}
		else
	    {
			i_max = Math.max(document.regoptions.qty101566.value,document.regoptions.qty101567.value,document.regoptions.qty101563.value,document.regoptions.qty101562.value);
			i_registrants = 1;
	    }
		
		
		
		//We have to see, for how many registrants the user has entered information.
		
		//If the user has entered information for more registrants than the quantity
		//he has entered previously, we have to give him a message.
		if (i_registrants > i_max)
		{
			alert("You have entered information for " + i_registrants + " registrants. However you have entered the maximum quantity for any of the chosen programs as " + i_max + ". Please verify!");
			submit_form = false;
		}

		for (i=1;i<=i_max;i++ )
		{
			var_firstname = "document.regoptions.firstname_"+i+".value";
			var_lastname = "document.regoptions.lastname_"+i+".value";
			var_prefname = "document.regoptions.prefname_"+i+".value";
			var_company = "document.regoptions.company_"+i+".value";
			var_title = "document.regoptions.title_"+i+".value";
			var_address = "document.regoptions.address_"+i+".value";
			var_city = "document.regoptions.city_"+i+".value";
			var_state = "document.regoptions.state_"+i+".value";
			var_zip = "document.regoptions.zip_"+i+".value";
			var_phone = "document.regoptions.phone_"+i+".value";
			var_email = "document.regoptions.email_"+i+".value";
			var_email2 = "document.regoptions.email2_"+i+".value";

			if (trim(eval(var_firstname)) == '')
			{
				alert('Please enter first name of Registrant #'+i+'.');
				submit_form = false;
			}
			else if (trim(eval(var_lastname)) == '')
			{
				alert('Please enter last name of Registrant #'+i+'.');
				submit_form = false;
			}
			else if (trim(eval(var_prefname)) == '')
		    {
			    alert('Please enter preferred name of Registrant #'+i+'.');
				submit_form = false;
		    }
			else if (trim(eval(var_company)) == '')
		    {
			    alert('Please enter company of Registrant #'+i+'.');
				submit_form = false;
		    }
			else if (trim(eval(var_title)) == '')
		    {
			    alert('Please enter title of Registrant #'+i+'.');
				submit_form = false;
		    }
			 else if (trim(eval(var_address)) == '')
			 {
				alert('Please enter address of Registrant #'+i+'.');
				submit_form = false;
			 }
			 else if (trim(eval(var_city)) == '')
			 {
				alert('Please enter city of Registrant #'+i+'.');
				submit_form = false;
			 }
			 else if (trim(eval(var_state)) == '')
			 {
				alert('Please enter state of Registrant #'+i+'.');
				submit_form = false;
			 }
			 else if (trim(eval(var_zip)) == '')
			 {
				 alert('Please enter zip code of Registrant #'+i+'.');
				 submit_form = false;
			 }
			 else if (trim(eval(var_phone)) == '')
			 {
				 alert('Please enter phone number of Registrant #'+i+'.');
				 submit_form = false;
			 }
			 else if (trim(eval(var_email)) == '')
		     {
			     alert('Please enter email address of Registrant #'+i+'.');
				 submit_form = false;
		     }
			 else if (echeck(eval(var_email)) == false)
		     {
			     alert('Please enter a valid email address of Registrant #'+i+'.');
				 submit_form = false;
		     }
			 else if (trim(eval(var_email2)) == '')
		     {
			     alert('Please re-confirm email address of Registrant #'+i+'.');
				 submit_form = false;
		     }
			 else if (eval(var_email) != eval(var_email2))
			 {
				 alert('The re-confirmed email address does not match the original email address for Registrant #'+i+'.');
				 submit_form = false;
			 }
		}
   }
   if (submit_form == true)
   {
	   document.regoptions.submit();
   }
}



function slideExample1(elementId, headerElement)
{
   var element = document.getElementById(elementId);
   if(element.up == null || element.down)
   {
      animate(elementId, 0, 20, 150, 0, 250, null);
      element.up = true;
      element.down = false;
      headerElement.innerHTML = 'vvv';
   }
   else
   {
      animate(elementId, 0, 20, 150, 130, 250, null);
      element.down = true;
      element.up = false;
      headerElement.innerHTML = '^^^';
   }
}



function hidepay() {
 document.getElementById('payinfo').style.display="none";
}

function showpay() {
 
 if(document.getElementById('payinfo').style.display == 'none')

  document.getElementById('payinfo').style.display="block";
 else 
  document.getElementById('payinfo').style.display="none";
}

function hidepay2() {
 document.getElementById('payinfo').style.display="none";
 document.getElementById('groupfirstname').value = "";
 document.getElementById('grouplastname').value = "";
 document.getElementById('groupphone').value = "";
 document.getElementById('groupemail').value = "";
}



function min_obj(str) {
	var q = "'";
	var content = "<a href=";
	
		content = content+"javascript:plus_obj(";
		
		content = content+q;
		content = content+str;
		content = content+q;
	content=content+"); class=maroon-nostyle "; 
	
	content = content+">[-]</a>";

	
	document.getElementById(str).innerHTML = content;


	var content_id = str+"1";
	document.getElementById(content_id).style.display="block";

	
	
}

function plus_obj(str) {

	var q = "'";
	var content = "<a href=";

	content = content+"javascript:min_obj(";
	

	content = content+q;
	content = content+str;
	content = content+q;
	content=content+"); class=maroon-nostyle "; 
	
	content = content+">[+]</a>";
	
	document.getElementById(str).innerHTML = content;
	
	var content_id = str+"1";
	document.getElementById(content_id).style.display="none";
	
}

function expand_collapse(str) {
var search_string = document.getElementById(str).innerHTML;
var flag;


if( search_string.search("min") != "-1") {

var q = "'";
	var content = "<a href=";
	
		content = content+"javascript:plus_obj(";
		
		content = content+q;
		content = content+str;
		content = content+q;
	content=content+"); class=maroon-nostyle "; 
	
	content = content+">[-]</a>";

	
	document.getElementById(str).innerHTML = content;


	var content_id = str+"1";
	document.getElementById(content_id).style.display="block";

}
else {

	var q = "'";
	var content = "<a href=";

	content = content+"javascript:min_obj(";
	

	content = content+q;
	content = content+str;
	content = content+q;
	content=content+"); class=maroon-nostyle "; 
	
	content = content+">[+]</a>";
	
	document.getElementById(str).innerHTML = content;
	
	var content_id = str+"1";
	document.getElementById(content_id).style.display="none";
}

}



function compileFullList(str1)
{

var xmlHttp;

try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {  // Internet Explorer

  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
      }
      }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4 && xmlHttp.status == 200)
      {

       document.getElementById("contentList").innerHTML=xmlHttp.responseText;

	
      }
    }


 //var str2= document.statform.dd_region.options[2].value;

 var pass = "compileList.php?prog="+str1;
 
 xmlHttp.open("GET",pass,true);
 xmlHttp.send(null);

  }

function compileClientList(str1)
{

var xmlHttp;

try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {  // Internet Explorer

  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
      }
      }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4 && xmlHttp.status == 200)
      {

       document.getElementById("contentList").innerHTML=xmlHttp.responseText;

	
      }
    }


 //var str2= document.statform.dd_region.options[2].value;

 var pass = "compileClientList.php?prog="+str1;
 
 xmlHttp.open("GET",pass,true);
 xmlHttp.send(null);

  }

