// JavaScript Document 

//*******************BEGIN: JS Functions, Rollover, Preload images, Layer Hide/Show******************

/*
Submit Once form validation- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var rowClickArray=new Array(100);
rowClickArray[0]=0;

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}


//Macromedia Code: Rollover 
<!--
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;
}
//-->

//Macromedia Code: Show/Hide layer code
<!--
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

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];}
}
//-->

//Macromedia Code: Go to URL
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->

//Macromedia Code: Open Browser Window prespecified Height & Width
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

//Macromedia Code: Navbar, OVER, ON and OFF States
<!--
function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}
//-->

//Macromedia Code: Netscape 4 Fix
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

// Reload Parent window
<!--
function reloadParent(){ 
window.opener.document.location.reload(-1); 
} 
//-->

// Character limiter old version IE5-NS6 with pop-up notification
<!--
var maxlength;
function checkValue(field){

 var TextField = field.srcElement;

 if (field.value.length >= maxlength) {
  alert('Sorry, you have reached the limit of ' + maxlength + ' characters. You may need to refine you answer to fit within this limit. Click Ok or Press Enter/Return to clear this window');
  
	
field.value = field.value.substring(0,maxlength);
  field.focus();
 }
}
//-->

// Character limiter new version without pop-up but notification of chars used 
/*
Form field Limiter script- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/

var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}


function displaylimit(theform,thelimit){
var limit_text='<b><span align="left" id="'+theform.toString()+'">'+thelimit+'</span></b> characters remaining'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
}
}

// Remove unfriendly SQL Chars
<!--
function validated(string) {
    for (var i=0, output='', valid="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@."; i<string.length; i++)
       if (valid.indexOf(string.charAt(i)) != -1)
          output += string.charAt(i)
    return output;
}
//-->


//Email only validation
<!--
function isEmailAddr(emailaddress)
{
  var result = false
  var theStr = new String(emailaddress)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function FormValidator(theForm)
{

  if (theForm.emailaddress.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.emailaddress.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.emailaddress.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.emailaddress.focus();
    return (false);
  }
   
  if (theForm.emailaddress.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.emailaddress.focus();
    return (false);
  }
  return (true);
}
//-->


//Row Colour change
<!--

function row_click(x)
{
		// Change the background color to whatever you want
        var alreadyInArray='no';
		
	    for (var searchClicked=0; searchClicked <= rowClickArray[0]; searchClicked++)
			if (rowClickArray[searchClicked]==x) 
			{
				alreadyInArray='yes';
				rowClickArray[searchClicked]='';
			}
		
		if (alreadyInArray=='yes') 
		{
			document.all.item("row_" + x).style.background = "#FFFFFF";
			alreadyInArray='no'
		}
		
		else 
		{	document.all.item("row_" + x).style.background = "#FFFC88";
			rowClickArray[0]++;
			rowClickArray[rowClickArray[0]]=x;
		}
		
}

function row_dmo(x) {
	// Change the background color to whatever you want
       	document.all.item("row_" + x).style.background = "#FFFC88";
       	document.all.item("row_" + x).style.cursor = "auto";
}

function row_dmogrey(x) {
	// Change the background color to whatever you want
        if (x != rowChecked)
	   		document.all.item("row_" + x).style.background = "#CCCCCC";
		else	
			document.all.item("row_" + x).style.background = "#FFFC88";
		document.all.item("row_" + x).style.cursor = "auto";
}

function row_dout(x, originalColor) {
	// Reset to whatever your default background.. and cursor is back to the pointer
       var itemFound='no';
	   for (var rowCount=1; rowCount <= rowClickArray[0]; rowCount++)
	 	if (rowClickArray[rowCount]==x) itemFound='yes';
		
		
		if (itemFound=='yes') document.all.item("row_" + x).style.background = "#FFFC88";
		else 
		{
			
			document.all.item("row_" + x).style.background = originalColor;
	        document.all.item("row_" + x).style.cursor = "auto";
		}
}
//-->


<!-- 
//Highlight form element- © Dynamic Drive (www.dynamicdrive.com) 
//For full source code, 100's more DHTML scripts, and TOS, 
//visit http://www.dynamicdrive.com 

var highlightcolor="#FFFFCC" 

var ns6=document.getElementById&&!document.all 
var previous='' 
var eventobj 

//Regular expression to highlight only form elements 
var intended=/INPUT|TEXTAREA|SELECT|OPTION/ 

//Function to check whether element clicked is form element 
function checkel(which){ 
if (which.style&&intended.test(which.tagName)){ 
if (ns6&&eventobj.nodeType==3) 
eventobj=eventobj.parentNode.parentNode 
return true 
} 
else 
return false 
} 

//Function to highlight form element 
function highlight(e){ 
eventobj=ns6? e.target : event.srcElement 
if (previous!=''){ 
if (checkel(previous)) 
previous.style.backgroundColor='' 
previous=eventobj 
if (checkel(eventobj)) 
eventobj.style.backgroundColor=highlightcolor 
} 
else{ 
if (checkel(eventobj)) 
eventobj.style.backgroundColor=highlightcolor 
previous=eventobj 
} 
} 

function MM_displayStatusMsg(msgStr) { //v1.0 
  status=msgStr; 
  document.MM_returnValue = true; 
} 
//--> 

//Form Validation: Complete
/*
 *
 * Standard form verification functions
 * These have all been optimized for NS 4+ / IE 4+ only!
 *
 * dburry 19990830 wrote original code
 * dburry 20000125 added IE 4.x Mac bug workaround in addError
 *
 */

// generic VerifyForm object
// you must instantiate one of these with v = new VerifyForm() and then access
// it through its methods and properties
function VerifyForm() {

  // modify v.msgSeparator to change separator between error messages
  this.msgSeparator = '\n';
  
  // modify v.blankValue to change what is considered a "blank" value in the form
  // for instance, if all fields should be considered blank when "n/a" is their
  // value, then you can set that
  this.blankValue   = '';
  
  // private array for storage of errors
  // don't access directly, use addError() and showErrors() defined below
  this._gripes      = new Array();

  // private regexps to validate data
  // don't use these directly, use the methods defined below
  this._Email    = /^([0-9a-z_&.+-]+!)*[0-9a-z_&.+-]+@(([0-9a-z]([0-9a-z-]*[0-9a-z])?\.)+[a-z]{2,3}|([0-9]{1,3}\.){3}[0-9]{1,3})$/i;
  this._EmailBad = /^(((postmaster|root|hostmaster|mailer-daemon|webmaster)@(adobe|frame)\.com)|.*@(.*\.(adobe|frame)\.com|localhost\.com|127\.0\.0\.1))$/i;
    
  // import functions defined below as methods of this object
  // see below for usage
  this.addError      = _VerifyForm_addError;
  this.showErrors    = _VerifyForm_showErrors;
  this.hasValue      = _VerifyForm_hasValue;
  this.getValue      = _VerifyForm_getValue;
  this.getAllValues  = _VerifyForm_getAllValues;
  this.clearFirst    = _VerifyForm_clearFirst;
  this.clearLast     = _VerifyForm_clearLast;
  this.clearAll      = _VerifyForm_clearAll;
  this.setFirst      = _VerifyForm_setFirst;
  this.setLast       = _VerifyForm_setLast;
  this.setAll        = _VerifyForm_setAll;
  this.checkFirst    = _VerifyForm_checkFirst;
  this.checkLast     = _VerifyForm_checkLast;
  this.checkAll      = _VerifyForm_checkAll;
  this.uncheckFirst  = _VerifyForm_uncheckFirst;
  this.uncheckLast   = _VerifyForm_uncheckLast;
  this.uncheckAll    = _VerifyForm_uncheckAll;
  this._setField     = _VerifyForm__setField;
  this.validEmail    = _VerifyForm_validEmail;

  return this;
}

/////
//
// The following methods are for handling errors
//
/////

// v.addError() method
// adds an error message to queue, brings keyboard focus to first one
// may be modified someday to put a visual indicator next to fields
// field - the actual form field object
// msg - string of error text to show
// no return value
function _VerifyForm_addError (field, msg) {
  if ( ! this._gripes.length) {
    // IE 4.x Mac bug workaround: "object.method" produces error
    // instead of returning true when method exists!!!
    // therefore we also test for field.all here
    if (field.all || field.focus)  field.focus();
    if (field.value && (field.all || field.select)) field.select();
  }
  this._gripes[this._gripes.length] = msg;
}

// v.showErrors() method
// when done checking for errors, call this to do alert popup
// head - text to put above error msgs
// foot - text to put below error msgs
// returns true (ok) if no errors, false if there were errors
function _VerifyForm_showErrors (head, foot) {
  if (this._gripes.length) {
    alert((head ? head + this.msgSeparator : '') + this._gripes.join(this.msgSeparator) + (foot ? this.msgSeparator + foot : ''));
    return false;
  }
  return true;
}

/////
//
// The following methods are for getting/testing data from form fields
// these are all safe for all known field types
// including multi-valued fields (same as multiple fields with same name)
// return values are true or value(s) for the following fields: if and when:
//     button: ignored
//   checkbox: checked and value is non-blank
//       file: value is non-blank
//     hidden: value is non-blank
//   password: value is non-blank
//      radio: checked and value is non-blank
//      reset: ignored
// select-one: selected and value is non-blank
// select-mul: selected and value is non-blank
//     submit: ignored
//       text: value is non-blank
//   textarea: value is non-blank
//  (unknown): value is non-blank
//
/////

// v.hasValue() method
// check if field has a value
// field - the actual form field object
// returns true/false
function _VerifyForm_hasValue (field) {
  if ( ! field.type && field.length ) {
    for (var i = 0; i < field.length; i++)
      if (field[i].type && this.hasValue(field[i]))
        return true;
    return false;
  }
  if (/select/.test(field.type))
    return (field.selectedIndex != -1 && (field.options[field.selectedIndex].value != this.blankValue));
  if (/(checkbox|radio)/.test(field.type))
    return ( field.checked && (field.value != this.blankValue) );
  if (/(button|reset|submit)/.test(field.type))
    return false;
  return (field.value != this.blankValue)
}

// v.getValue() method
// get value of field if there is a value
// field - the actual form field object
// returns value or null
// note: on multi-valued fields, returns only the first value encountered
function _VerifyForm_getValue (field) {
  if ( ! field.type && field.length ) {
    for (var i = 0; i < field.length; i++) {
      if (field[i].type) {
        var value = this.getValue(field[i]);
        if (value) return value;
      }
    }
    return null;
  }
  if (/select/.test(field.type))
    return ( (field.selectedIndex != -1 && (field.options[field.selectedIndex].value != this.blankValue))
      ? field.options[field.selectedIndex].value : null );
  if (/(checkbox|radio)/.test(field.type))
    return ( (field.checked && (field.value != this.blankValue)) ? field.value : null );
  return ( ( ! /(button|reset|submit)/.test(field.type) && (field.value != this.blankValue)) ? field.value : null )
}

// v.getAllValues() method
// get values of field if there are values, designed for multi-valued fields
// field - the actual form field object
// returns array of values or empty array
function _VerifyForm_getAllValues (field) {
  var arr = new Array();
  if ( ! field.type && field.length ) {
    var temparr;
    for (var i = 0; i < field.length; i++) {
      if (field[i].type) {
        temparr = this.getAllValues(field[i]);
        for (var j = 0; j < temparr.length; j++)
          arr[arr.length] = temparr[j];
      }
    }
  }
  else if (/select/.test(field.type)) {
    for (var i = 0; i < field.length; i++)
      if (field.options[i].selected && (field.options[i].value != this.blankValue))
        arr[arr.length] = field.options[i].value;
  }
  else if (/(checkbox|radio)/.test(field.type) && field.checked && (field.value != this.blankValue))
    arr[arr.length] = field.value;
  else if ( ! /(button|reset|submit)/.test(field.type) && (field.value != this.blankValue))
    arr[arr.length] = field.value;
  return arr;
}

/////
//
// The following methods are for clearing/setting/checking/unchecking fields
// these are all safe for all known field types
// including multi-valued fields (same as multiple fields with same name)
// return value is true if field changed, false if not
// only those input items that are checkable may be checked/unchecked
// only items whose values are settable by a normal user may be cleared/set
//     button: ignored
//   checkbox: checkable
//       file: value settable
//     hidden: ignored
//   password: value settable
//      radio: checkable
//      reset: ignored
// select-one: checkable
// select-mul: checkable
//     submit: ignored
//       text: value settable
//   textarea: value settable
//  (unknown): ignored
//
/////

// v.clear/set/check/uncheckFirst/Last/All() methods
// modify the value or checked/selected gfx/form/status of a field
// giving 'val' clrs/sets/checks/unchks first/last/all values that match val
// if no val is given, clrs/sets/checks/unchks first/last/all item(s) period
function _VerifyForm_clearFirst (field, val) { return this._setField(field,  1, val, this.blankValue, true) }
function _VerifyForm_clearLast  (field, val) { return this._setField(field, -1, val, this.blankValue, true) }
function _VerifyForm_clearAll   (field, val) { return this._setField(field,  0, val, this.blankValue, true) }
function _VerifyForm_setFirst     (field, toval, val) { return this._setField(field,  1, val, toval,  true) }
function _VerifyForm_setLast      (field, toval, val) { return this._setField(field, -1, val, toval,  true) }
function _VerifyForm_setAll       (field, toval, val) { return this._setField(field,  0, val, toval,  true) }
function _VerifyForm_checkFirst   (field, val)        { return this._setField(field,  1, val,  true, false) }
function _VerifyForm_checkLast    (field, val)        { return this._setField(field, -1, val,  true, false) }
function _VerifyForm_checkAll     (field, val)        { return this._setField(field,  0, val,  true, false) }
function _VerifyForm_uncheckFirst (field, val)        { return this._setField(field,  1, val, false, false) }
function _VerifyForm_uncheckLast  (field, val)        { return this._setField(field, -1, val, false, false) }
function _VerifyForm_uncheckAll   (field, val)        { return this._setField(field,  0, val, false, false) }

// internal method used above, do not call directly, use above methods instead
function _VerifyForm__setField    (field, whichway, val, toval, valueorcheck) {
  var retval = false;
  if ( ! field.type && field.length ) {
    for (var i = (whichway == 1 ? 0 : field.length - 1); i < field.length && i >= 0; i += (whichway || -1))
      if (field[i].type && this._setField(field[i], whichway, val, toval, valueorcheck))
        if (whichway) return true;
        else retval = true;
    return retval;
  }
  if (valueorcheck) {
    if (/(file|password|text)/.test(field.type) && (typeof val != 'string' || field.value == val)) {
      field.value = toval;
      return true;
    }
  }
  else if (/select/.test(field.type)) {
    for (var i = (whichway == 1 ? 0 : field.length - 1); i < field.length && i >= 0; i += (whichway || -1)) {
      if ( typeof val != 'string' || field.options[i].value == val) {
        field.options[i].selected = toval;
        if (whichway) return true;
        else retval = true;
      }
    }
    return retval;
  }
  else if (/(checkbox|radio)/.test(field.type) && (typeof val != 'string' || field.value == val)) {
    field.checked = toval;
    return true;
  }
  return false
}


/////
//
// The following methods are for testing if data actually looks valid
// all return true/false unless otherwise noted
//
/////

// v.validEmail() method
// check if email looks valid
function _VerifyForm_validEmail (e) { return ( this._Email.test(e) && ! this._EmailBad.test(e) ) }

// returns matching abbreviation (also true) or null (also false)

function _VerifyForm__mod10 (num) {
  var sum = 0;
  for (var i = num.length - 1; i >= 0; i -= 2)
    sum += num.charAt(i) * 1 + num.charAt(i - 1) * 2 - (num.charAt(i - 1) >= 5 ? 9 : 0);
  return ( sum % 10 == 0 );
}

// Auto Date Update/Population of Dropdown Date form elements

function populatedate(dateselect,max, selecteddate){
selecteddate--;
for (m=dateselect.options.length-1;m>0;m--)
	dateselect.options[m]=null;
for (i=0;i<max;i++)
	dateselect.options[i]=new Option(i+1,i+1);
if (selecteddate<max) dateselect.options[selecteddate].selected=true;
else dateselect.options[0].selected=true;
}

function evalleapyear(year){
//	alert(year);
	if ((year % 400)==0) {return true;}
	else if ((year % 100)==0) {return false;}
	else if ((year % 4)==0) {return true;}
	return false;
}

function fulleval(dselect,mselect,yselect,output)
{
	if (mselect.options[mselect.selectedIndex].value ==  1) {populatedate(dselect,31,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value ==  2) {
		if (evalleapyear(yselect.options[yselect.selectedIndex].value)){
		populatedate(dselect,29,dselect.options[dselect.selectedIndex].value);
		}
		else populatedate(dselect,28,dselect.options[dselect.selectedIndex].value);
	}
	if (mselect.options[mselect.selectedIndex].value ==  3) {populatedate(dselect,31,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value ==  4) {populatedate(dselect,30,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value ==  5) {populatedate(dselect,31,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value ==  6) {populatedate(dselect,30,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value ==  7) {populatedate(dselect,31,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value ==  8) {populatedate(dselect,31,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value ==  9) {populatedate(dselect,30,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value == 10) {populatedate(dselect,31,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value == 11) {populatedate(dselect,30,dselect.options[dselect.selectedIndex].value)}
	if (mselect.options[mselect.selectedIndex].value == 12) {populatedate(dselect,31,dselect.options[dselect.selectedIndex].value)}
	output.value = mselect.options[mselect.selectedIndex].value + "/" + dselect.options[dselect.selectedIndex].value + "/" + yselect.options[yselect.selectedIndex].value;
//	alert(output.value);
}

function nulleval(dselect,mselect,yselect,output)
{
	output.value = mselect.options[mselect.selectedIndex].value + "/" + dselect.options[dselect.selectedIndex].value + "/" + yselect.options[yselect.selectedIndex].value;
//	alert(output.value);
}



