var popwin
var searchwindow
function search_submit(){
	
	sub_root=document.forms["searchform"].elements["search_root"].value
	if(typeof document.forms["searchform"]=="undefined"){
	//PROBABLY NS
		search_term=document.searchlayer.document.searchform.elements["search_term"].value
	}else{
		search_term=document.forms["searchform"].elements["search_term"].value
	}
	
	thispath=(pthstr+"search/search.asp?search_term="+search_term+"&subcheck=1&search_root="+sub_root)
	
	//SET WINDOW POSITION
	if(typeof window.screenX =="undefined"){
		if(typeof window.screenTop !="undefined"){
		
			tp=window.screenTop
			lf=window.screenLeft
			pos=1
		}
	}else{
		tp=window.screenY
		lf=window.screenX
		pos=1
	}
	
	features=",top="+tp+",left="+lf
	
	//END  OF SET WINDOW POSITION
	
	 popwin=window.open(thispath,"search","status=yes,scrollbars=yes,resizable=yes,width=540,height=480"+features)
	 popwin.focus()
	searchwindow=popwin
	searchwindow.myopener=window

}

function gt_remove(){
	if(document.forms[0].elements["search_term"].value=="Search..."){
		document.forms[0].elements["search_term"].value=""
	}
}
function show_search(thispath){
	
	if(thispath.indexOf("_float/")==-1){
	//alert("noframe_index.asp?pg="+thispath)
		//alert(parent.parent.document.location)//="noframe_index.asp?pg="+thispath
		//parent.parent.document.location="noframe_index.asp?pg="+thispath
		parent.parent.document.location="<% =pthstr %>"+thispath
		
	}else{
		//MM_openBrWindow(thispath,"floater","status=yes,scrollbars=yes,resizable=yes,width=442,height=442")
	}
}
function OLD_show_search(thispath){
	if(thispath.indexOf("_float/")==-1){
		tp=window.parent.frames["header"]
		sub_root=tp.sub_root
		
		app_root=document.location.toString()	
		app_root=app_root.substring(0,app_root.indexOf("/interface"))
		
		x=thispath
			
		x=x.substring(x.indexOf("/")+1,x.length)
		x2=x.substring(x.indexOf("/")+1,x.length)
		x=x.substring(0,x.indexOf("/"))
		
		if(("/"+x+"/")!=sub_root){
			//parent.parent.document.location=""+x+"/noframe_index.asp?subpath="+x2
			
			//parent.parent.document.location=app_root+"/library/search_target.asp?rootpath="+x+"/noframe_index.asp"+"&subpath="+x2
			//parent.document.location="noframe_index.asp?pg="+thispath
			parent.document.location="noframe_index.asp?pg="+thispath
			
			//searchwindow.close()
			check_search()
		}else{
		pos1=thispath.lastIndexOf("")+3
		pth=thispath.substring(pos1,thispath.length)
			con=window.parent.frames["content"]
			con.document.location=app_root+"/"+pth
		}
	}else{
		MM_openBrWindow(thispath,"floater","status=yes,scrollbars=yes,resizable=yes,width=442,height=442")
	}
	
}