// JavaScript Document


function addEvent(elm, evType, fn, useCapture)
{
	if (elm.addEventListener)
	{
		elm.addEventListener(evType, fn, useCapture);
		return true;
	}
	else if (elm.attachEvent)
	{
		var r = elm.attachEvent('on' + evType, fn);
		return r;
	}
	else
	{
		elm['on' + evType] = fn;
	}
}


function get_cookie(Name)
{
	var search = Name + "="
	var returnvalue = ""

	if (document.cookie.length > 0)
	{
		offset = document.cookie.indexOf(search)
	
		if (offset != -1)
		{
			offset += search.length
			end = document.cookie.indexOf(";", offset)
			if (end == -1)
				end = document.cookie.length;
			returnvalue=unescape(document.cookie.substring(offset, end))
		}
	}
	
	return returnvalue;
}

	
function load_publication(ddl, rf)
{
	if (ddl.value != 'Issues')
	{
		//var strUrl = "/newsstand/load_issue.aspx?issue_id=" + ddl.value
		var strUrl = '/pdfs/pubs/' + rf + '/' + ddl.value
		window.open(strUrl);
	}
	
	return true 
}


function openBrWindow(url,name,features)
{
	window.open(url,name,features);
}


// QuickLinks Pull Down Menu
function quickLinks_onChange(url)
{
	if(url != -1)
	{
		window.location.href = url;
	}
}


