<!--
	var f=new Array()
	f[0]='Contact Page|contact|con1|1|confirm'
	f[1]='Quick Contact|contact_quick|con2|2'
	f[2]='Quick Message|contact_quick_message|con3|3'
	f[3]='Quick Red|contact_quick_red|con4|4'
	f[4]='Quick Question|contact_quick_question|con5|5'
	f[5]='Registration|_reg|reg1|6'
	f[6]='Use of Force|contact_force|reg2|7'
	f[7]='Your selection|db_selection|sel|8'
	f[8]='Conventional|search2|srch|9'
	f[9]=''
	f[10]='Test Email|admin|test|TEST'
	f[11]='Edit Offices|db_form|edit|EDIT'

var newWindow=null,tmps='_email_',tpre='/templates/'
function admin(t,p) { tmps=t; tpre=p; }
function nform(n) { self.location.href=(n.charAt(0)=='_'?'form':'')+n+'.html' }
function template(n) { popit(tpre+tmps+n+'.htm') }
function popit(url) {
	if (newWindow) newWindow.close()
	newWindow=window.open('','displayWindow','menubar=no,height=270,width=540,resizable=no')
	newWindow.document.close()
	newWindow.document.location.href=url
	newWindow.zorder
}
function doc_button(n,v) { document.writeln(get_button(n,v,'','','','right','',true)) }
function do_button(n,v) { return get_button(n,v,'','','','','',false) }
function do_buttonh(n,v,e) { return get_button(n,v,'','','','','',true) }
function draw_button(t,u,i,w,h,a,c) { document.writeln(get_button(t,u,i,w,h,a,c,false)) }
function get_button(t,u,i,w,h,a,c,e) {
	get_selection();i=(i==''?'/images/_no/m_btn.gif':i)
	return INP_BTN+' style="border-color:black" value="'+t+'"  onclick='+u+'>'
}

function draw_buttonsx(key) { draw_buttons(f,key) }
function draw_buttons(f,key) {
	admin(key+tmps,tpre)
	var buttons=true
	var x,v,i,c,n,t,u,b,p,g,r='',es='<tr><td colspan=5 class=dbl>',et='</td><td class=dbl>'

	g=get_selection()
	r+=es+'<br>Document Cookie:<tr><td></td><td colspan=2 align=right> '
	r+='<textarea name=Cookie class=dbi cols=45 rows=10>'
	r+='Selected: '+g+' ('+max_sel+' of '+dx+' items)\n\n'
	v=unescape(document.cookie);
	for (x=0;x<gsf(v,-1);x++) {
		n=gsf(v,x);i=n.indexOf('=');n=n.substr(0,i);
		r+=tcase(trim(n))+': '+readCookie(n)+'\r'
	}
	r+='</textarea><br>'

killCookie('Test')
	r+=et+INP_BTN+' style="border-color:black" value="Clear Cookie" onclick=clr_cookie()>'

	r+=BR2+'<a class=slnk href=javascript:{writeCookie("admin",readCookie("admin")=="yes"?"":"yes");self.location.href="admin.html"}>'+(readCookie('admin')=='yes'?'Stop being admin':'Be Admin')+'</a>'
	r+=BR+'<a class=slnk href=javascript:{writeCookie("regpage",readCookie("registered")=="yes"?"":"");writeCookie("registered",readCookie("registered")=="yes"?"":"yes");self.location.href="admin.html"}>'+(readCookie('registered')=='yes'?'De-register':'Register')+'</a>'
	r+=BR+'<a class=slnk href=javascript:{killCookie("thumbs");writeCookie("allone","yes");self.location.href="db_allareas.html"}>All Areas List</a>'
	r+=BR+'<a class=slnk href=javascript:{writeCookie("thumbs","thumbs");writeCookie("allone","yes");self.location.href="db_allareas.html"}>All Areas Thumbview</a>'
	if (readCookie('first')!='') r+=BR+'<a class=slnk href=javascript:updateCookie("first","")>Kill first page</a>'
	r+=es+'<br>Destination Emails:'
	r+='<tr><td class=dbl align=right nowrap><small>Address 1: </small></td><td colspan=2 align=right>'+uncloakv(0,0,38)
	r+=et+do_button('Test Email','submit()')+'</td>'
	r+='<tr><td class=dbl align=right nowrap><small>Address 2: </small></td><td colspan=2 align=right>'+uncloakv(1,1,38)
	r+=es+'<br>Website Forms:'
	for (x=0;x<f.length;x++) {
		n=f[x];b=gf(n,0);u=gf(n,1);t=gf(n,2);g=gf(n,3);c=gf(n,4);v=gf(n,5)
		if (n) {
			r+=es+'<tr valign=top><td width=45 class=slnk nowrap>'
			if (buttons) {
				r+=et+(r.indexOf('"'+b+'"')>=0?'':u==''?b:'<nobr><a class=slnk href=javascript:nform("'+u+'")>'+b+'</a></nobr>')
				r+=et+(r.indexOf(key+g)>=0?'':do_button('Template: '+key+g,'template("'+t+'")'))
				r+=c==''?'':et+(r.indexOf('Thank you')>=0?'':do_button('Thank you','nform("'+c+'")'))
			} else {
				r+=et+(r.indexOf('"'+b+'"')>=0?'':u==''?b:'<a class=slnk href=javascript:nform("'+u+'")>'+b+'</a>')
				r+=et+(r.indexOf(key+g)>=0?'':'<a class=slnk href=javascript:template("'+t+'")>Template: form.'+key+(g==parseInt(g)?'':'.')+g+'</a>')
				r+=c==''?'':et+(r.indexOf('Thank you')>=0?'':'<a class=slnk href=javascript:nform("'+c+'")>Thank you</a>')
			}
		} else
			r+=es+'<tr><td width=45><br>'
	}
	r='<style>.dbi { font-size:10px; }.dbf{font-family:verdana;font-size:9px;}</style>'+r
	document.writeln(r)
}

function clr_cookie() {
	var x,c='admin|registered|first|section|page|search|last office|regpage|thumbs|allone|counter|visits|last visit|'+flds_all;
	if (confirm("Clear Cookie ?")) {
		for (x=0;x<dx;x++) { killCookie('i'+x); killCookie('i'+gsf(db[x],1));}
		for (x=0;x<gf(c,-1);x++) killCookie(gf(c,x))
		self.location.href=self.location.href;
	}
}
//-->
