function _onload_(){
	var elem,windel,eltype,elname;

	
niza= "";
	for (elem in window){
		windel= window[elem];
		eltype= typeof(windel);
niza= niza + "/"+elem+"="+eltype;
		if (eltype=="function"){
			if (elem.substr(0,6)=="_onlo_"){
//niza= niza + "/"+elem+"="+eltype;
				eval(elem+"();");
			}else{
			}
		}else{
		}
	}
//alert(niza);
}

//-----------------------------------------------------------------------------------------------------
var oblist= new Array();
oblist[0]= {id:'iframe'};
function ifload(index,hsource,color,width,height){
	var myob= oblist[index];
	myob.color= color;
	myob.width= width;
	myob.height= height;
	var obif= document.getElementById(myob.id);
	obif.src= hsource;
}
function ifonlo(index){
	var myob= getmyob(index);
       
        if( myob )
	{	     
        	var obif= document.getElementById(myob.id);
		if( obif )
		{	
  
                      obif.contentWindow.document.body.style.backgroundColor= myob.color;
	              ifshow(index);
		}
	}
 
}
function ifshow(index){
	var myob= getmyob(index);
	var obif= document.getElementById(myob.id);
	obif.style.width= myob.width;
	obif.style.height= myob.height;
	ifcenter(obif);
	obif.style.visibility= 'visible';
}
function ifclose(index){
	var myob= getmyob(index);
	var obif= document.getElementById(myob.id);
	obif.style.visibility= 'hidden';
}
function getmyob(index){
	if (index){
	}else{
		index= 0;
	}
return oblist[index];
}
//-----------------------------------------------------------------------------------------------------
/**/
function ifcenter(pobj){
	pobj.style.left= parseInt((window.screen.availWidth-pobj.offsetWidth)/2) +'px';
//alert(pobj.style.left);
	var inhe;
	if (window.innerHeight){
		inhe= window.innerHeight;
	}else if (document.body.parentElement){
		inhe= document.body.parentElement.clientHeight;
	}else{
		inhe= document.body.clientHeight;
	}
//alert(window.screen.height+'/'+inhe);
	var ofhe= parseInt((window.screen.height-inhe)/2);
	var stop;
	if (document.documentElement){
		stop= document.documentElement.scrollTop;
	}else{
		stop= document.body.scrollTop;
	}
//	pobj.style.top= parseInt((window.screen.height-pobj.offsetHeight)/2) +document.documentElement.scrollTop -ofhe +'px';
//	stop= self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
	pobj.style.top= parseInt((window.screen.height-pobj.offsetHeight)/2) +stop -ofhe +'px';
}
/**/


function abscoord(obje){
	var to= parseInt(obje.offsetTop);
	var le= parseInt(obje.offsetLeft);
	var pa= obje.offsetParent;
	while(pa){
		to= to + parseInt(pa.offsetTop);
		le= le + parseInt(pa.offsetLeft);
		pa= pa.offsetParent;
	}
	apna= navigator.appName;
	if (apna.indexOf('Explorer')==-1){
	}else{
		le= le +3;
		to= to +3;
	}
return {left:le,top:to};
}


function keynumber(event,extra){
	var event= (event) ? event : window.event;
	var code= (event.charCode) ? event.charCode : event.keyCode;
	var resu= (code>=48 && code<=57);
	if (resu){
	}else{
		if (extra){
			resu= (extra.indexOf(String.fromCharCode(code))!=-1);
		}else{
		}
	}
return resu;
}

function key2numb(event,fiid){
	var reskey= keynumber(event);
	if (reskey){
		document.getElementById(fiid).value= '';
	}else{
	}
return reskey;
}

/*
function key2(event,fiid){
		document.getElementById(fiid).value= '';
return true;
}
*/

function key2(event,fiid){
	var arfi= fiid.split(",");
	for(var i=0; i<arfi.length; i++){
		document.getElementById(arfi[i]).value= '';
	}
return true;
}

function omacti(id,flag,list){
	var obje= document.getElementById(id);
//	var elid= '/'+id+' ';
	var elid= '['+id+']';
//alert(list+"AAA"+elid);
	var indx= list.indexOf(elid);
	if (indx==-1){
		if (flag){
			obje.className= "outover";
		}else{
			obje.className= "outlist";
		}
	}else{
		if (flag){
			obje.className= "inover";
		}else{
			obje.className= "inlist";
		}
	}
}

function ocacti(id,list){
//	var elid= '/'+id+' ';
	var elid= '['+id+']';
	var indx= list.indexOf(elid);
	if (indx==-1){
		list= list + elid;
		document.getElementById(id).className= "inlist";
	}else{
//		var repl= new RegExp(elid,'g');
//		list= list.replace(repl,'');
		list= list.substr(0,indx)+list.substr(indx+elid.length);
		document.getElementById(id).className= "outlist";
	}
//alert(list);
jsco(list,id.substr(0,4)+'count');
return list;
}

function listsetup(list){
//alert(list);
//	var listar= list.split("/");
	var listar= list.split("[");
	var elid,cuid;
	for (var i=1; i<=listar.length-1; i=i+1){
//		var obje= document.getElementById(listar[i]);
		var elid= listar[i];
		var cuid= elid.substr(0,elid.length-1);
//alert(cuid);
		var obje= document.getElementById(cuid);
		obje.className= "inlist";
	}
}

function jsco(list,elid){
//alert('JSCO='+list+'==='+elid);
	var obje= document.getElementById(elid);
	if (obje){
//		var listar= list.split("/");
		var listar= list.split("[");
		obje.innerHTML= (listar.length-1) +'';
	}else{
	}
}
/****************************************************/

function wiloca(p1){
	var mark= "vari=";
	var wire= window.location.href;
//alert('wire='+wire);
	var inof= wire.indexOf(mark);
	if (inof==-1){
alert("inv.location");
	}else{
//		var wir2= wire.substr(wire,inof+mark.length);
		var wir2= wire.substr(0,inof+mark.length);
		wir2=  wir2 +p1;
//alert(wir2);
		window.location.href= wir2;
	}
}

function prinloca(){
	var obut= document.getElementsByTagName("button");
//alert(obut.length);
//	for (var ebut in obut){ldelim}
	for (i=0;i<obut.length;i=i+1){
		var ebut= obut[i];
obut[i].style.display= "none";
	}
window.print();
window.location.reload();
}
