var prefix="";

function dw(txt) { document.write(txt) }

function tabopen() {
dw('<TABLE cellpadding=0 cellspacing=0 width=100%><TR valign=bottom><td width=600>&nbsp;</td><TD align=right><TABLE align=right cellpadding=4 cellspacing=0 width=240 class=butinsert><TR><TD align=center><a href="http://www.targethingshop.com" target="_window"><span class=stfnam>Visit our Targething E-store for<br>Guns * Ammo * Supplies</span></a></TD></TR></TABLE></TD><TD height=87 align=right class=frtxt>Ohio Attorney General Links:<br><A href="http://www.ag.state.oh.us/le/prevention/forms/cc_standard_application.pdf" target="_window">Application for a Standard License</A><br><A href="http://www.ag.state.oh.us/le/prevention/pubs/cc_booklet20040319-72.pdf" target="_window">Concealed Carry Publication</A></TD></TR></TABLE>');

if (document.location.href.indexOf("ecolake")>-1) { prefix="http://www.targething.com/" }

dw('<TABLE cellpadding=0 cellspacing=0 width=100%><TR valign=bottom><TD height=38>');//125
wr_sitelink("index.htm","Home","Home");
//wr_sitelink("training.htm","Certified Courses","XXX");
wr_sitelink("training.htm","Certified Courses","Course");
wr_sitelink("renewal.htm","CCW Renewals","Renewals");
wr_sitelink("staff.htm","Staff","Staff");
wr_sitelink("schedule.php","Schedule","Schedule");
//wr_sitelink("register.htm","Class Info","Info");
//wr_sitelink("paintball.php","Paintball","Paintball");
wr_sitelink("http://www.targethingshop.com","Merchandise","Merchandise");
wr_sitelink("gunshop.php","Gun Shop","Gun Shop");
wr_sitelink("range.htm","Shooting Range","Range");
wr_sitelink("radio.php","Sports Radio","Radio");
wr_sitelink("BJ-03-15-2005.htm","In The News","In The News");
wr_sitelink("contact.htm","Contact Us","Contact");
dw('</TD></TR><TR><TD class=frtxt align=center>');
if (!document.layers) {dw('<BR>')}
}

function trmenu() {  return;
dw('<TABLE width=100% cellpadding=2 cellspacing=2 bgcolor=#217B31><TR valign=middle><TD align=left>');
wr_sitelink("training.htm","Certified Courses","Course");
wr_sitelink("schedule.htm","Schedule","Schedule");
//wr_sitelink("maps.htm","Maps","Maps");
wr_sitelink("staff.htm","Staff","Staff");
wr_sitelink("ohioccw.htm","Ohio CCW","Ohio");
wr_sitelink("register.htm","Register","Register");
dw('</TD></TR></TABLE>');
}

function wr_sitelink(url,text,tm) {
aclass="menu";
atgt="";
if (text=="In The News"||text=="Merchandise") {atgt=" target=_window "}
if ((document.title.indexOf(tm)>-1)||((tm=="XXX")&&(pgtyp=="train"))){aclass="actmenu"}
dw('&nbsp;<a href="'+prefix+url+'"'+atgt+'><span class='+aclass+'>'+text+'</span></a>&nbsp;&nbsp;');
}

function wr_vert(txt) {
for (j=0; j<txt.length; j++){
  dw(txt.substring(j,j+1)+'<br>');
  }
}

var map_norton = '<a href="http://www.mapquest.com/maps/map.adp?&address=3017+Barber+Road&city=Norton&state=OH&zipcode=44203&submit=Get+Map&zoom=7" target="_window">Norton</a>';
var map_portage = '<a href="http://www.mapquest.com/maps/map.adp?address=12006+Fenstermaker+Road&city=Garrettsville&state=OH&zipcode=44231&submit=Get+Map&zoom=7" target="_window">Portage County</a>';
var map_cleveland = '<a href="http://www.mapquest.com/maps/map.adp?address=1234+Boliver&city=Cleveland&state=OH&zipcode=44115&submit=Get+Map&zoom=7" target="_window">Cleveland</a>';
var map_mantua = '<a href="http://www.mapquest.com/maps/map.adp?address=11670+Mantua+Center                     +Road&city=Mantua&state=OH&zipcode=44255&submit=Get+Map&zoom=7" target="_window">Mantua</a>';
var map_orwell = '<a href="http://www.mapquest.com/maps/map.adp?address=1+Higley&city=Orwell&state=OH&zipcode=44076&submit=Get+Map&zoom=7" target="_window">Orwell</a>';

function wr_sched() {
lns = ss.split("|");
for (k=1; k<lns.length; k++) {
  cols = lns[k].split(",");
  dw('<tr>');
  for (j=0; j<cols.length; j++){ 
    if (k==1) {cl="frtxt"} else {cl="course"}
	if (j==3) {
	  if (cols[j]=="Norton") {cols[j]=map_norton}
	  if (cols[j]=="Portage County") {cols[j]=map_portage}
	  if (cols[j]=="Cleveland") {cols[j]=map_cleveland}
	  if (cols[j]=="Mantua") {cols[j]=map_mantua}
	  if (cols[j]=="Orwell") {cols[j]=map_orwell}
	  }
	if (j==4) {
	  if (cols[j].substring(0,1)=="$") { cols[j]='<a href="olreg.htm?class='+lns[k]+'">'+cols[j]+'</a>'}
	  }  
    if (cols[j]=="") {cols[j]="&nbsp;"}
    dw('<td class='+cl+' align=center>'+cols[j]+'</td>');
    }
  dw('</tr>');
  }
}

function em(who,linkclass,spanclass) {
str=""; ref="ma";
ref+="il";
if (who == 'in') {str="&#105;&#x6e;&#x66;&#111;&#64;&#x74;&#97;&#x72;&#103;&#101;&#x74;&#104;&#x69;&#110;&#x67;&#x2e;&#99;&#x6f;&#109; "}
ref+="to:";
dw('Email: <a class="'+linkclass+'" href="'+ref+str+'"><span class="'+spanclass+'">'+str+'</span></a>'); 
}

function wrlinkpic(name,w,h,align) {
nmar = name.split(".");
name_lg = nmar[0]+"_L."+nmar[1];
if (document.layers) {
dw('<table class=NSPics align='+align+' border=0 background="Pics/blankback.gif"><tr>');
dw('<td><a href="Pics/'+name_lg+'"><img src="Pics/'+name+'" width='+w+' height='+h+' alt="Click to enlarge" border=0></a></td></tr></table>');
} else {
dw('<table class=IEPics cellpadding=0 cellspacing=0 align='+align+'><tr>')
dw('<td><a href="Pics/'+name_lg+'"><img src="Pics/'+name+'" width='+w+' height='+h+' alt="Click to enlarge" border=0></a></td></tr></table>');
}}

function wrpic(name,w,h,align) {
if (document.layers) {
dw('<table class=NSPics align='+align+' border=0 background="Pics/blankback.gif"><tr>');
dw('<td><img src="Pics/'+name+'" width='+w+' height='+h+' alt="" border=0></td></tr></table>');
} else {
dw('<table class=IEPics cellpadding=0 cellspacing=0 align='+align+'><tr>')
dw('<td><img src="Pics/'+name+'" width='+w+' height='+h+' alt="" border=0></td></tr></table>');
}}
