function openTutorialDesc(tutorial,w,h)
{
	openWindow('/training/tutorial_descriptions/tutorial_'+tutorial+'.asp',w,h);
}

function openLargeView(img,w,h)
{
	openWindow('/detail.asp?img='+img,0+w+50,0+h+35);
}

function openWindow(url, width, height, type, winName) {
	var paramStr="";
	if (type=="console") {
		paramStr="resizable,height="+height+",width="+width;
	} else if (type=="fixed") {
		paramStr="status,height="+height+",width="+width;
	} else if (type=="content") { // fixed size with scrolling
		paramStr="scrollbars,status,height="+height+",width="+width;
	} else if (type=="normal") { // a normal window but with width & height set
		paramStr="status,toolbar,menubar,scrollbars,resizable,location,height="+height+",width="+width;
	} else if(!type || type=="flexible") { // default
		paramStr="scrollbars,resizable,height="+height+",width="+width;
	}
	if(!winName) { // make unique but consistent window name for this page
		winName = 'myWin_'+url.substr(0,url.indexOf("?")).replace(/\W/g,"");
	}
	winObj = window.open(url, winName, paramStr);
	winObj.focus();
	return winObj;
}

