var agree=confirm("You are now leaving*the website and link to the third party website. Do you wish to continue?");
return true ;
return false ;
Note that you are expecting confirmSubmit to return true or false; if it is true, you return true, otherwise you return false. This action could just as well be coded by:
return confirm ("blah blah blah");
which, in turn, could be replaced with confirm, and toss confirmSubmit entirely.
The problem, however, lies in the definition of true and false. I think you may solve your problem if you use the following:
if (!confirm ("blah blah blah")) return false; else return true;