ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))
ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 ))

var IE=document.all?1:0;

if (IE) {
        layerRef="document.all";
        styleRef=".style";
       }
       else
       {
       layerRef="document.layers";
       styleRef="";
      }


function showpic(fname,x,y)
 {
  nwindow = window.open("","newwin","width="+ x +",height="+ y);
  nwindow.document.open();
  nwindow.document.write("<HTML> <HEAD>");
  nwindow.document.write("<TITLE>Bezár: klikk a képre &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </TITLE>");
  nwindow.document.write("</HEAD>");
  nwindow.document.write("<BODY bgcolor='#FFFFFF' link='white' leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginheight='0' marginwidth='0'>");
  nwindow.document.write("<table cellpadding='0' cellspacing='0' border='0' width='"+ x +"' height='" + y +"'>");
  nwindow.document.write("<tr><td>");
  nwindow.document.write(" <a href='javascript:close()'><img src='" + fname +"' border='0'> ");
  nwindow.document.write("</a></td></tr>");
  nwindow.document.write("</table></BODY></HTML>");
  nwindow.document.close();
 }
 
 function showpic_big(fname,x,y)
 {
  nwindow = window.open("","newwin","width="+ x +",height="+ y);
  nwindow.document.open();
  nwindow.document.write("<HTML> <HEAD>");
  nwindow.document.write("<TITLE>Bezár: klikk a képre &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </TITLE>");
  nwindow.document.write("</HEAD>");
  nwindow.document.write("<BODY>");
  nwindow.document.write("<div class=big_pic>");
  nwindow.document.write("<a href='javascript:close()'><img src='" + fname +"' border='0'> ");
  nwindow.document.write("</a>");
  nwindow.document.write("</div></body></html>");
  nwindow.document.close();
 }

BrowserName=navigator.appName;
 BrowserVersion=parseInt(navigator.appVersion);
 if (BrowserName=="Netscape" && BrowserVersion>=3)
  useable="yes";
 else
  useable="yes";
 
buttonfo1=new Button("images/menu/akt_off.jpg","images/menu/akt.jpg");
buttonfo2=new Button("images/menu/termek_off.jpg","images/menu/termek.jpg");
buttonfo3=new Button("images/menu/viszont_off.jpg","images/menu/viszont.jpg");
buttonfo4=new Button("images/menu/kapcs_off.jpg","images/menu/kapcs.jpg");
buttonfo5=new Button("images/menu/guest_off.jpg","images/menu/guest.jpg");

buttonfo6=new Button("images/menu/varos_off.jpg","images/menu/varos.jpg");
buttonfo7=new Button("images/menu/leven_off.jpg","images/menu/leven.jpg");
buttonfo8=new Button("images/menu/gyum_off.jpg","images/menu/gyum.jpg");
buttonfo9=new Button("images/menu/nap_off.jpg","images/menu/nap.jpg");
buttonfo10=new Button("images/menu/csipke_off.jpg","images/menu/csipke.jpg");
buttonfo11=new Button("images/menu/sajto_off.jpg","images/menu/sajto.jpg");
buttonfo12=new Button("images/menu/galeria_off.jpg","images/menu/galeria.jpg");
buttonfo13=new Button("images/menu/kedv_off.jpg","images/menu/kedv.jpg");
buttonfo14=new Button("images/menu/ajanl_off.jpg","images/menu/ajanl.jpg");


 function Button(norm_src,sel_src)
 {
  if (useable=="yes")
  {
   this.norm=new Image();
   this.sel=new Image();
   this.norm.src=norm_src;
   this.sel.src=sel_src;
  }
 }

 function TurnToSel(ImageName)
 {
  if (useable=="yes")
  {
   NewSrc=eval(ImageName+".sel.src");
   document[ImageName].src=NewSrc;
  }
 }

 function TurnToNorm(ImageName)
 {
  if (useable=="yes")
  {
   NewSrc=eval(ImageName+".norm.src");
   document[ImageName].src=NewSrc;
  }
 }

function updateTime() { 
var now = new Date(); 
var time = "" + now.getHours() + ":"; var minute = now.getMinutes(); 
if (minute < 10) { time += "0"; } time += minute + ":"; var second = now.getSeconds(); 
if (second < 10) { time += "0"; } time += second; window.status = time; 
window.setTimeout("updateTime()",1000); } 


function GoUrl(s)
	{	var d = s.options[s.selectedIndex].value
		window.top.location.href = d
		s.selectedIndex=0
	}

var slideShowSpeed = 2000
	var crossFadeDuration = 3
	var Pic = new Array() // don't touch this
		Pic[0] = 'images/01.jpg'
		Pic[1] = 'images/02.jpg'
		Pic[2] = 'images/03.jpg'
		Pic[3] = 'images/04.jpg'
		Pic[4] = 'images/05.jpg'
		Pic[5] = 'images/06.jpg'
		Pic[6] = 'images/07.jpg'
		Pic[7] = 'images/08.jpg'
		Pic[8] = 'images/09.jpg'
		Pic[9] = 'images/10.jpg'
		Pic[10] = 'images/11.jpg'
		
	var t
	var j = 0
	var p = Pic.length
	var preLoad = new Array()
	for (i = 0; i < p; i++){
		preLoad[i] = new Image()
		preLoad[i].src = Pic[i]
							}
	function runSlideShow(){
		if (document.all){
			document.images.SlideShow.style.filter="blendTrans(duration=2)"
			document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
			document.images.SlideShow.filters.blendTrans.Apply()      
						}
			document.images.SlideShow.src = preLoad[j].src
		if (document.all){
			document.images.SlideShow.filters.blendTrans.Play()
						}
	j = j + 1
		if (j > (p-1)) j=0
		t = setTimeout('runSlideShow()', slideShowSpeed)
							}

var slideShowSpeed2 = 1500
	var crossFadeDuration2 = 1
	var Pic2 = new Array() // don't touch this
		Pic2[0] = 'images/18.jpg'
		Pic2[1] = 'images/14.jpg'
		Pic2[2] = 'images/16.jpg'
		Pic2[3] = 'images/17.jpg'
		Pic2[4] = 'images/12.jpg'
		Pic2[5] = 'images/15.jpg'
		Pic2[6] = 'images/13.jpg'
		
	var t2
	var j2 = 0
	var p2 = Pic2.length
	var preLoad2 = new Array()
	for (i2 = 0; i2 < p2; i2++){
		preLoad2[i2] = new Image()
		preLoad2[i2].src = Pic2[i2]
							}
	function runSlideShow2(){
		if (document.all){
			document.images.SlideShow2.style.filter="blendTrans(duration=2)"
			document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)"
			document.images.SlideShow2.filters.blendTrans.Apply()      
						}
			document.images.SlideShow2.src = preLoad2[j2].src
		if (document.all){
			document.images.SlideShow2.filters.blendTrans.Play()
						}
	j2 = j2 + 1
		if (j2 > (p2-1)) j2=0
		t2 = setTimeout('runSlideShow2()', slideShowSpeed2)
							}


function bookmark(){
    var title="Kizárólag kézzel készült, egyedi kerámiák műhelye. Baranyi Kerámia - Veszprém"
    var url="http://www.baranyikeramia.hu"

    if (window.sidebar) window.sidebar.addPanel(title, url,"");

    else if( window.opera && window.print )
    {
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();
    }

    else if( document.all ) window.external.AddFavorite( url, title);

}

var t_id = setInterval(animate,20);
var pos=0;
var dir=2;
var len=0;

function animate()
{
var elem = document.getElementById('progress');
if(elem != null) {
if (pos==0) len += dir;
if (len>32 || pos>79) pos += dir;
if (pos>79) len -= dir;
if (pos>79 && len==0) pos=0;
elem.style.left = pos;
elem.style.width = len;
}
}

function remove_loading() {
this.clearInterval(t_id);
var targelem = document.getElementById('loader_container');
targelem.style.display='none';
targelem.style.visibility='hidden';
var t_id = setInterval(animate,60);
}