<!--//
	function browseAlpha () {
			thisIndex = "DP"
			popURL="idsetup.asp?i=1&idx=" + thisIndex
			selectedAlpha = this.document.alphaBox.alphaSelect.selectedIndex
			popURL=popURL + "&alpha=" + this.document.alphaBox.alphaSelect[selectedAlpha].value
			popURL=popURL + "&alphaIndex=" + selectedAlpha
			popURL=popURL + "&subtype=" + this.document.alphaBox.subtype.value
			
			popURL=popURL + "&r=" + this.document.alphaBox.referrer_id.value
			
			//alert(popURL)
			parent.location.href=popURL
	}
	function updatelist(id, idx, idname) {
		myURL = "idlist.asp?i=1&idx=" + idx + "&id=" + id + "&idname=" + idname + "&r=" + this.document.browseindex.referrer_id.value
 		//alert(myURL)
		parent.location.href=myURL
	}
	
	function funonclick(ID_string,id, idx, idname) {
	
		if ( ID_string != ""){
			myURL = "idsetup.asp?i=1&update=1&idx=" + idx + "&id=" + id + "&idname=" + idname + "&r=" + this.document.browseindex.referrer_id.value
 			myURL = myURL + "&id_string=" + ID_string
 			myURL = myURL + "&idsetup_mode=1"
 			myURL = myURL + "&ifSearch=1"
 		
 		}
		else{
			myURL = "idsetup.asp?i=1&update=1&idx=" + idx + "&id=" + id + "&idname=" + idname + "&r=" + this.document.browseindex.referrer_id.value
 		}
 		//alert(myURL)
		parent.location.href=myURL
		
	}
	function submitSearch() {
		search_string   = document.idsetup.id_string.value;
		
		if (search_string == "") {
			alert("Please enter marking search string.")
			return false;
		} else {
			document.idsetup.ifSearch.value="0";
			document.idsetup.submit;
		}
	}
	
	function generateReport(x) {
		document.idsetup.ifSearch.value="1";
		//document.idsetup.oldsearch.value="";
		if(x =='a'){	
			document.idsetup.submit();
		}
		else{
			document.idsetup.submit;
		}
	}
	function newsearch(x) {
		document.idsetup.ifSearch.value="3";
		//document.idsetup.displayOther.value="n";
		//document.idsetup.showcolor.value="n";
		//document.idsetup.showshape.value="n";
		//document.idsetup.oldsearch.value="";
		if(x =='a'){	
			document.idsetup.submit();
		}
		else{
			document.idsetup.submit;
		}	
	}
	function shape(x) {
		if(x=="h"){
			document.idsetup.showshape.value="n";
		}
		else{
			document.idsetup.showshape.value="y";
		}
		document.idsetup.submit();
	}
	function color(x) {
		if(x=="h"){
			document.idsetup.showcolor.value="n";
		}
		else{
			document.idsetup.showcolor.value="y";
		}
		document.idsetup.submit();
	}
	function showOther(x) {
		document.idsetup.displayOther.value="y";
		if(x =='a'){	
			document.idsetup.submit();
		}
		else{
			document.idsetup.submit;
		}
	}
	function replaceimage()
	{
		document.wait.src = 'images/space.jpg'; //'../images/general/space.jpg';
		document.wait.width='0';
		document.wait.height='0';
	}	

	// Active images
	img1on = new Image();           
	img1on.src = "images/close_on.gif";  

	// Inactive images
	img1off = new Image();          
	img1off.src = "images/close_off.gif"; 

	function imgOn(imgName) {
		if (document.images) {
		   document.idsetup[imgName].src = eval(imgName + "on.src");
		 }
	}	
	function imgOff(imgName) {
		if (document.images) {
		    document.idsetup[imgName].src = eval(imgName + "off.src"); 
		 }
	}
	/*********************************************************************
	setSB, setNet, and Hideprogress are used to display the prgress bar
	**********************************************************************/
	function setSB(v, el) {
		var ie5 = (document.all && document.getElementsByTagName);
		if (ie5 || document.readyState == "complete") {
			filterEl = el.children[0];
			valueEl  = el.children[1];
			
			if (filterEl.style.pixelWidth > 0) {
				var filterBackup = filterEl.style.filter;
				filterEl.style.filter = "";
				filterEl.style.filter = filterBackup;
			}
			
			filterEl.style.width = v + "%";
			valueEl.innerText = v + "%";
		}
	}
	/*********************************************************
	Function: setNet
			update the progress bar for netscape users
	*********************************************************/
	function setNet(v){
		document.myform.txtprogress.value = "             " + v + "%"; 
	}
	/*********************************************************
	Function: Hideprogress
			hide the progress bar
	*********************************************************/
	function Hideprogress() {
		if(document.layers) {
			document.layers.close.style.visibility = "hide";
			//document.close.style.visibility="hide";
		}
		else if(document.all) {
			window.onload = new Function("setSB(100,sb)")
			document.all.close.style.visibility = "hidden";	
		}
	}
	function help() {
		helpViewer = window.open("help.asp", "DrugIDentifier", "Width=720,scrollbars=yes,Height=500,top=0,toolbar=no,menubar=no,location=no,resizeable=yes");
	}
	function progress() {
		progressViewer = window.open("progressBar.asp", "progress", "Width=420,scrollbars=no,Height=400,top=0,toolbar=no,menubar=no,location=no,resizeable=no");
	}
	
	function setBackground() {
	  if (document.body) {
	    document.body.style.backgroundImage = 'url(images/camera.gif)';
	  }
	}
	function changeimage() {
	  
	    document.wait.src = 'images/bgcolor.jpg';
	    document.wait.height= '0';
	    document.wait.width= '0';
	}
	
	//-->