function getName(){
var articleName = "";
if (location.search){
	var ary=window.location.search.substr(1).split("&");
	for (i=0;i<ary.length;i++) {
		ary[i]=ary[i].split("=");
		}
	var qStr=new Array();
	for (i=0;i<ary.length;i++) {
		ary[i][0]=ary[i][0].replace(/\+/g," ");
		ary[i][0]=unescape(ary[i][0]);
		if (ary[i][1]) {
			ary[i][1]=ary[i][1].replace(/\+/g," ");
			ary[i][1]=unescape(ary[i][1]);
			qStr[ary[i][0]]=ary[i][1];
		} else {
			qStr[ary[i][0]]= "";
		}
		
	}
	if (qStr["articleName"]) {
			articleName = qStr["articleName"].replace(/_/g," ");
	}
}
return articleName;
}

function fullscreen(url) {
  w = screen.availWidth-10;
  h = screen.availHeight-170;
  features = "width="+w+",height="+h;
  features += ",left=0,top=0,screenX=0,screenY=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes";

  window.open(url, "", features);
}

function showmenus(showChannel) {
	if (showChannel == 'essay') {showChannel = 'applying';}  
	d = document.getElementsByTagName("*");
	showclass = showChannel + "_nav";
	nav = showChannel + "_main_nav";
	for(i=0; i<d.length; i++){
		if(d[i].className == showclass) {
			d[i].style.display = 'block';
			document.getElementById(nav).className = 'selected';
			//fix for IE - IE does not change according to style correctly
			document.getElementById(nav).childNodes[0].style.background='url("http://www.educationplanner.com/education_planner/images/nav_nonactive_bg.jpg")';
			document.getElementById(nav).childNodes[0].style.color='#371000';
		}
	}
	m = document.getElementById("leftNav").getElementsByTagName("a");
	for(i=0; i<m.length; i++){
		if (m[i] == document.URL) {
			m[i].style.color='#371000';
			m[i].style.fontWeight = 'bold';
		}
	}
}

function createBreadcrumb(ShowChannel) {
	if (ShowChannel == 'essay') {ShowChannel = 'applying';}
	var off_domain = 0;
	if (location.host=="ww1.educationplanner.com") {off_domain = 1; }
	
	//Home Crumb
	var AES_breadcrumb = '<a href="';
	if (off_domain) {AES_breadcrumb = AES_breadcrumb + 'http://www.educationplanner.com';}
	AES_breadcrumb = AES_breadcrumb + '/education_planner/default.asp?sponsor=2859">Home</a> > ';
    
    //Sector Crumb
	if (ShowChannel.toUpperCase() == document.title.toUpperCase() || "about,contact,sitemap,counselors,parents,my".indexOf(ShowChannel) != -1) {
		AES_breadcrumb = AES_breadcrumb + document.title;
	} else {
		AES_breadcrumb = AES_breadcrumb + ' <A href="';
		if (off_domain) {AES_breadcrumb = AES_breadcrumb + 'http://www.educationplanner.com';}
		AES_breadcrumb = AES_breadcrumb + '/education_planner/' + ShowChannel + '.asp?sponsor=2859">' + ShowChannel.substr(0,1).toUpperCase() + ShowChannel.substr(1) + '</a> > ';
		
		//Final Crumb 
		if (getName() != "") {
			AES_breadcrumb = AES_breadcrumb + getName();	
		} else if (defLoc != "") {
			AES_breadcrumb = AES_breadcrumb + defLoc;
		} else {
			AES_breadcrumb = AES_breadcrumb + document.title;	
		}
	}

    document.getElementById("breadcrumb").innerHTML=AES_breadcrumb;
    
    if (paths[0].toLowerCase() == "votech") {
		document.getElementById("breadcrumb").style.height="25px";
	}
}