function AddFileForm(){
	var div=document.getElementById('addfile')
	div.innerHTML+='<input type="file" name="pic[]"/><br />';
}

SelRed=function(){
	var img = new Array(
		 "templates/img/nav/ap0.gif",
		 "templates/img/nav/ap1.gif",
		 "templates/img/nav/ap2.gif",
		 "templates/img/nav/ap3.gif",
		 "templates/img/nav/ap4.gif",
		 "templates/img/nav/ap5.gif",
		 "templates/img/nav/ap6.gif",
		 "templates/img/nav/ap7.gif",
		 "templates/img/nav/ap8.gif",
		 "templates/img/nav/p0.gif",
		 "templates/img/nav/p1.gif",
		 "templates/img/nav/p2.gif",
		 "templates/img/nav/p3.gif",
		 "templates/img/nav/p4.gif",
		 "templates/img/nav/p5.gif",
		 "templates/img/nav/p6.gif",
		 "templates/img/nav/p7.gif",
		 "templates/img/nav/p8.gif",
		 "templates/img/nav/cp0.gif",
		 "templates/img/nav/cp1.gif",
		 "templates/img/nav/cp2.gif",
		 "templates/img/nav/cp3.gif",
		 "templates/img/nav/cp4.gif",
		 "templates/img/nav/cp5.gif",
		 "templates/img/nav/cp6.gif",
		 "templates/img/nav/cp7.gif",
		 "templates/img/nav/cp8.gif",
		 "templates/img/nav/acp0.gif",
		 "templates/img/nav/acp1.gif",
		 "templates/img/nav/acp2.gif",
		 "templates/img/nav/acp3.gif",
		 "templates/img/nav/acp4.gif",
		 "templates/img/nav/acp5.gif",
		 "templates/img/nav/acp6.gif",
		 "templates/img/nav/acp7.gif",
		 "templates/img/nav/acp8.gif",
		 "templates/img/desca.png",
		 "templates/img/desc.png",
		 "templates/img/new.png",
		 "templates/img/button_print.png",
		 "templates/img/button_print_a.png",
		 "templates/img/button_printver.png",
		 "templates/img/button_printver_a.png",
		 "templates/img/send.png",
		 "templates/img/send_a.png",
		 "templates/img/button_search.png",
		 "templates/img/button_search_a.png"
	);
	preloadImages(img);
	var links = id('blheader').getElementsByTagName('img');
	for(i=0;i<links.length;i++){
		links[i].onmouseover=function(){
			this.src="templates/img/nav/a"+this.id+".gif";
		}
		links[i].onmouseout=function(){
			this.src="templates/img/nav/"+this.id+".gif";
		}
	}
	var links2 = id('bheader').getElementsByTagName('img');
	for(i=0;i<links2.length;i++){
		links2[i].onmouseover=function(){
			this.src="templates/img/nav/a"+this.id+".gif";
		}
		links2[i].onmouseout=function(){
			this.src="templates/img/nav/"+this.id+".gif";
		}
	}

	var sels=document.getElementsByTagName("select");
	for(i=0;i<sels.length;i++){
		if (sels[i].className=='redirect'){
			sels[i].onchange=function(){
				document.location.replace(this.value);
			}
		}	
	}
}

function imgActive ( object ) {
   src = object . getAttribute ( 'src' );
   src = src . replace ( /(\.gif)$/i, '_a.gif' );
   object . setAttribute ( 'src', src );
}

function imgInActive ( object ) {
   src = object . getAttribute ( 'src' );
   src = src . replace ( /(_a\.gif)$/i, '.gif' );
   object . setAttribute ( 'src', src );
}

function imgActive2 ( object ) {
   src = object . getAttribute ( 'src' );
   src = src . replace ( /(\.png)$/i, '_a.png' );
   object . setAttribute ( 'src', src );
}

function imgInActive2 ( object ) {
   src = object . getAttribute ( 'src' );
   src = src . replace ( /(_a\.png)$/i, '.png' );
   object . setAttribute ( 'src', src );
}

window.onload=SelRed;
