<!--
function confirmDelete(delUrl) {

	if (confirm("You are about to delete this story. Continue?")) {
		document.location = delUrl;
	}
}

function swapPic()

 {
 if(document.getElementById)
   {
   var thePicture=document.getElementById("promo-jpg");
   var picPath="images/home-rotate-0"+rnd(5)+".jpg";
   thePicture.style.background="url("+picPath+")";
   }
 }

function rnd(n)
 {
 return Math.floor(Math.random() * n) + 1;
 }
 
 
 clearDefault = function(obj) {

	if (obj.defaultValue == obj.value) obj.value = ''

}

function sendMail(url, subj) {
	
	url = urlencode(url);
	var bod="&body="+url;
	var subj="?subject=NAS Website Link";
	location.href="mailto:"+subj+bod;
} 

function urlencode(str) {
str = escape(str);
str = str.replace('+', '%2B');
str = str.replace('%20', '+');
str = str.replace('*', '%2A');
str = str.replace('index.html', '%2F');
str = str.replace('@', '%40');
return str;
}

/*jQuery*/

//For each kind of elements you want to target, removeClass and addClass are needed. This will avoid multiplyer effect.
changeFont = function(obj) {

 $('div#resizable-text').removeClass('small medium large');

 $('div#resizable-text').addClass(obj);
 
 $('div#resizable-text').removeClass('small medium large');
 
 $('div#resizable-text p').removeClass('small medium large');

 $('div#resizable-text p').addClass(obj);
 
 //$('div#resizable-text div').removeClass('small medium large');

 //$('div#resizable-text div').addClass(obj);

 $('div#resizable-text ul li').removeClass('small medium large');

 $('div#resizable-text ul li').addClass(obj);

 $('div#resizable-text table td').removeClass('small medium large');

 $('div#resizable-text table td').addClass(obj);
 
 $('div.resizable-text').removeClass('small medium large');

 $('div.resizable-text').addClass(obj);

}



$(document).ready(function() {

	$('ul#sub-nav li.expandable a.switch').bind('click', function(e) {
			
			if ($(this).parent().hasClass('expandable')) {

				$(this).parent().toggleClass('open');

			}

			return false;

	});

});

/* For Sidenav */

//This one just sets the cookie display is controlled by the jQuery
function toggleView(id) {
	var t = document.getElementById(id);
		//document["img" + id].src = "./imgs/";
	var id = escape(id);
	//var sec = id.split('_');
		
	if(t.style.display == 'none') {
			t.style.display = 'block';
			//alert('Cookie ID: '+id+i);
			//t.style.backgroundImage   = 'none';
			setCookie(id);
	} else if(t.style.display == 'block') {
		t.style.display = 'none';
		unsetCookie(id);
	}
		
}

function setCookie(id) {
	id = escape(id);
	exp=new Date();
	exp.setTime(exp.getTime()+1000*60*60*24*1);
	document.cookie = id+"=" + "on" + "; path=/";
}

function unsetCookie(id) {
	id = escape(id);
	document.cookie = id+"=" + "off" + "; path=/";
}
/*
function getCkie() {
	//if (navigator.cookieEnabled != undefined)
	//alert("Plese enable your cookie!");
	strCk = "";
	t = aryCk = document.cookie.split("; ");//Load cookie
	//alert(t);
	for(x in t) {
		aryCk[x] = t[x].split("=");//Load cookie
		//alert(aryCk[x][0]);
	}
	
	i = 0;
	while(aryCk[i]) {
		if (aryCk[i][0] && aryCk[i][1] == "on") {
			v = aryCk[i][0];
			if (document.getElementById(v)) {
				document.getElementById(v).style.display = 'block';
			}			
		}
		i++;
	}

	path = location.pathname.split('/');
	cur_path = "/"+path[1]+"/";
	antr_path = document.referrer.split('/');
	prev_path = antr_path[4];
		//alert(window.history.previous);
	if (cur_path != prev_path) {
		t = aryCk = document.cookie.split("; ");//Load cookie
		for(x in t) {
			aryCk[x] = t[x].split("=");//Load cookie
		}
	}
}


function limitText(limitField, limitCount, limitNum) {

	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);

	} else {

		limitCount.value = limitNum - limitField.value.length;

	}

}*/
 //-->