function checkVals() {
        invalid=false;
        req=new Array('my_cost','my_rental','my_provider','my_speed','post_code','provider_rating');
        reqNice=new Array('Monthly Broadband Cost','Monthly Phone Line Rental','Current Broadband Provider','Speed','State','Rate your provider');
        txtarr=new Array();
        cnt=0;
        txt="Please ensure you have entered a value for:\n";
        for(i=0;i<req.length;i++) {
                oEl=document.getElementById(req[i]);
                if(oEl) {
                if(oEl.value=='' || oEl.value=='-') {
                        invalid=true;
                        txtarr[cnt]=reqNice[i];
                        cnt++;
                }
                }
        }
        txt+=txtarr.join(', ');
        if(invalid) {
                alert(txt);
                return false;
        } else {
                return true;
        }
}

//function to slide email box into out of view
var pid = 0,
linkCnt = 0;
function run(){
   //var tab1 = document.getElementById('tab1');
   //tab1Top = tab1.style.top;
   //alert(tab1Top);
   clearTimeout(pid);
   var height = parseInt(document.getElementById("links").style.height);
   var chk=document.getElementById("my_emailme");
   if(chk.checked) {
           if( height < 40 && linkCnt < 40){
             //100 can be replaced with the desired height!
              linkCnt+=2;
              document.getElementById("links").style.height = linkCnt+'px';
              //tab1.style.top = (tab1Top + linkCnt) + 'px';
              pid=setTimeout("run();", 15);
           }
   } else {
          //if(linkCnt < 1) linkCnt=40;
          if( height > 0 && linkCnt > 0) {
              linkCnt-=2;
              document.getElementById("links").style.height = linkCnt+'px';
              //tab1.style.top = (tab1Top - linkCnt) + 'px';
              pid=setTimeout("run();", 15);
        }
   }
}
