<!-- Begin
/*function includejsfile(jsFile) {
  document.write('<script type="text/javascript" src="'+ jsFile + '"></script>'); 
}
includejsfile('/code/yellowfade.js');
*/

// Character Counter
function countCharacters(textArea, counterField, maxLength){		
	if(textArea !=null && textArea.value != null) {
		if (textArea.value.length > maxLength){
				alert("Your message may not exceed " +  maxLength +" characters in length.");
				textArea.value = textArea.value.substring( 0, maxLength);
		} else {
				counterField.value = maxLength - textArea.value.length;
		}
	}
}


// Popup Windows
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1014,height=699,left = 0,top = 0');");
}

function showcover(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=834,height=584,left=0,top=0');");
}

function showcontents(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=855,height=600,left=0,top=0');");
}

function jumpto(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=800,height=580,left=0,top=0');");
}

function readmag(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1014,height=699,left = 0,top = 0');");
}


// Open external links in new window using the "rel" attribute
// from http://www.sitepoint.com/article/standards-compliant-world
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

// End -->