function Toggle(item){ obj=document.getElementById(item);
                  visible=(obj.style.display!="none")
                  key=document.getElementById("x" + item);
      if(visible){obj.style.display="none";} 
            else {obj.style.display="block";}
      }
function newWindow(mypage,myname,w,h,features){
            var winl = (screen.width-w)/2;
            var wint = (screen.height-h)/2;
            if (winl < 0) winl = 0;
            if (wint < 0) wint = 0;
            var settings = 'height=' + h + ',';
            settings += 'width=' + w + ',';
            settings += 'top=' + wint + ',';
            settings += 'left=' + winl + ',';
            settings += features;
            win = window.open(mypage,myname,settings);
            win.window.focus();
         }
function copyit(theField){
    var tempval=eval("document."+theField)
        tempval.focus()
        tempval.select()
        therange=tempval.createTextRange()
        therange.execCommand("Copy")
        }
var count = "750"; 
function limiter(){
      var tex = document.ContactDescriptionForm.Description.value;
      var len = tex.length;
      if(len > count){
          tex = tex.substring(0,count);
          document.ContactDescriptionForm.Description.value =tex;
          return false;}
      document.ContactDescriptionForm.limit.value = count-len;
    }
var count = "750"; 
function limiter2(){
      var tex = document.States.Description.value;
      var len = tex.length;
      if(len > count){
          tex = tex.substring(0,count);
          document.States.Description.value =tex;
          return false;}
      document.States.limit.value = count-len;
    }
var attachments=new Array('A1','A2','A3','A4');
function Attach(act) {
     if (act=="on") {
	for(i=0;i<attachments.length;i++) {
	   var disp=document.getElementById(attachments[i]);
     if (disp.style.display=="none") {
		disp.style.display="";
		break; }
     if (i==attachments.length-1) alert('Sorry, you cannot upload more than 5 files at a time!'); }}
else {
     for(i=attachments.length-1;i>=0;i--) {
	   var disp=document.getElementById(attachments[i]);
     if (disp.style.display=="") {
		disp.style.display="none";
		break; }}}
   }
