var delay = 10000;                             
var namelink = "#linktochange"

var image = new Array(); 
image[0] = new link(0,"http://prima-dent.com.pl/index.php/certyfikaty.html","../img/banerimg.gif");
//image[1] = new link(1,"certyfikat.php","img/swietaw.jpg");

var help;                                 

function init() {                                  
  for (licz = 0; licz  < document.links.length; licz++) { 
   if ( document.links[licz].hash == namelink )  {       
   refer = licz; 
   break;                                           
   }
 }
change(0)                                  
}

function link(nr, link, img) {
 this[nr] = new Image;
 this.link = link; 
 this.src = img;
}

function change(which) {                            
 if ( which == (image.length - 1) ) help = 0;
 else help = which + 1;
 document.images["image"].src = image[which].src;
 document.links[refer].href = image[which].link;
  
 setTimeout ("change(help)",delay);	   
}

function bookmark()
{
    var title="Prima-dent - stomatologia"
        var url="http://www.prima-dent.com.pl"

    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);

}

function myPop(theURL){
window.open(theURL, "myWindow","location=no,status=1,scrollbars=1,width=605,height=800" )	
}
function myPopMap(theURL){
window.open(theURL, "myWindow","location=no,status=1,scrollbars=0,width=520,height=535" )	
}
