// vmc_global.js// Path to Global Resource Databasevar vmcglobal = "/vmcglobal.nsf";/*Name: displaycopyrightDesc: prints out the copyright information in HTMLAuthor: Gene Rivera*/function displaycopyright() {	document.write("<br><center><span class='copyright'>&copy; Copyright 2003 Victor Medical Co.</span></center>");}/* Name: getDOMObj Desc: retrieves a DOM Object and sets an obj property and the style property Parm: name String Name (NN) or ID (IE) of DOM object */ function getDOMObj(name) { 	 	if (document.getElementById){ 					//IE 5+ & NN 6+ 		this.obj = document.getElementById(name); 		this.style = document.getElementById(name).style; 	} 	else if(document.all) {						//IE 4 		this.obj = document.all[name]; 		this.style = document.all[name].style; 	} 	else if(document.layers) {					//NN 4 		this.obj = document.layers[name]; 		this.style = document.layers[name]; 	} 	 	return this; }/*Name: getRadioButtonValue()Desc: Returns the value of a selected radio buttonAuthor: Gene Rivera*/function getRadioButtonValue(objRadioButton) {	var val = null;	for (var i = 0; i < objRadioButton.length; i++) {		if (objRadioButton[i].checked) {			val = objRadioButton[i].value; 			break;		}	}	return val}/*Name: objThisBrowser()Desc: represents the current browserAuthor: Gene RiveraArg:*/function objThisBrowser(){	this.browserType = navigator.appName;	this.browserVersion = navigator.appVersion;		this.fieldSupportsDHTML = 0;	this.fieldIsNetscape = 0;	this.fieldIsIE = 0;		if(this.browserType.indexOf('Microsoft') != -1) {this.fieldIsIE = 1;}	if(this.browserType.indexOf('Netscape') != -1) {this.fieldIsNetscape = 1;}		this.isNetscape			=	VMC_IsNetscape;	this.isIE						=	VMC_IsIE;	this.supportsDHTML	=	VMC_SupportsDHTML;}/*Name: pfWindow()Desc: opens a new window with a printer friendly version of the on screen data.Author: Gene Rivera*/function pfWindow() {	var objContentElement = getDOMObj("vmccontentarea");	var strContent	 = objContentElement.obj.innerHTML;	var win = window.open("","pfwindow","");	win.height = 480;	win.width = 640;	if (strContent != "" && strContent != null) {		win.document.write("<html><head><link rel='stylesheet' href='"+vmcglobal+"/pfstyles.css'></head>");		win.document.write("<body><table border=0 cellpadding=0 cellspacing=0 width='100%'><tr><td width='50%'>Click to print <img src='"+vmcglobal+"/printer.gif' border=0 onClick='print();self.close();'></td><td width='50%' align='right'>Click <a href='javascript:self.close();'>HERE</a> to close this printer friendly window.</td></tr></table>");		win.document.write(strContent);		win.document.write("</body></html>");	}else{		win.document.write("An error has occured");	}		win.document.close();}/*Name: popUp(url,x,y,tb,mb,s,re)Desc: opens up a window with the given size and location. 		Window opens 100 pixels from the right side of the screen and 100 pixels from the top of the screen.Author: Gene RiveraArg:	url		=	location for the window		x		=	width of the window		y		=	height of the window		tb		=	toolbar option		mb	=	menubar option		s		=	scrollbar option (currently hardcoded as "yes')		re		=	resizeable option (currently not implemented)*/function popUp(url,x,y,tb,mb,s,re) {	var fullwidth = document.body.clientWidth;	var left = fullwidth - (parseInt(x) + 100);	window.open(url,"vmcpopup","width="+x+",height="+y+",toolbar="+tb+",menubar="+mb+",scrollbars=yes,left="+left+",top=100,status=no,location=no");}/*Name: redirectBrowser(path)Desc: redirects a web browser to the url specified in 'path' or to the home pageAuthor: Gene RiveraArg:	path	=	path to set the current location to.*/function redirectBrowser(path) {	if(path == null) {path = '/';}	location.href = path;}/*Name: sniffBrowser()Desc: determines browser typeAuthor: Gene RiveraArg:*/function sniffBrowser(){}/*Name: test*/function testit(str){	alert(str);}/* Name: toggleSingleDOMObj Desc: toggles the visibility of a single DOM object Parm: name String Name (NN) or ID (IE) of DOM object       closeall Boolean Close all closeable objects? */ function toggleDOMObjVisibility(name, imgid, pathToOnImage, pathToOffImage) {  	 	var obj = getDOMObj(name); 	if(obj.style.display == '') { 		obj.style.display = 'none'; 		if(imgid != null) {	document.getElementById(imgid).src = pathToOffImage;} 	} 	else { 		obj.style.display = ''; 		if(imgid != null) {	document.getElementById(imgid).src = pathToOnImage;} 	}  	 }/*Name: togglediv()Desc: shows or hides a divAuthor: Gene RiveraArg: 	id							=	id of div		imgid					=	id of image to flip		pathToOnImage		=	path to the image for visible div		pathToOffImage		=	path to the image for a hidden div*/function togglediv(id, imgid, pathToOnImage, pathToOffImage) {	if ((id == "") || (id == null)) {return false;}	var currentdisplay = document.getElementById(id).style.display;	if (currentdisplay == "none") {		document.getElementById(id).style.display = "";		if(imgid != null) {	document.getElementById(imgid).src = pathToOnImage;}	}else{		document.getElementById(id).style.display = "none";		if(imgid != null) {	document.getElementById(imgid).src = pathToOffImage;}	}}//Object Methodsfunction VMC_IsIE(){	return this.fieldIsIE;}function VMC_IsNetscape(){	return this.fieldIsNetscape;}function VMC_SupportsDHTML(){	return this.fieldSupportsDHTML}