/*    Caret Functions     */
function getCaretEnd(obj){
	if(typeof obj.selectionEnd != "undefined"){
		return obj.selectionEnd;
	}else if(document.selection&&document.selection.createRange){
		var M=document.selection.createRange();
		var Lp=obj.createTextRange();
		Lp.setEndPoint("EndToEnd",M);
		var rb=Lp.text.length;
		if(rb>obj.value.length){
			return -1;
		}
		return rb;
	}
}
function getCaretStart(obj){
	if(typeof obj.selectionStart != "undefined"){
		return obj.selectionStart;
	}else if(document.selection&&document.selection.createRange){
		var M=document.selection.createRange();
		var Lp=obj.createTextRange();
		Lp.setEndPoint("EndToStart",M);
		var rb=Lp.text.length;
		if(rb>obj.value.length){
			return -1;
		}
		return rb;
	}
}
function setCaret(obj,l){
	obj.focus();
	if (obj.setSelectionRange){
		obj.setSelectionRange(l,l);
	}else if(obj.createTextRange){
		m = obj.createTextRange();		
		m.moveStart('character',l);
		m.collapse();
		m.select();
	}
}
/* ----------------- */

/*    Escape function   */
String.prototype.addslashes = function(){
	return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g, '\\$1');
}
String.prototype.trim = function () {
    return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1");
}; 


function actb(obj,evt,ca){
				//begin
		//		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		//		  if (keyCode == 09) {
    		//	
		//		if (obj.getAttribute&&original.value.length==original.getAttribute("maxlength"))
		//		next.focus()
		//		}

			//		var i;
    			//		for (i = 0; i < obj.form.elements.length; i++)
      			//		if (obj == obj.form.elements[i])
       			//		 break;
    			//		i = (i + 1) % obj.form.elements.length;
			//	    obj.form.elements[i].focus();
   				 
 //   var c = document.layers ? evt.which
 //           : document.all ? evt.keyCode
 //           : evt.keyCode;
   
 //    if (c==8)
 //    if (obj.getAttribute&&obj.value.length==obj.getAttribute("minlength"))
 //    prev.focus();
 //    prev.value=prev.value

				
  	
			//end
	/* ---- Variables ---- */
	var actb_timeOut = 10500; // Autocomplete Timeout in ms (-1: autocomplete never time out)
	var actb_lim = 4;    // Number of elements autocomplete can show (-1: no limit)
	var actb_firstText = false; // should the auto complete be limited to the beginning of keyword?
	var actb_mouse = true; // Enable Mouse Support
	var actb_delimiter = new Array(';',',');  // Delimiter for multiple autocomplete. Set it to empty array for single autocomplete
	/* ---- Variables ---- */

	/* --- Styles --- */
	var actb_bgColor = '#888888';
	var actb_textColor = '#FFFFFF';
	var actb_hColor = '#000000';
	var actb_fFamily = 'Verdana';
	var actb_fSize = '11px';
	var actb_hStyle = 'text-decoration:underline;font-weight="bold"';
	/* --- Styles --- */

	/* ---- Don't touch :P---- */
	var actb_delimwords = new Array();
	var actb_cdelimword = 0;
	var actb_delimchar = new Array();
	var actb_keywords = new Array();
	var actb_display = false;
	var actb_pos = 0;
	var actb_total = 0;
	var actb_curr = null;
	var actb_rangeu = 0;
	var actb_ranged = 0;
	var actb_bool = new Array();
	var actb_pre = 0;
	var actb_toid;
	var actb_tomake = false;
	var actb_getpre = "";
	var actb_mouse_on_list = true;
	var actb_kwcount = 0;
	var actb_caretmove = false;
	/* ---- "Constants" ---- */



	actb_keywords = ca;
	actb_curr = obj;
	
	var oldkeydownhandler = document.onkeydown;
	var oldblurhandler = obj.onblur;
	var oldkeypresshandler = obj.onkeypress;

	document.onkeydown = actb_checkkey;
	obj.onblur = actb_clear;
	obj.onkeypress = actb_keypress;
	
	function actb_clear(evt){
		if (!evt) evt = event;
		document.onkeydown = oldkeydownhandler;
		actb_curr.onblur = oldblurhandler;
		actb_curr.onkeypress = oldkeypresshandler;
		actb_removedisp();
	}

	function tabber(obj,event){
				//begin
				var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
				  if (keyCode == 13) {
    					var i;
    					for (i = 0; i < obj.form.elements.length; i++)
      					if (obj == obj.form.elements[i])
       					 break;
    					i = (i + 1) % obj.form.elements.length;
				    obj.form.elements[i].focus();
   				 return false;
  				}
  				else
    			return true;
			//end
	}

	function actb_parse(n){
		if (actb_delimiter.length > 0){
			var t = actb_delimwords[actb_cdelimword].trim().addslashes();
			var plen = actb_delimwords[actb_cdelimword].trim().length;
		}else{
			var t = actb_curr.value.addslashes();
			var plen = actb_curr.value.length;
		}
		var tobuild = '';
		var i;

		if (actb_firstText){
			var re = new RegExp("^" + t, "i");
		}else{
			var re = new RegExp(t, "i");
		}
		var p = n.search(re);
				
		for (i=0;i<p;i++){
			tobuild += n.substr(i,1);
		}
		tobuild += "<font style='"+(actb_hStyle)+"'>"
		for (i=p;i<plen+p;i++){
			tobuild += n.substr(i,1);
		}
		tobuild += "</font>";
		for (i=plen+p;i<n.length;i++){
			tobuild += n.substr(i,1);
		}
		return tobuild;
	}
	function curTop(){
		actb_toreturn = 0;
		obj = actb_curr;
		while(obj){
			actb_toreturn += obj.offsetTop;
			obj = obj.offsetParent;
		}
		return actb_toreturn;
	}
	function curLeft(){
		actb_toreturn = 0;
		obj = actb_curr;
		while(obj){
			actb_toreturn += obj.offsetLeft;
			obj = obj.offsetParent;
		}
		return actb_toreturn;
	}
	function actb_generate(){
		if (document.getElementById('tat_table')){ actb_display = false;document.body.removeChild(document.getElementById('tat_table')); } 
		if (actb_kwcount == 0){
			actb_display = false;
			return;
		}
		a = document.createElement('table');
		a.cellSpacing='1px';
		a.cellPadding='2px';
		a.style.position='absolute';
		a.style.top = eval(curTop() + actb_curr.offsetHeight) + "px";
		a.style.left = curLeft() + "px";
		a.style.backgroundColor=actb_bgColor;
		a.id = 'tat_table';
		document.body.appendChild(a);
		var i;
		var first = true;
		var j = 1;
		if (actb_mouse){
			a.onmouseout= actb_table_unfocus;
			a.onmouseover=actb_table_focus;
		}
		var counter = 0;
		for (i=0;i<actb_keywords.length;i++){
			if (actb_bool[i]){
				counter++;
				r = a.insertRow(-1);
				if (first && !actb_tomake){
					r.style.backgroundColor = actb_hColor;
					first = false;
					actb_pos = counter;
				}else if(actb_pre == i){
					r.style.backgroundColor = actb_hColor;
					first = false;
					actb_pos = counter;
				}else{
					r.style.backgroundColor = actb_bgColor;
				}
				r.id = 'tat_tr'+(j);
				c = r.insertCell(-1);
				c.style.color = actb_textColor;
				c.style.fontFamily = actb_fFamily;
				c.style.fontSize = actb_fSize;
				c.innerHTML = actb_parse(actb_keywords[i]);
				c.id = 'tat_td'+(j);
				c.setAttribute('pos',j);
				if (actb_mouse){
					c.onclick=actb_mouseclick;
					c.onmouseover = actb_table_highlight;
				}
				j++;
			}
			if (j - 1 == actb_lim && j < actb_total){
				r = a.insertRow(-1);
				r.style.backgroundColor = actb_bgColor;
				c = r.insertCell(-1);
				c.style.color = actb_textColor;
				c.style.fontFamily = 'arial narrow';
				c.style.fontSize = actb_fSize;
				c.align='center';
				c.innerHTML = '\\/';
				if (actb_mouse){
					c.onclick = actb_mouse_down;
				}
				break;
			}
		}
		actb_rangeu = 1;
		actb_ranged = j-1;
		actb_display = true;
		if (actb_pos <= 0) actb_pos = 1;
	}
	function actb_remake(){
		document.body.removeChild(document.getElementById('tat_table'));
		a = document.createElement('table');
		a.cellSpacing='1px';
		a.cellPadding='2px';
		a.style.position='absolute';
		a.style.top = eval(curTop() + actb_curr.offsetHeight) + "px";
		a.style.left = curLeft() + "px";
		a.style.backgroundColor=actb_bgColor;
		a.id = 'tat_table';
		if (actb_mouse){
			a.onmouseout= actb_table_unfocus;
			a.onmouseover=actb_table_focus;
		}
		document.body.appendChild(a);
		var i;
		var first = true;
		var j = 1;
		if (actb_rangeu > 1){
			r = a.insertRow(-1);
			r.style.backgroundColor = actb_bgColor;
			c = r.insertCell(-1);
			c.style.color = actb_textColor;
			c.style.fontFamily = 'arial narrow';
			c.style.fontSize = actb_fSize;
			c.align='center';
			c.innerHTML = '/\\';
			if (actb_mouse){
				c.onclick = actb_mouse_up;
			}
		}
		for (i=0;i<actb_keywords.length;i++){
			if (actb_bool[i]){
				if (j >= actb_rangeu && j <= actb_ranged){
					r = a.insertRow(-1);
					r.style.backgroundColor = actb_bgColor;
					r.id = 'tat_tr'+(j);
					c = r.insertCell(-1);
					c.style.color = actb_textColor;
					c.style.fontFamily = actb_fFamily;
					c.style.fontSize = actb_fSize;
					c.innerHTML = actb_parse(actb_keywords[i]);
					c.id = 'tat_td'+(j);
					c.setAttribute('pos',j);
					if (actb_mouse){
						c.onclick=actb_mouseclick;
						c.onmouseover = actb_table_highlight;
					}
					j++;
				}else{
					j++;
				}
			}
			if (j > actb_ranged) break;
		}
		if (j-1 < actb_total){
			r = a.insertRow(-1);
			r.style.backgroundColor = actb_bgColor;
			c = r.insertCell(-1);
			c.style.color = actb_textColor;
			c.style.fontFamily = 'arial narrow';
			c.style.fontSize = actb_fSize;
			c.align='center';
			c.innerHTML = '\\/';
			if (actb_mouse){
				c.onclick = actb_mouse_down;
			}
		}

	}
	function actb_goup(){
		if (!actb_display) return;
		if (actb_pos == 1) return;
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_bgColor;
		actb_pos--;
		if (actb_pos < actb_rangeu) actb_moveup();
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_hColor;
		if (actb_toid) clearTimeout(actb_toid);
		if (actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list=0;actb_removedisp();},actb_timeOut);
	}
	function actb_godown(){
		if (!actb_display) return;
		if (actb_pos == actb_total) return;
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_bgColor;
		actb_pos++;
		if (actb_pos > actb_ranged) actb_movedown();
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_hColor;
		if (actb_toid) clearTimeout(actb_toid);
		if (actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list=0;actb_removedisp();},actb_timeOut);
	}
	function actb_movedown(){
		actb_rangeu++;
		actb_ranged++;
		actb_remake();
	}
	function actb_moveup(){
		actb_rangeu--;
		actb_ranged--;
		actb_remake();
	}

	/* Mouse */
	function actb_mouse_down(){
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_bgColor;
		actb_pos++;
		actb_movedown();
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_hColor;
		actb_curr.focus();
		actb_moue_on_list = 0;
		if (actb_toid) clearTimeout(actb_toid);
		if (actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list=0;actb_removedisp();},actb_timeOut);
	}
	function actb_mouse_up(evt){
		if (!evt) evt = event;
		if (evt.stopPropagation){
			evt.stopPropagation();
		}else{
			evt.cancelBubble = true;
		}
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_bgColor;
		actb_pos--;
		actb_moveup();
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_hColor;
		actb_curr.focus();
		actb_moue_on_list = 0;
		if (actb_toid) clearTimeout(actb_toid);
		if (actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list=0;actb_removedisp();},actb_timeOut);
	}
	function actb_mouseclick(evt){
		if (!evt) evt = event;
		if (!actb_display) return;
		actb_mouse_on_list = 0;
		actb_pos = this.getAttribute('pos');
		actb_penter();
	}
	function actb_table_focus(){
		actb_mouse_on_list = 1;
	}
	function actb_table_unfocus(){
		actb_mouse_on_list = 0;
		if (actb_toid) clearTimeout(actb_toid);
		if (actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list = 0;actb_removedisp();},actb_timeOut);
	}
	function actb_table_highlight(){
		actb_mouse_on_list = 1;
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_bgColor;
		actb_pos = this.getAttribute('pos');
		while (actb_pos < actb_rangeu) actb_moveup();
		while (actb_pos > actb_ranged) actb_mousedown();
		document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_hColor;
		if (actb_toid) clearTimeout(actb_toid);
		if (actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list = 0;actb_removedisp();},actb_timeOut);
	}
	/* ---- */

	function actb_insertword(a){
		if (actb_delimiter.length > 0){
			str = '';
			l=0;
			for (i=0;i<actb_delimwords.length;i++){
				if (actb_cdelimword == i){
					str += a;
					l = str.length;
				}else{
					str += actb_delimwords[i];
				}
				if (i != actb_delimwords.length - 1){
					str += actb_delimchar[i];
				}
			}
			actb_curr.value = str;
			setCaret(actb_curr,l);
		}else{
			actb_curr.value = a;
		}

		actb_mouse_on_list = 0;
		actb_removedisp();
	}
	function actb_penter(){
		if (!actb_display) return;
		actb_display = false;
		var word = '';
		var c = 0;
		for (var i=0;i<=actb_keywords.length;i++){
			if (actb_bool[i]) c++;
			if (c == actb_pos){
				word = actb_keywords[i];
				break;
			}
		}

		actb_insertword(word);

	}
	function actb_removedisp(){
		if (!actb_mouse_on_list){
			actb_display = false;
			if (document.getElementById('tat_table')){ document.body.removeChild(document.getElementById('tat_table')); }
			if (actb_toid) clearTimeout(actb_toid);
			
					//begin
				var keyCode = evt.keyCode ? evt.keyCode : evt.which ? evt.which : evtcharCode;
				  if (keyCode == 09) {
    					var i;
    					for (i = 0; i < obj.form.elements.length; i++)
      					if (obj == obj.form.elements[i])
       					 break;
    					i = (i + 1) % obj.form.elements.length;
				    obj.form.elements[i].focus();
   				 return false;
  				}
  				else
    			return true;
			//end	


		}

	}
	function actb_keypress(){
	
		return !actb_caretmove;

	}
	function actb_checkkey(evt){
		if (!evt) evt = event;
		a = evt.keyCode;
		caret_pos_start = getCaretStart(actb_curr);
		actb_caretmove = 0;
		switch (a){
			case 38:
				actb_goup();
				actb_caretmove = 1;
				return false;
				break;
			case 40:
				actb_godown();
				actb_caretmove = 1;
				return false;
				break;
			case 13: case 9:
				actb_penter();
				actb_caretmove = 1;
				return true;
				break;
			default:
				setTimeout(function(){actb_tocomplete(a)},50);
				break;
		}

	}

	function actb_tocomplete(kc){
		if (kc == 38 || kc == 40 || kc == 13) return;
		var i;
		if (actb_display){ 
			var word = 0;
			var c = 0;
			for (var i=0;i<=actb_keywords.length;i++){
				if (actb_bool[i]) c++;
				if (c == actb_pos){
					word = i;
					break;
				}
			}
			actb_pre = word;
		}else{ actb_pre = -1};
		
		if (actb_curr.value == ''){
			actb_mouse_on_list = 0;
			actb_removedisp();
			return;
		}
		if (actb_delimiter.length > 0){
			caret_pos_start = getCaretStart(actb_curr);
			caret_pos_end = getCaretEnd(actb_curr);
			
			delim_split = '';
			for (i=0;i<actb_delimiter.length;i++){
				delim_split += actb_delimiter[i];
			}
			delim_split = delim_split.addslashes();
			delim_split_rx = new RegExp("(["+delim_split+"])");
			c = 0;
			actb_delimwords = new Array();
			actb_delimwords[0] = '';
			for (i=0,j=actb_curr.value.length;i<actb_curr.value.length;i++,j--){
				if (actb_curr.value.substr(i,j).search(delim_split_rx) == 0){
					ma = actb_curr.value.substr(i,j).match(delim_split_rx);
					actb_delimchar[c] = ma[1];
					c++;
					actb_delimwords[c] = '';
				}else{
					actb_delimwords[c] += actb_curr.value.charAt(i);
				}
			}

			var l = 0;
			actb_cdelimword = -1;
			for (i=0;i<actb_delimwords.length;i++){
				if (caret_pos_end >= l && caret_pos_end <= l + actb_delimwords[i].length){
					actb_cdelimword = i;
				}
				l+=actb_delimwords[i].length + 1;
			}
			var t = actb_delimwords[actb_cdelimword].addslashes().trim();
		}else{
			var t = actb_curr.value.addslashes();
		}
		if (actb_firstText){
			var re = new RegExp("^" + t, "i");
		}else{
			var re = new RegExp(t, "i");
		}
		actb_total = 0;
		actb_tomake = false;
		actb_kwcount = 0;
		for (i=0;i<actb_keywords.length;i++){
			actb_bool[i] = false;
			if (re.test(actb_keywords[i])){
				actb_total++;
				actb_bool[i] = true;
				actb_kwcount++;
				if (actb_pre == i) actb_tomake = true;
			}
		}
		if (actb_toid) clearTimeout(actb_toid);
		if (actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list = 0;actb_removedisp();},actb_timeOut);
		actb_generate();

	}




//Dumps all Errors from memory & Do not get passed to the browser
  function handleError (err, url, line) {
    if (err.indexOf('is not defined') != -1) {
    //  alert('Oops, something is not defined.\n' +
     //        err + '\n' + url + '\nline no: ' + line);
      return true; // error is handled
    }
    else
      return true; // let the browser handle the error
  }
  window.onerror = handleError;

}



//Cks to make sure there are numbers in the fields
function KeyCheck(myfield,ev1)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (ev1) keycode = ev1.which;
else return true;
if (((keycode>47) && (keycode<58) )  || (keycode==8)) { return true; }
else return false;
}




function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
         }
      }
   }
}



/* This code is Copyright (c) 1996 Nick Heinle and Athenia Associates, 
 * all rights reserved. In order to receive the right to license this 
 * code for use on your site the original code must be copied from the
 * Web site webreference.com/javascript/. License is granted to user to 
 * reuse this code on their own Web site if and only if this entire copyright
 * notice is included. Code written by Nick Heinle of webreference.com.
 */

function formCheck(element11, element12) 
{


       
       if (document.Info.Bname.value == "") 
        {
        
        alert("Please Enter a COMPANY NAME.");
        return false;
        }
       if (document.Info.Address.value == "") 
        {
        
        alert("Please Enter a ADDRESS.");
        return false;
        }
       if (document.Info.City.value == "") 
        {
        alert("Please Enter a CITY.");
        return false;
        }
        if (document.Info.State.value == "") 
        {
        alert("Please Enter a STATE.");
        return false;
        }
       
			if(document.Info.State.value != "AL" 
				&& document.Info.State.value !="al"
				&& document.Info.State.value !="AK"
				&& document.Info.State.value !="ak"
				&& document.Info.State.value !="AS"
				&& document.Info.State.value !="as"
				&& document.Info.State.value !="AZ"
				&& document.Info.State.value !="az"
				&& document.Info.State.value !="AR"
				&& document.Info.State.value !="ar"
				&& document.Info.State.value !="CA"
				&& document.Info.State.value !="ca"
				&& document.Info.State.value !="CO"
				&& document.Info.State.value !="ca"
				&& document.Info.State.value !="CT"
				&& document.Info.State.value !="ct"
				&& document.Info.State.value !="DE"
				&& document.Info.State.value !="de"
				&& document.Info.State.value !="DC"
				&& document.Info.State.value !="dc"
				&& document.Info.State.value !="FM"
				&& document.Info.State.value !="fm"
				&& document.Info.State.value !="FL"
				&& document.Info.State.value !="fl"
				&& document.Info.State.value !="GA"
				&& document.Info.State.value !="ga"
				&& document.Info.State.value !="GU"
				&& document.Info.State.value !="gu"
				&& document.Info.State.value !="HI"
				&& document.Info.State.value !="hi"
				&& document.Info.State.value !="ID"
				&& document.Info.State.value !="id"
				&& document.Info.State.value !="IL"
				&& document.Info.State.value !="il"
				&& document.Info.State.value !="IN"
				&& document.Info.State.value !="in"
				&& document.Info.State.value !="IA"
				&& document.Info.State.value !="ia"
				&& document.Info.State.value !="KS"
				&& document.Info.State.value !="ks"
				&& document.Info.State.value !="KY"
				&& document.Info.State.value !="ky"
				&& document.Info.State.value !="LA"
				&& document.Info.State.value !="la"
				&& document.Info.State.value !="ME"
				&& document.Info.State.value !="me"
				&& document.Info.State.value !="MH"
				&& document.Info.State.value !="mh"
				&& document.Info.State.value !="MD"
				&& document.Info.State.value !="md"
				&& document.Info.State.value !="MA"
				&& document.Info.State.value !="ma"
				&& document.Info.State.value !="MI"
				&& document.Info.State.value !="mi"
				&& document.Info.State.value !="MN"
				&& document.Info.State.value !="mn"
				&& document.Info.State.value !="MS"
				&& document.Info.State.value !="ms"
				&& document.Info.State.value !="MO"
				&& document.Info.State.value !="mo"
				&& document.Info.State.value !="MT"
				&& document.Info.State.value !="mt"
				&& document.Info.State.value !="NE"
				&& document.Info.State.value !="ne"
				&& document.Info.State.value !="NV"
				&& document.Info.State.value !="nv"
				&& document.Info.State.value !="NH"
				&& document.Info.State.value !="nh"
				&& document.Info.State.value !="NJ"
				&& document.Info.State.value !="nj"
				&& document.Info.State.value !="NM"
				&& document.Info.State.value !="nm"
				&& document.Info.State.value !="NY"
				&& document.Info.State.value !="ny"
				&& document.Info.State.value !="NC"
				&& document.Info.State.value !="nc"
				&& document.Info.State.value !="ND"
				&& document.Info.State.value !="nd"
				&& document.Info.State.value !="MP"
				&& document.Info.State.value !="mp"
				&& document.Info.State.value !="OH"
				&& document.Info.State.value !="oh"
				&& document.Info.State.value !="OK"
				&& document.Info.State.value !="ok"
				&& document.Info.State.value !="OR"
				&& document.Info.State.value !="or"
				&& document.Info.State.value !="PW"
				&& document.Info.State.value !="pw"
				&& document.Info.State.value !="PA"
				&& document.Info.State.value !="pa"
				&& document.Info.State.value !="PR"
				&& document.Info.State.value !="pr"
				&& document.Info.State.value !="RI"
				&& document.Info.State.value !="ri"
				&& document.Info.State.value !="SC"
				&& document.Info.State.value !="sc"
				&& document.Info.State.value !="SD"
				&& document.Info.State.value !="sd"
				&& document.Info.State.value !="TN"
				&& document.Info.State.value !="tn"
				&& document.Info.State.value !="TX"
				&& document.Info.State.value !="tx"
				&& document.Info.State.value !="UT"
				&& document.Info.State.value !="ut"
				&& document.Info.State.value !="VT"
				&& document.Info.State.value !="vt"
				&& document.Info.State.value !="VI"
				&& document.Info.State.value !="vi"
				&& document.Info.State.value !="VA"
				&& document.Info.State.value !="va"
				&& document.Info.State.value !="WA"
				&& document.Info.State.value !="wa"
				&& document.Info.State.value !="WV"
				&& document.Info.State.value !="wv"
				&& document.Info.State.value !="WI"
				&& document.Info.State.value !="wi"
				&& document.Info.State.value !="wy"
				&& document.Info.State.value !="WY")




			{
			alert("Please enter a STATE");
			return false;
			}
        
        var trip=0;
        if(document.Info.Zip.value=="")
		 {
        alert("Please Enter a ZIP CODE.");
        return false;
		 }
		else
		 {
  			var zipper=new String(document.Info.Zip.value);
  			if((isNaN(document.Info.Zip.value)&& zipper.indexOf('-')!=5) || (zipper.length!=5 &&zipper.length!=10))
   		{
        alert("Please enter in a ZIP CODE.");
        return false;
   		}
  		}

   

        if (document.Info.P1.value == "" || document.Info.P2.value== "" || document.Info.P3.value== "") 
        {
        alert("Please Enter a PHONE NUMBER.");
        return false;
        }

	if (document.Info.Cname.value == "") 
        {
        
        alert("Please Enter a CONTACT NAME.");
        return false;
        }
	
              
        if (document.Info.Email.value.indexOf("@") == -1 ||
            document.Info.Email.value == "") 
        {
        alert("Please include a proper EMAIL address.");
        return false;
        }
        
        
  
	if (document.Info.services.value == "") 
        {
        
        alert("Please SELECT one Service.");
        return false;
        }
        
        var fieldalias="Password address field"


var passed=false
if (element11.value==''){
alert("Please fill out the "+fieldalias+"!")
element11.focus()
}
else if (element12.value==''){
alert("Please verify the "+fieldalias+"!")
element12.focus()
}
else if (element11.value!=element12.value){
alert("The two "+fieldalias+"s do not match")
element11.select()
}
else
passed=true

return passed
}


//Start Rev Tab
function RevTab(original,event,destination){
    var c = document.layers ? evt.which 
            : document.all ? event.keyCode
            : evt.keyCode;
    
if (c==8)
if (original.getAttribute&&original.value.length==original.getAttribute("minlength"))
destination.focus();
destination.value=destination.value

}
//end Rev Tab

//This is the beginning of the Tabbing Field
/*
Auto tabbing script- By JavaScriptKit.com
http://www.javascriptkit.com
This credit MUST stay intact for use
*/

function autotab(original,event,destination,prev){

if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
destination.focus()
    var c = document.layers ? evt.which
            : document.all ? event.keyCode
            : evt.keyCode;
   
     if (c==8)
     if (original.getAttribute&&original.value.length==original.getAttribute("minlength"))
     prev.focus();
     prev.value=prev.value

Caps()
 

}



function Caps(){
document.Info.State.value = document.Info.State.value.toUpperCase();

}

//Reverse Tab Delete Function
function RevTab(original,event,destination){

    var c = document.layers ? evt.which
            : document.all ? event.keyCode
            : evt.keyCode;
   
     if (c==8)
     if (original.getAttribute&&original.value.length==original.getAttribute("minlength"))
     destination.focus();
     destination.value=destination.value
 

}
//End of Reverse Tab

//Start of word count
<!--

function words(content){
	var i=0;
	var numberofwords=1;

	while(i<=content.length) {

		if (content.substring(i,i+1) == " ") {
			numberofwords++;
			i++; 
			// extra i++ makes it skip double spaces, or space/return
		}
		if (content.substring(i,i+1) == "\n") {
			numberofwords++;
			i++;
			// extra i++ makes it skip double spaces, or space/return

		}

		i++;
	}

	return numberofwords;
}

// -->
//end of work count

//being checking the form for NewU_AddListing.asp
function formCheckListing() 
{
       if (document.NewListing.ItemName.value == "") 
        {
        alert("Please put in a ITEMNAME.");
        return false;
        }

       if (document.NewListing.Category.value == "") 
        {
        alert("Please put in a CATEGORY.");
        return false;
        }

       if (document.NewListing.Title.value == "") 
        {
        alert("Please put in a TITLE.");
        return false;
        }
        
        if (document.NewListing.Description.value == "") 
        {
        alert("Please put in a DESCRIPTION.");
        return false;
        }
        
        if (document.NewListing.MinBid.value == "" || document.NewListing.MinBid.value == "$.00") 
        {
        alert("Please put in a MINIMUM BID.");
        return false;
        }
        
        if (document.NewListing.AuctionLength.value == "") 
        {
        alert("Please put in a AUCTION LENGTH.");
        return false;
        }
 }
//end form check

//begin parse number to currency

/*Parse number to currency format:
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/

//Remove the $ sign if you wish the parse number to NOT include it
var prefix="$"
var wd
function parseelement(thisone){
if (thisone.value.charAt(0)=="$")
return
wd="w"
var tempnum=thisone.value
for (i=0;i<tempnum.length;i++){
if (tempnum.charAt(i)=="."){
wd="d"
break
}
}
if (wd=="w")
thisone.value=prefix+tempnum+".00"
else{
if (tempnum.charAt(tempnum.length-2)=="."){
thisone.value=prefix+tempnum+"0"
}
else{
tempnum=Math.round(tempnum*100)/100
thisone.value=prefix+tempnum
}
}
}

//end parse element to currency

//add File Upload box to a form

     function validateForm(objForm){
          var strError="";
          var objInput="";
          var bOk=true;
          /*
          for(x=1;x<=parseInt(objForm.row_count.value);x++){
               if(!document.getElementById("File"+x).value){
                    alert("Photo " + x +" is empty");
               }
          }*/
          if(!document.getElementById("File"+document.getElementById("row_count").value).value){
               bOk=confirm("The last File value element is empty!\nThere will be no value entered for that option.\nClick OK to continue or Cancel to return to the form and complete the last file"); 
          }
          return bOk;
     }
     
     function delRow(aTable){
          if(!document.getElementById("File"+document.getElementById("row_count").value).value){
               if(aTable.rows.length > 1){
                       aTable.deleteRow(aTable.rows.length-1);
                  document.getElementById("row_count").value=parseInt(document.getElementById("row_count").value)-1;  
               }else{
                    alert("Cannot delete Photo 1.\nIf there are no Photos for this item leave Photo 1 blank.") 
               }
          }else{
               if(confirm("There is data in the last Photo option!\nClick Ok to delete the option and contents \nor click Cancel to return to the input options")){
                    aTable.deleteRow(aTable.rows.length-1);
                  document.getElementById("row_count").value=parseInt(document.getElementById("row_count").value)-1;       
               } 
          }
    }
     
     
    function addRow(aTable) {
          if(document.getElementById("File"+document.getElementById("row_count").value).value){
                  document.getElementById("row_count").value=parseInt(document.getElementById("row_count").value)+1;
             var iNumFile =parseInt(document.getElementById("row_count").value)
               aRow = aTable.insertRow(aTable.rows.length);
             aCell0 = aRow.insertCell(0);
                 aCell1 = aRow.insertCell(1);
               aCell2 = aRow.insertCell(2);
             aCell0.innerHTML = "File " + iNumFile +":";
                 aCell1.innerHTML = '<input type="file" name="File' + iNumFile +'" rows="8" cols="40">';
               //aCell2.innerHTML = '<input type="text" name="text' + iNumtext +'" rows="8" cols="40">'
          }else{
               alert("Cannot add another File until the previous File has been entered");
          }
    }
//end Add file upload box to a form