function handleLink(typ,lnkID,lnk,dims){	//dims are w,h,lft,tp;
	if(NS && typ=="M"){ typ = "N"; }
	switch(typ){
		case "N":	//New Window
			if(dims){
				dimsVars = dims.split(',');
				w=dimsVars[0]; h=dimsVars[1]; lft=dimsVars[2]; tp=dimsVars[3];
			}else{
				lft = (screen.width*0.2)/2;
				w = (screen.width*0.8);
				tp = (screen.height*0.1)/2;
				h = (screen.height*0.7);
			}

			if(lnk.indexOf("http") != -1){
				extLnk = window.open(lnk,'extLnk','width='+w+',height='+h+',top='+tp+',left='+lft+',status=yes,resizable=yes,toolbar=yes,location=yes,scrollbars=yes,directories=yes,');
				extLnk.focus();
			}else{
				if(NS && lnk.indexOf("pdf") != -1){
					document.location.href=lnk;
				}else{
					extLnk = window.open(lnk,'extLnk','width='+w+',height='+h+',top='+tp+',left='+lft+',status=yes,scrollbars=yes,resizable=yes,');
					extLnk.focus();
				}
			}
			break;
		case "B":	//New Window without title bars
			if(dims){
				dimsVars = dims.split(',');
				w=dimsVars[0]; h=dimsVars[1]; lft=dimsVars[2]; tp=dimsVars[3];
			}else{
				lft = (screen.width*0.2)/2;
				w = (screen.width*0.8);
				tp = (screen.height*0.1)/2;
				h = (screen.height*0.7);
			}

			if(lnk.indexOf("http") != -1){
				extLnk = window.open(lnk,'extLnk','width='+w+',height='+h+',top='+tp+',left='+lft+',status=no,resizable=no,toolbar=no,location=no,scrollbars=yes,directories=no,');
				extLnk.focus();
			}else{
				if(NS && lnk.indexOf("pdf") != -1){
					document.location.href=lnk;
				}else{
					extLnk = window.open(lnk,'extLnk','width='+w+',height='+h+',top='+tp+',left='+lft+',status=no,scrollbars=no,resizable=no,');
					extLnk.focus();
				}
			}
			break;	
		case "M":	//Modal Window
			lft = (screen.width*0.2)/2;
			w = (screen.width*0.8);
			tp = (screen.height*0.2)/2;
			h = (screen.height*0.8);
			extLnk = showModalDialog(lnk,'','dialogWidth:'+w+'px;dialogHeight:'+h+'px;help:no;status:no;resizable:yes;');
			break;
		default: 	//Direct and Submenu
			if(frameenv){
				try {
					eval(parent.opener);
					parent.opener.document.getElementById(lnkID).click();
					parent.close();
					parent.opener.focus();
				}catch(exception){
					//if(lnk.indexOf("../") != -1){
					//	lnk = lnk.substring(3);
					//}
					//parent.location.href = fullURL+lnk;
					parent.location.href = lnk;
				}
			}else{
				location.href = lnk;
			}
			break;
	}
}

