  <!--

// Menu Button Functions //

function btnUp(obj)   { obj.className = "NavUp"; }
function btnHide(obj) { obj.className = "NavOff"; }
function btnDown(obj) { obj.className = "NavDown"; }

function popup(url,width,height,winname) {
  var url, width, height;
  if (width == null)  { width  = 200; }   // default width
  if (height == null) { height = 400; }   // default height
  newwin=window.open(url,winname,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+width+',height='+height);
 if (document.all){
  newwin.moveTo(0,0);
  } 

}

function message_view(myform,windowname){

strformat = myform.format.selectedIndex

if(myform.format.value == ""){
alert("Please Select a Format")
return false;
}

strindex = "txt"
if(myform.format.options[strformat].text == "HTML"){
strindex = "html"
}

newwin = window.open('message_view.asp?format='+strindex, windowname, 'height=600,width=800,scrollbars=no');
if (document.all){
newwin.moveTo(0,0);
}
return true;
}


function deletion(){
    	msg = "________________________________\n\n";
		msg += "You are about to delete marked records!\n";
		msg += "________________________________\n\n";
		msg += "Click OK to continue or Cancel to stop.\n";

    if (confirm(msg) )

    return true;
	else
    return false;
  }


function checkinvalid(invalid) {

   if (!invalid) return false;
   var iChars = " *|,\":<>[]{}`\';()&$#%";

   for (var i = 0; i < invalid.length; i++) {
      if (iChars.indexOf(invalid.charAt(i)) != -1)
         return false;
   }
   return true;
} 


function check_send_form(f) {

if(f.format.value == ""){
alert("Must Choose a Format.");
f.format.focus(); // put the prompt in the name field 
if(document.all || document.getElementByID){
f.format.style.background = "yellow";
}
return false;
}

if(f.subject.value == ""){
alert("Subject can't be empty.");
f.subject.focus(); // put the prompt in the name field 
if(document.all || document.getElementByID){
f.subject.style.background = "yellow";
}
return false;
}

if(f.message.value == ""){
alert("Message can't be empty.");
f.message.focus(); // put the prompt in the name field 
if(document.all || document.getElementByID){
f.message.style.background = "yellow";
}
return false;
}

 


msg = "MailerFree - Confirmation\n";
msg += "__________________________________________\n\n";
msg += "You are about to send email, make sure..\n";
msg += "1) Right format is chosen.\n";
msg += "2) Have Ticked Test Email, if test email.\n";
msg += "3) Subject and Message is correct.\n\n";
msg += "_________________________________________\n";
msg += "Click OK to continue or Cancel to stop.\n";

if(f.test_email.checked == false){
for(i=0;i<f.length;i++)
  if(f.elements[i].type == "submit"){
  f.elements[i].disabled = true;
}
}
    if (confirm(msg) )	

return true;	
else


for(i=0;i<f.length;i++)
  if(f.elements[i].type == "submit"){
  f.elements[i].disabled = false;
}

    return false;
}

function supportform(myform, windowname){
if (! window.focus)return true;
window.open('', windowname, 'height=500,width=500,scrollbars=no');
myform.target=windowname;
return true;
}

function checkinvalid(invalid) {

   if (!invalid) return false;
   var iChars = " *|,\":<>[]{}`\';()&$#%";

   for (var i = 0; i < invalid.length; i++) {
      if (iChars.indexOf(invalid.charAt(i)) != -1)
         return false;
   }
   return true;
}                      


function check_email(e) {
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){ 
return (false);
}	
} 

if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);		
} 
}
}

function delete_records(){

	msg = "Confirmation\n";
    	msg += "________________________________\n\n";
	msg += "You are about to delete all\nsubscriber records!\n";
	msg += "________________________________\n\n";
	msg += "Click OK to continue or Cancel to stop.\n";

    if (confirm(msg) )

    return true;
	else
    return false;
  }

function rego_form(f){

msg="Error in Registration Form\n\n";
error = "";

if(f.lid.value == ""){
msg +="License ID field can not be blank.\n"
error = "no"
}

if(f.lid.value.length != 10){
msg +="Please check your License ID it seems to be invalid.\n"
error = "no"
}

if(error=="no"){
alert(msg);
return false;
}
}

// Lauch the Online Help //
//-----------------------------------------------------------------------------------------//

function helplaunch(url,id){
		if (document.all) {
		windowheight = screen.availHeight;
		rightwidth=240;
		leftwidth=screen.availWidth-rightwidth-11;
		AFMwindow=window.open(url+'/help.asp?id='+id,'help','width='+rightwidth+',height='+(windowheight-51)+',screenX='+leftwidth+',screenY=0,top=0,left=' +leftwidth+',toolbar=0,location=0,status=1,menubar=0,resizable=1');
		AFMwindow.focus();
	} else {
		AFMwindow=window.open(url+'/help.asp?id='+id,'','width=240,height=480,toolbar=0,location=0,status=1,menubar=0,resizable=1');
	}
}

//-->