function launchWin(doc,name,w,h,r,s,t,m) {
	if(!s) { s = 0 };
	if(!t) { t = 0 };
	if(!m) { m = 0 };
	if(!r) { r = 0 };

	if (w > (screen.width - 50)){
		w = screen.width - 100;
		s = 1;
	}

	if (h > (screen.height - 150)){
		h = screen.height - 150;
		s = 1;
	}

	settings = "menubar=" + m + ",toolbar=" + t + ",scrollbars=" + s + ",location=0,status=0,resizable=" + r + ",width=" + w + ",height=" + h;
	popupWin = window.open(doc,name,settings);
	// popupWin.moveTo(((screen.width/2)-(w/2)),((screen.height/2)-(h/2)));
}
