<!--
function setCookie(name, value) {
	var expire = new Date();
	var today = new Date();
	expire.setTime(today.getTime() + 1000*60*60*24*4);
	document.cookie = name + "=" + escape(value) + "; path=/"   + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

function getCookie(Name) {
	var search = Name + "="
	if (document.cookie.length > 0) {// if there are any cookies
		offset = document.cookie.indexOf(search)
		if (offset != -1) { // if cookie exists
			offset += search.length;
			// set index of beginning of value
			end = document.cookie.indexOf(";", offset)
			// set index of end of cookie value
			if (end == -1)
				end = document.cookie.length
			return unescape(document.cookie.substring(offset, end))
		}
	}
}

function getMemberName(x) {
	start = (x.indexOf(";") + 1);
	end = x.indexOf(";", start);
	var name = x.substr(start, (end - start));
	return name
}



function popUp(link, width, height) {

	var popUpWindow = window.open(link,"popUp",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height);

}


function cj_window(a_path) {
	article_window=window.open(a_path,'article_window','width=415,height=550,scrollbars=yes,resize=yes,target=_top');
	if (document.images) {article_window.focus();}
}


setCookie("successpage", document.location.pathname)

//came from fdn2 save article confirm, pcm save article	
function ProcessSForm() {
	var topic = document.sform.topic.value;
	if(topic.length > 0) {
		document.sform.submit();
	}
	else {
		window.alert("Please enter a topic to save this article under.");
	}
}	

//came from fdn2 save article, pcm save article	
function goToReseachLibrary(research_url)
{
  window.close(self);
  self.opener.location = research_url;
  self.opener.focus();
}

//from pcm display article detail
function OpenSlideshowWindow(slideshow_name, winWidth, winHeight,isScrollbar)
{
LeftPosition = (winWidth) ? (winWidth) : 0;
TopPosition = (winHeight) ? (winHeight): 0;
settings = 'menubar=no,toolbar=no,scrollbars=yes,height=' + winHeight + ',width=' + winWidth
hWin = window.open(slideshow_name, "SlideshowPopup", settings, false);
hWin.focus();
if (hWin.opener == null) hWin.opener = self;
}


//came from eweek display article detail,fdn2 display article detail,fdn2 display downloads,foundation display downloads,pcm display article detail, pcm display downloads
function AlterActionAndSubmit()
{
if (document.toc_form.toc_select.value != "")
	{
	toc_select_index = document.toc_form.toc_select.selectedIndex;
	toc_select_value = document.toc_form.toc_select.options[toc_select_index].value;

	document.toc_form.action = toc_select_value;
	document.toc_form.submit();
	}
}

//came from eweek display article detail and fdn2 display article detail
function jumpToOpinion(newLoc){
	//from eweek display category archive list
	newPage = newLoc.options[newLoc.selectedIndex].value;
	if (newPage != ""){
		window.location.href = newPage;
	}
}

//came from fdn2 display review an article
function submit_review() {
	document.frm_site_review.status.value = "Approved";
	document.frm_site_review.submit();
}

//from data process add topic
function gobacktoResearchCenter()
{
	window.close(self);
	self.opener.location = document.where_to.go_to.value;
	self.opener.focus();
}
// -->