var highLast=-1;

function highlight1(obj,look,no){
	if (document.getElementById) {
     if (look==2) look1="on";
     else if (look==1) look1="over";
     else if (obj==highLast) look1="on"; else look1="reg";
     for (i=1;i<no;i++){
       lookStyle=look1;
	    dob=document.getElementById("ID"+obj+"_"+i);
       dob.className=lookStyle;
     }
	}
 }

function setON1(obj,day,day_hours,day_subs,no){
   a=-1;
   if (highLast>0) {
     a=highLast; highLast=obj;
     highlight1(a,0,no)
   } else highLast=obj;
   if (a!=highLast) {
      highlight1(highLast,2,no);
      h=day_hours.split(";");
      l=day_subs.split(";");
      parent.showBreakdown(h,l,day,obj);
   }
}

function setON2(range,name,hour,subs,no){
   if (highLast>0) {
     a=highLast; highLast=0;
     highlight1(a,0,no)
   } 
   h=hour.split(";"); l=subs.split(";");
   parent.showBreakdown(h,l,name,range);
}

function upBar(){
  document.write("<table cellpadding=0 cellspacing=1  bgcolor='#111566' width=100% border=0>"+
  	"<tr><td class=link>|</td><td class=link nowrap><a href='/html/ENI/ban_V.html'>Banners "+
	"& HTML</a></td><td class=link>|</td><td class=link nowrap><a "+
	"href='/html/ENI/terms_V.html'>Terms & Cond</a></td><td class=link>|</td><td class=link "+
	"nowrap><a href='/html/ENI/faq_V.html'>Update & FAQ's</a></td>");
  document.write("<td class=link>|</td><td class=link nowrap><a href='/cgi-bin/joinUs.cgi/2/"+
	parent.ssn+"/"+parent.pass+"/"+parent.prog+"'>Edit Info</a></td>");
  document.write("<td class=link>|</td><td class=link nowrap><a href=/cgi-bin/viewStats2.cgi/"+
	parent.prog+"/"+parent.acn+"/"+parent.pass+"?0>Stats</a></td></tr></table>");
}

function dohref(go,place){
  document.write("<a class=myA href='"+go+"' target='"+place+"'>");
}

function upBar1(dir,prog,place,c){
  document.write("<table cellpadding=0 cellspacing=0  bgcolor='");
  if (c && c.indexOf('#')>-1) document.write(c,"' width=100% border=0>");
  else                   document.write("#051508' width=100% border=0>");
  document.write("<tr><td align=right><table cellpadding=1 cellspacing=3 border=0>"+
  	"<tr><td class=link>|</td><td class=link nowrap>");
  dohref(dir+"/ban_"+prog+".html",place);
  document.write("Banners & HTML</a></td><td class=link>|</td><td class=link nowrap>");
  dohref(dir+"/terms_"+prog+".html",place);
  document.write("Terms & Cond</a></td><td class=link>|</td><td class=link nowrap>");
  dohref(dir+"/faq_"+prog+".html",place);
  document.write("Update & FAQ's</a></td><td class=link>|</td><td class=link nowrap>");
  dohref("/cgi-bin/joinUs.cgi/2/"+parent.ssn+"/"+parent.pass+"/"+parent.prog,place);
  document.write("Edit Info</a></td><td class=link>|</td><td class=link nowrap>");
  dohref("/cgi-bin/stats-index.cgi/"+parent.prog+"/"+parent.acn+"/"+parent.pass,"_parent");
  document.write("Stats</a></td></tr></table></td></tr></table>");
}

function upBar2(dir,prog,place){
  document.write("<table cellpadding=0 cellspacing=0  bgcolor='#051508' width=100% border=0>");
  document.write("<tr><td align=right><table cellpadding=1 cellspacing=3 border=0>"+
  	"<tr><td class=link>|</td><td class=link nowrap>");
  dohref(dir+"/ban_"+prog+".html",place);
  document.write("Linking Code</a></td><td class=link>|</td><td class=link nowrap>");
  dohref(dir+"/terms_"+prog+".html",place);
  document.write("Terms & Cond</a></td><td class=link>|</td><td class=link nowrap>");
  dohref(dir+"/faq_"+prog+".html",place);
  document.write("Update & FAQ's</a></td><td class=link>|</td><td class=link nowrap>");
  dohref("/cgi-bin/joinUs.cgi/2/"+parent.ssn+"/"+parent.pass+"/"+parent.prog,place);
  document.write("Edit Info</a></td><td class=link>|</td><td class=link nowrap>");
  dohref("/cgi-bin/stats-index.cgi/"+parent.prog+"/"+parent.acn+"/"+parent.pass,"_parent");
  document.write("Stats</a></td></tr></table></td></tr></table>");
}
