<!--
window.onerror = handleErrors; // or null to suppress error message
function handleErrors(msg, url, line)
{ return true; }

// top image rollovers

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


// case studies popup
function popup(mypage) 
{ 
	var wina
	var ht=450;
	var wd=700;
	var wint=(screen.height - ht) / 2; 
	var winl=(screen.width - wd) / 2;
	wina=window.open(mypage, 'samples', 'resizable=1,scrollbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+'') 
if (parseInt(navigator.appVersion) >=4) 
{ wina.window.focus(); }
 } 

function popup2(mypage) 
{ 
	var wina;
	var ht=570;
	var wd=750;
	var wint=(screen.height - ht) / 2; 
	var winl=(screen.width - wd) / 2;
	wina=window.open(mypage, 'samples', 'resizable=1,scrollbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+'') 
if (parseInt(navigator.appVersion) >=4) 
{ wina.window.focus(); } 
} 

function popupr(mypage) 
{ 
	var wina;
	var ht=475;
	var wd=750;
	var wint=(screen.height - ht) / 2; 
	var winl=(screen.width - wd) / 2;
	wina=window.open(mypage, 'samples', 'resizable=1,scrollbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+'') 
if (parseInt(navigator.appVersion) >=4) 
{ wina.window.focus(); } 
} 

function popup3(mypage) 
{ 
	var winc
	var ht=480
	var wd=670
	var wint=(screen.height - ht) / 2; 
	var winl=(screen.width - wd) / 2;
	winc=window.open(mypage, 'sc', 'resizable=1,scrollbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+'') 
if (parseInt(navigator.appVersion) >=4) 
{ winc.window.focus(); } 
// return false;
} 

function popup4(mypage) 
{ 
	var wind
	var ht=450
	var wd=640
	var wint=(screen.height - ht) / 2; 
	var winl=(screen.width - wd) / 2;
	winc=window.open(mypage, 'sc2', 'resizable=1,scrollbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+'') 
if (parseInt(navigator.appVersion) >=4) 
{ wind.window.focus(); } 
} 


function popup5(mypage) 
{ 
	var wina
	var ht=450;
	var wd=450;
	var wint=(screen.height - ht) / 2; 
	var winl=(screen.width - wd) / 2;
	wina=window.open(mypage, 'samples', 'resizable=1,scrollbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+'') 
if (parseInt(navigator.appVersion) >=4) 
{ wina.window.focus(); }
 } 

 
function popup6(mypage) 
{ 
	var wina;
	var ht=570;
	var wd=760;
	var wint=(screen.height - ht) / 2; 
	var winl=(screen.width - wd) / 2;
	wina=window.open(mypage, 'samples', 'resizable=1,scrollbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+'') 
if (parseInt(navigator.appVersion) >=4) 
{ wina.window.focus(); } 
}  

function popup7(mypage) 
{ 	var wina;
	var ht=270;
	var wd=760;
	var wint=0; 
	var winl=0;
	wina=window.open(mypage, 'samples','toolbar=yes,scrollbars=yes,resizable=yes,location=yes,status=no,copyhistory=yes,height='+ht+',width='+wd+',top='+wint+',left='+winl+''	) 
// , 'resizable=1,scrollbars=1,toolbars=1,height='+ht+',width='+wd+',top='+wint+',left='+winl+''	
if (parseInt(navigator.appVersion) >=4) 
{ wina.window.focus(); } 
} 

// add to favorites
function bookmark() {
window.external.AddFavorite(window.location,window.document.title);
var url=window.location;
var title=window.document.title;
}
function bookmark2(id,coname) {
window.external.AddFavorite('http://www.rdbup.com/?id='+id,coname+' - Remote Data Backups');
var url='http://www.rdbup.com/?id=' + id;
var title=coname +' - Remote Data Backup';
}

function emailpg()
	{ window.location='mailto:email?subject='+window.document.title+'&body=I just found a link on www.remotedatabackups.com that I thought you might be interested in - '+window.location; }
function printpg() {
window.open(printit,'http://www.remotedatabackups.com/_print.cfm?pg='&window.location&'&ttl='&window.document.title)
}

	
function bookmarks() {
window.external.AddFavorite('http://www.remotedatabackups.com/sales/','Remote Data Backups Partner Extranet');
var url='http://www.remotedatabackups.com/sales';
var title='Remote Data Backups Partner Extranet';
}
function bookmarkf() {
window.external.AddFavorite('http://www.remotedatabackups.com/franchise/','Remote Data Backups Franchisor Extranet');
var url='http://www.remotedatabackups.com/franchise/';
var title='Remote Data Backups Franchisor Extranet';
}
function bookmarka() {
window.external.AddFavorite('http://www.remotedatabackups.com/franchise/','Remote Data Backups Account Extranet');
var url='http://www.remotedatabackups.com/account/';
var title='Remote Data Backups Account Extranet';
}


function login() { 
	if (document.form.username.value=="partner" && document.form.password.value=="success")
		{ 
		document.form.submit();
		}
	else
		alert("Please call or e-mail us for a guest username and password.") 
	}	

// validation
// email address

function validatep() {
	var msg='';
	if(document.theform.firstname.value == '')	
		{ msg=msg+" - First Name \r"; }
	if(document.theform.lastname.value == '')
		{ msg=msg+" - Last Name \r"; }
	str=document.theform.email.value;
	if((str.indexOf(".") > 2) && (str.indexOf("@") > 0))
		{ }
		else
		{ msg=msg+" - Valid Email Address \r"; }
	if(document.theform.phone.value.length < 7)
		{ msg=msg+" - Phone Number \r";}
	if(document.theform.address.value.length < 5)
		{ msg=msg+" - Address \r";}
	if(document.theform.city.value.length < 3)
		{ msg=msg+" - City \r";}
	if(document.theform.state.value == '')
		{ msg=msg+" - State \r"; }
	if(document.theform.zip.value.length < 4)
		{ msg=msg+" - Zip \r";}
	if(document.theform.country.value.length < 2)
		{ msg=msg+" - Country \r";}
	if(document.theform.pw.value.length < 6)
		{ msg=msg+" - Valid Password (at least 6 characters) \r";}
	if(document.theform.logo.value.length > 4)
		{ 
		if(document.theform.logo.value.length < 7)
			{ msg=msg+" - Valid URL \r";}
		}
	if(document.theform.actid.value.length < 3)
		{ msg=msg+" - Partner ID needs to be between at least 3 characters \r";}
	else if(document.theform.actid.value.length > 9)
		{ msg=msg+" - Partner ID needs to be no more than 9 characters \r";}
	else if(!isNaN(document.theform.actid.value))
		{ msg=msg+" - Partner ID cannot be all numbers \r";}
	if(document.theform.agree.checked)
		{ }
			else
		{ msg=msg+" - Check 'I accept the Affiliate Agreement Terms and Conditions' \r";}
	if(msg.length > 0)	
		{ alert("Please correct the following input errors: \r" + msg); }
	if(msg.length == 0)	
		{ document.theform.submit(); }	
}	

function validateu() {
	var msg='';
	if(document.theform.name.value.length < 3)	
		{ msg=msg+" - Name \r"; }
	str=document.theform.email.value;
	if((str.indexOf(".") > 2) && (str.indexOf("@") > 0))
		{ }
		else
		{ msg=msg+" - Valid Email Address \r"; }
	if(document.theform.phone.value.length < 7)
		{ msg=msg+" - Phone Number \r"; }
	if(document.theform.oldid.value.length < 9 || document.theform.oldid.value.length > 11)
		{ msg=msg+" - Valid Account ID (9-10 numbers) \r";}
	if(document.theform.newtype.value =='')
		{ msg=msg+" - New Size \r";}
	if(msg.length > 0)	
		{ alert("Please correct the following input errors: \r" + msg); }
	if(msg.length == 0)	
		{ document.theform.submit(); }	
}

function emailCheck (emailStr) {
	var checkTLD=1;
	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);
	if (matchArray==null) {
		alert("Email address seems incorrect (check @ and .'s)");
		return false;
	}
	var user=matchArray[1];
	var domain=matchArray[2];
	for (i=0; i<user.length; i++) {
		if (user.charCodeAt(i)>127) {
			alert("Ths username contains invalid characters.");
			return false;
		   }
		}
	for (i=0; i<domain.length; i++) {
		if (domain.charCodeAt(i)>127) {
		alert("Ths domain name contains invalid characters.");
		return false;
		   }
		}
	if (user.match(userPat)==null) {
		alert("The username doesn't seem to be valid.");
		return false;
		}
	var IPArray=domain.match(ipDomainPat);
	if (IPArray!=null) {
		for (var i=1;i<=4;i++) {
		if (IPArray[i]>255) {
		alert("Destination IP address is invalid!");
		return false;
		   }
		}
		return true;
		}
	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	for (i=0;i<len;i++) {
		if (domArr[i].search(atomPat)==-1) {
		alert("The domain name does not seem to be valid.");
		return false;
		   }
		}
	if (checkTLD && domArr[domArr.length-1].length!=2 && 
	domArr[domArr.length-1].search(knownDomsPat)==-1) {
		alert("The address must end in a well-known domain or two letter " + "country.");
		return false;
		}
	if (len<2) {
		alert("This address is missing a hostname!");
		return false;
		}
	return true;
}

function validated() {
	var msg='';
	if(document.theform.name.value == '')	
		{ msg=msg+" - Name \r"; }
	if(document.theform.phone.value.length < 7)
		{ msg=msg+" - Phone Number \r";}
	str=document.theform.email.value;
	if((str.indexOf(".") > 2) && (str.indexOf("@") > 0))
		{ }
		else
		{ msg=msg+" - Email Address \r"; }
	if(document.theform.message.value.length < 5)
		{ msg=msg+"message";}
	if(msg.length > 0)	
		{ alert("Please correct the following input errors: \r" + msg); }
	if(msg.length == 0)	
		{ // return true;
		document.theform.submit(); 
		}	
}	

function validatet() {
	var msg='';
	if(document.theform.name.value == '')	
		{ msg=msg+" - Name \r"; }
	if(document.theform.phone.value.length < 7)
		{ msg=msg+" - Phone Number \r";}
	str=document.theform.email.value;
	if((str.indexOf(".") > 2) && (str.indexOf("@") > 0))
		{ }
		else
		{ msg=msg+" - Email Address \r"; }
	if(msg.length > 0)	
		{ alert("Please correct the following input errors: \r" + msg); }
	if(msg.length == 0)	
		{ // return true;
		document.theform.submit(); 
		}	
}	
function validatecont() {
	var msg='';
	if(document.theform.firstname.value.length < 4)	
		{ msg=msg+" - First Name \r"; }
	if(document.theform.lastname.value.length < 4)	
		{ msg=msg+" - Last Name \r"; }
	if(document.theform.company.value.length < 3)	
		{ msg=msg+" - Company \r"; }
	if(document.theform.phone.value.length < 10)
		{ msg=msg+" - Valid Phone Number \r";}
	str=document.theform.email.value;
	if((str.indexOf(".") > 2) && (str.indexOf("@") > 0))
		{ }
		else
		{ msg=msg+" - Valid Email Address \r"; }
	if(msg.length > 0)	
		{ alert("Please correct the following input errors: \r" + msg); }
	if(msg.length == 0)	
		{ // return true;
		document.theform.submit(); 
		}	
}	

function newmsg(themsg) {
var msg = new Array()
	msg[0] = "Roll over a resource below for a detailed description, or click the link to open the file in a new window."
	msg[1] = "We automatically create & host your own complete marketing site, with your logo, contact info & specific instructions."
	msg[2] = "Easily customize our 2-page RDB flyer with your logo and contact info, then print as many as you need."
	msg[3] = "Cut and paste our page of content into your company's website, and sell RDB as an extension of your services."
	msg[4] = "Use our banner ads on your corporate Website, or other sites, to draw attention and traffic to your branded site."
	msg[5] = "IT Techs: Leave desktop and browser shortcuts to your branded site on every computer you service or sell."
	msg[6] = "Customize and send our email templates to educate your all clients and get them to try your new service."
	msg[7] = "Add a line about RDB to your email signature that gets your clients interested in your new backup  service."
	msg[8] = "Track your client's backup accounts, contacts, and payments, with our secure and powerful extranet."
	msg[9] = "We can make you customized executable files so we can identify your accounts without relying on user input."
	msg[10] = "IT Consultants: Update your profile, then qualify for IT project leads from around the franchise community."
	msg[11] = "We'd be happy to mail you as many of these glossy, full-color, 4-page printed brochures as you need."
	msg[12] = "Add any of these banner ads to your company's site to attract attention and drive traffic to your partner site."
message.innerHTML=msg[themsg];

}

function hs(theid) {
	switch(theid) {
		case "z":
			if (document.all['z'].style.display == '') 
			{ document.all['z'].style.display = 'none'; 
				} 
			else { document.all['z'].style.display = '';
			 }
	}
}
/*
function CheckNumeric()
{
   // Get ASCII value of key that user pressed
   var key = window.event.keyCode;

   // Was key that was pressed a numeric character (0-9)?
   if ( key > 47 && key < 58 )
      return; // if so, do nothing
   else
      window.event.returnValue = null; // otherwise, 
	                               // discard character
}

function dln(file,redUrl,extUrl) {
  var browser = (window.navigator.userAgent.indexOf("SV1") != -1);
  //alert(file);
      if (browser && extUrl==0) {
		var myDownloadWin=window.open(file,'dlnow','toolbar=0,location=no,directories=0,status=0,scrollbars=no,resizable=0,width=1,height=1,top=0,left=0');
		       location.href = redUrl;
        } else {
            location.href = redUrl;
        }
}
*/
-->