//lejeri.js
var pxclear= new Image();
pxclear.src="../img/pxclear.gif";
var pxblack= new Image();
pxblack.src="../img/pxblack.gif";
var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf("mozilla")!=-1) && (agt.indexOf("spoofer")==-1) 
               && (agt.indexOf("compatible") == -1) && (agt.indexOf("opera")==-1) 
               && (agt.indexOf("webtv")==-1));
var is_major = parseInt(navigator.appVersion);
var isNN=(navigator.appName=="Netscape");
var not_nav6 = (is_nav && (is_major < 5));
var layerRef=(isNN && not_nav6)?"document.":"document.all.";
var styleRef=(isNN && not_nav6)?"":".style";
var topRef=(isNN && not_nav6)?".top":".pixelTop";
var leftRef=(isNN && not_nav6)?".left":".pixelLeft";
function first_line(id,w,h,t,l,z,v) {
  if(isNN && not_nav6) return("<div id=\""+id+"\"><layer id=\""+id+"\" width=\""+w+"\" height=\""+h+"\" left=\""+l+"\" top=\""+t+"\" z-index=\""+z+"\" visibility=\""+v+"\">");
  else return("<div id=\""+id+"\" style=\"position:absolute; width:"+w+"px; height:"+h+"px; left:"+l+"px; top:"+t+"px; z-index:"+z+"; visibility:"+v+"\">");
}
function first_line_pic(id,w,h,t,l,z,v,pic) {
  if(isNN && not_nav6) return("<div id=\""+id+"\"><layer id=\""+id+"\" width=\""+w+"\" height=\""+h+"\" left=\""+l+"\" top=\""+t+"\" z-index=\""+z+"\" visibility=\""+v+"\" background=\""+pic+"\">");
  else return("<div id=\""+id+"\" style=\"position:absolute; width:"+w+"px; height:"+h+"px; left:"+l+"px; top:"+t+"px; z-index:"+z+"; background-image:url("+pic+"); visibility:"+v+"\">");
}
//function first_line_col(id,w,h,t,l,z,v,col) {
//  if(isNN && not_nav6) return("<div id=\""+id+"\"><layer id=\""+id+"\" width=\""+w+"\" height=\""+h+"\" left=\""+l+"\" top=\""+t+"\" z-index=\""+z+"\" visibility=\""+v+"\" bgcolor=\""+col+"\">");
//  else return("<div id=\""+id+"\" style=\"position:absolute; width:"+w+"px; height:"+h+"px; left:"+l+"px; top:"+t+"px; z-index:"+z+"; background-color:"+col+"; visibility:"+v+"\">");
//}
function last_line(){return((isNN && not_nav6)?"</layer></div>":"</div>");}
function show(){
	if(isNN && not_nav6){
		eval(layerRef+this.ref+styleRef+".visibility=\"visible\"")
	}else{
		eval("document.getElementById(\""+this.ref+"\").style.visibility=\"visible\"");
	}
}
function hide(){
	if(isNN && not_nav6){
		eval(layerRef+this.ref+styleRef+".visibility=\"hidden\"");
	}else{
		eval("document.getElementById(\""+this.ref+"\").style.visibility=\"hidden\"");
	}
}
function setpos(){
	if(isNN && not_nav6){
	  eval(layerRef+this.ref+styleRef+topRef+"="+this.top);
  	eval(layerRef+this.ref+styleRef+leftRef+"="+this.left);
	}else{
		eval("document.getElementById(\""+this.ref+"\").style.top=\""+this.top+"\"");
		eval("document.getElementById(\""+this.ref+"\").style.left=\""+this.left+"\"");
	}
}
function move(inct,incl){this.top+=inct;this.left+=incl;this.setpos();}
function setpic(pic){document[this.picref].src=pic.src;}
function crop_it(t,l,b,r) {
  if(isNN && not_nav6){ 
    eval(layerRef+this.ref+".clip.left="+l); 
    eval(layerRef+this.ref+".clip.top="+t); 
    eval(layerRef+this.ref+".clip.right="+r); 
    eval(layerRef+this.ref+".clip.bottom="+b); 
	}else{
		eval("document.getElementById(\""+this.ref+"\").style.clip=\"rect("+t+","+r+","+b+","+l+")\"");
	}
}
function setverpos_rel(){
  if (isNN && not_nav6) document.layers[this.ref].pageY = window.pageYOffset+this.top;
  else  document.all[this.ref].style.top = document.body.scrollTop+this.top;
}
function setverpos_bottom(){
  if (isNN && not_nav6) document.layers[this.ref].pageY = window.pageYOffset+window.innerHeight+this.top;
  else  document.all[this.ref].style.top = document.body.scrollTop+
										   document.body.clientHeight+this.top;
}
function Lejer(id,w,h,t,l,z,pic_url,is_bg_pic){
  this.id=id;
  this.ref="lejer"+id;
  this.is_bg_pic=is_bg_pic;
  this.w=w;this.h=h;this.top=t;this.left=l;this.z=z;
  this.show=show;
  this.hide=hide;
  this.pic_url=pic_url;
  this.picref="lejerpic"+id;
  this.create=l_create;
  this.crop=crop_it;
  this.setpos=setpos;
  this.setpic=setpic;
  this.setvpos=setverpos_rel;  
}
function ALejer(id,w,h,t,l,z,pic_url){
  this.id=id;
  this.ref="alejer"+id;
  this.w=w;this.h=h;this.top=t;this.left=l;this.z=z;
  this.show=show;
  this.hide=hide;
  this.pic_url=pic_url;
  this.picref="alejerpic"+id;
  this.create=al_create;
  this.crop=crop_it;
  this.setpos=setpos;
  this.setpic=setpic;
}
function TLejer(id,w,h,t,l,z,txt){
  this.id=id;
  this.ref="tlejer"+id;
  this.w=w;this.h=h;this.top=t;this.left=l;this.z=z;
  this.show=show;
  this.hide=hide;
  this.text=txt;
  this.create=tl_create;
  this.setpos=setpos;
}
function ATLejer(id,w,h,t,l,z,txt,url,clas,target){
  this.id=id;
  this.ref="tlejer"+id;
  this.w=w;this.h=h;this.top=t;this.left=l;this.z=z;
  this.show=show;
  this.hide=hide;
  this.text=txt;
  this.url=url;
  this.clas=clas;
  this.target=target;
  this.create=atl_create;
  this.setpos=setpos;
}

function l_create() {
  text=this.is_bg_pic?
       first_line_pic(this.ref,this.w,this.h,this.top,this.left,this.z,"hidden",this.pic_url):
       first_line(this.ref,this.w,this.h,this.top,this.left,this.z,"hidden");
  if(this.is_bg_pic){
    text+="<img src=\"../img/pxclear.gif\" width=\""+this.w+"\" height=\""+this.h+"\" border=\"0\">";
  }else{
    text+="<img src=\""+this.pic_url+"\" name=\""+this.picref+"\" width=\""+this.w+"\"";
    text+=" height=\""+this.h+"\" border=\"0\">";
  }
  text+=last_line();
  document.write(text);
}
function al_create() {
  text=first_line(this.ref,this.w,this.h,this.top,this.left,this.z,"hidden");
  text+="<a href=\"javascript:l_press("+this.id+")\" ";
  text+="onmouseover=\"l_over("+this.id+")\" onmouseout=\"l_out("+this.id+")\">";
  text+="<img src=\""+this.pic_url+"\" name=\""+this.picref+"\" width=\""+this.w+"\"";
  text+=" height=\""+this.h+"\" border=\"0\"></a>";
  text+=last_line();
  document.write(text);
}
function tl_create() {
  text=first_line(this.ref,this.w,this.h,this.top,this.left,this.z,"hidden");
  text+="<span class=\"copyright\">";
  text+=this.text
  text+="</span>";
  text+=last_line();
  document.write(text);
}
function atl_create() {
  text=first_line(this.ref,this.w,this.h,this.top,this.left,this.z,"hidden");
  text+="<a href=\""+this.url+"\" class=\""+this.clas+"\"  target=\""+this.target+"\">";
  text+=this.text+"</a>";
  text+=last_line();
  document.write(text);
}
//
function MLejer(id,w,h,t,l,z,pic_url,map_used){
  this.id=id;
  this.ref="mlejer"+id;
  this.map_used=map_used;
  this.w=w;this.h=h;this.top=t;this.left=l;this.z=z;
  this.show=show;
  this.hide=hide;
  this.pic_url=pic_url;
  this.picref="lejerpic"+id;
  this.create=ml_create;
  this.crop=crop_it;
  this.setpos=setpos;
  this.setpic=setpic;
  this.setvpos=setverpos_rel;
}
function ml_create() {
  text=first_line(this.ref,this.w,this.h,this.top,this.left,this.z,"hidden");
  text+="<img src=\""+this.pic_url+"\" name=\""+this.picref+"\" width=\""+this.w+"\"";
  text+=" height=\""+this.h+"\" border=\"0\" usemap=\""+this.map_used+"\">";
  text+=last_line();
  document.write(text);
}
//
function CLejer(id,w,h,t,l,z,perl_url,txt){
  this.id=id;
  this.ref="clejer"+id;
  this.w=w;this.h=h;this.top=t;this.left=l;this.z=z;
  this.show=show;
  this.hide=hide;
  this.pic_url=perl_url;
  this.text=txt;
  this.picref="clejerpic"+id;
  this.create=cl_create;
  this.crop=crop_it;
  this.setpos=setpos;
  this.setpic=setpic;
}

function cl_create() {
  text=first_line(this.ref,this.w,this.h,this.top,this.left,this.z,"hidden");
  
  text+="<a target=\""+this.pic_url+"\">"+this.text+"</a>"
  
  text+=last_line();
  document.write(text);
}

