function zoompict(src)
{
  var pb = document.getElementById('pictbig');
  if ( pb ) pb.src=src;
}

function nextpict(pictsbig)
{
  var pb = document.getElementById('pictbig');
  if ( pb )
    {
      var pfnd=-1;
      pmax=pictsbig.length-1;
      i=0;
      while ( (i<=pmax)&&(pfnd==-1) )
        {
          if ( pictsbig[i]==pb.src )
            pfnd=i;
          i++;
        }
      if ( pfnd==pmax ) pfnd=0
      else              pfnd++;
      if ( pfnd>=0 )
        pb.src=pictsbig[pfnd];
    }
}

function showhidecont(hidenum)
{
	for(var i=1;i<=2;i++)
	{
		if(i==parseInt(hidenum))
		{
			document.getElementById('button').className = 'result isoffer';
			document.getElementById('div_'+i).style.display = "block";

		}
		else
		{
			document.getElementById('button').className = 'result issearch';
			document.getElementById('div_'+i).style.display = "none";
		}
	}
}

function showhidemenu(hidenum)
{
	var position;
	if (hidenum == 1)
	{
		position = '0 -32px';
	}else if(hidenum == 2){
		position = '0 -160px';
		
	}else if(hidenum == 3){
		position = '0 -288px';
	}else if(hidenum == 4){
		position = '0 -224px';
	}
	if(hidenum != 3){ document.getElementById('sub_'+hidenum).style.display = "block"; }
	document.getElementById('act_'+hidenum).style.backgroundPosition =position;
	if (hidenum == 1){ document.getElementById('iframe-fix').style.display = "block"; }
}


function hidemenu(hidenum)
{
	var position;
	if (hidenum == 1)
	{
		position = '0 0px';
	}
	else if(hidenum == 2)
	{
		position = '0 -128px';
	}
	else if(hidenum == 3)
	{
		position = '0 -256px';
	}
	else if(hidenum == 4)
	{
		position = '0 -192px';
	}
	
	if(hidenum != 3){ document.getElementById('sub_'+hidenum).style.display = "none"; }
	document.getElementById('act_'+hidenum).style.backgroundPosition = position;
	if (hidenum == 1){ document.getElementById('iframe-fix').style.display = "none"; }

}


function hidenews()
{
	document.getElementById('news').style.backgroundPosition = '0 -96px';
}

function shownews()
{
	document.getElementById('news').style.backgroundPosition = '0 -64px';
}

function wild(hidenum)
{
	for(var i=1;i<=3;i++)
	{
		if(i==parseInt(hidenum))
		{
			document.getElementById('slide'+i).className = 'slide-on';
			document.getElementById('thb'+i).className = 'active_thumb';

		}
		else
		{
			document.getElementById('slide'+i).className = 'slide-off';
			document.getElementById('thb'+i).className = 'thumb';
		}
	}
	
	
}

function changepic(hidenum)
{
	var result = document.getElementById('result').value;

	for(var i=1;i<=result;i++)
	{
		if(i==parseInt(hidenum))
		{
			document.getElementById('big'+i).className = 'view';
		}
		else
		{
			document.getElementById('big'+i).className = 'hidden';
		}
	}
}
function showallpicts(winname,pn)
{
if ( document.showpicts )
	{
		showpictswindow=window.open('',winname,'width=1020,height=590,toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,screenx=225,screeny=230');
		document.showpicts.target = winname;
		document.showpicts.pn.value=pn; 
		document.showpicts.submit();
	}
} 

function toggleDiv(element){
      if(document.getElementById(element).style.display = 'block')
      {
        document.getElementById(element).style.display = 'none';
      }
}