function set_empty( tt, n ){
	tt.src = 'http://i.dir.bg/novini/img/tick.gif';
	if( n!= 1 ) document.uppersearch.tick1.src='http://i.dir.bg/novini/img/spacer.gif';
	if( n!= 2 ) document.uppersearch.tick2.src='http://i.dir.bg/novini/img/spacer.gif';
	if( n!= 3 ) document.uppersearch.tick3.src='http://i.dir.bg/novini/img/spacer.gif';
	if( n!= 4 ) document.uppersearch.tick4.src='http://i.dir.bg/novini/img/spacer.gif';
	if( n!= 5 ) document.uppersearch.tick5.src='http://i.dir.bg/novini/img/spacer.gif';
	
}

var sel=new Array(7);
var pic=new Array(7);

function changeIt( tab, id, clas ){
	try
	{
		document.getElementById(tab).className = clas;
		el = 'content'+id;
		inner = 'm'+tab
		//html = document.getElementById(inner).innerHTML
		//html = GetContent( inner );
		html = eval(inner);
		//alert(html);
		PutContent( el , html )
		changePic( tab, id, "http://i.dir.bg/novini/img/tick_2.gif" );
		if( sel[id]!=tab && sel!=0){
			changeItBack( sel[id], id, 'blue_4' );
		}
		sel[id]=tab;
		//html = GetContent( el );
		//alert(html);
	}
	catch(err)
	{
		//alert(err.description);
	}
}

function changeItBack( sel, id, clas ){
	changePicBack( sel, id, "http://i.dir.bg/novini/img/spacer.gif" );
	document.getElementById(sel).className = clas;
}

function changePic( num, id, src ){
	img = 'im'+num
	document.getElementById(img).src = src;
	if( pic[id]!=num && pic!=0){
		changePicBack( pic[id], "http://i.dir.bg/novini/img/spacer.gif" );
	}
	pic[id] = num
}

function changePicBack( num, id, src ){
	img = 'im'+num
	document.getElementById(img).src = src;
}

function PutContent(id,shtml) {
 //alert(id+ ' ' +shtml);
 
   if (document.getElementById || document.all) {
      var el = document.getElementById? document.getElementById(id): document.all[id];
      if (el && typeof el.innerHTML != "undefined") el.innerHTML = shtml;
   }
}

function GetContent( layName ) {
 //alert(shtml);
    if(navigator.userAgent.search(
             "Opera(\ |\/)6") != -1 ){  //o6用
     return document.getElementById(layName).innerHTML;
 
    } else if(document.getElementById){ //e5,e6,n6,n7,m1,s1,o7用
      return document.getElementById(layName).innerHTML;
 
    } else if(document.all){            //e4用
      return document.all(layName).innerHTML;
 
    } else if(document.layers)          //n4用
    {
    // could be problem
      return document.layers[layName].innerHTML;
      }
}

function changeContent( layName, content){
 //alert(content);
    if(navigator.userAgent.search(
             "Opera(\ |\/)6") != -1 ){  //o6用
     document.getElementById(layName).innerHTML=content;
 
    } else if(document.getElementById){ //e5,e6,n6,n7,m1,s1,o7用
      document.getElementById(layName).innerHTML=content;
 
    } else if(document.all){            //e4用
      document.all(layName).innerHTML=content;
 
    } else if(document.layers)          //n4用
    {
    // could be problem
      document.layers[layName].innerHTML=content;
      }
}
