function loginCheck()
{
  //document.login.target='_blank';
  if (document.login['LoginName'].value=='' || document.login['LoginPin'].value=='')
    {alert("You need to add your username and password to log in."); return false;}
  else
    {return true;}
};

function popUp(url)
{
	sealWin=window.open(url,"win",'toolbar=0,location=0, directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
	self.name = "mainWin";
}


/* These functions adds a disclosure to all off site links */
var links;
var areas;			// Added as they use image maps extensively
var linkDisclosure = 	"You are now leaving this web site, headed to a third party website not operated by this site.\n\n We are not responsible for the content of this new site, nor are we in control of any transactions that occur outside of our site.\n\n Please review the new site's privacy and security policies, as they may differ from those of this site.";

function addLinkDisclosure () {
	if(!document.getElementsByTagName || !document.domain) return false; // exit if we can't do it
	
	var offSite = new Array; 								// For our links that lead off site
	var domain = document.domain;							// The domain of the current document
	domain = domain.replace('www.', '');					// To make things consistant take out "www."
	var domainRegex = new RegExp(domain+"|mailto|cuanswers\.com|itsme247\.com|cuathome\.org|javascript", "i"); 	// Cuz vars in /regexes/ can be sticky
	links = document.getElementsByTagName('A'); 			// An array of all our page link objects
	areas = document.getElementsByTagName('area');

	for(var i=0; i<links.length; i++) {
		if(links[i].href !="" && !links[i].href.match(domainRegex)) {
			offSite.push(links[i].href);
			links[i].target = "_blank";
			links[i].onclick = function () {
				return window.confirm(linkDisclosure);
			}
		}
	}

	for(var i=0; i<areas.length; i++) {
		if(!areas[i].href.match(domainRegex)) {
			areas[i].target = "_blank";
			areas[i].onclick = function () {
				return window.confirm(linkDisclosure);
			}
		}
	}
}

