﻿objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++)
{
   objects[i].outerHTML = objects[i].outerHTML;
}


function Add2Fav()
{
   var t = document.title;
   var l = document.location;
   
   if (document.all)
   {        
      window.external.AddFavorite(l, t);
   }
   else
   {       
      window.sidebar.addPanel(t, l, "");
   }
       
}

function IsIe()
{
  if (document.all)
       return true;
  else
       return false;

}


function AddOrStartWith()
{

    if( IsIe())
    {
       document.write('  <a onClick="this.style.behavior=\'url(#default#homepage)\';this.SetHomePage(\'http://www.cafenews.pl\');">'+
                            '<span id="startuj" style="cursor:hand;">'+
                                '<img src="/portals/_default/skins/cnpagesskin/ico_startuj.gif" alt="startuj z cafe news" height="17" width="17" />'                                +
                                'Startuj z Cafe News '+
                            '</span>'+
                         '</a>'+
                         '<div id="f_menu">'+
                            '<img src="/portals/_default/skins/cnpagesskin/footer_separator1.gif" alt="" height="19" width="2" />'+                         
                         '</div>'+
                         '  <a href="javascript:Add2Fav();">'+
                            '<span id="startuj" style="cursor:hand;">'+                                
                                'Dodaj stronę Cafe News do ulubionych'+
                            '</span>'+
                         '</a>' );
    }    
    else
    {
        document.write('  <a href="javascript:Add2Fav();">'+
                            '<span id="startuj" style="cursor:hand;">'+
                                '<img src="/portals/_default/skins/cnpagesskin/ico_startuj.gif" alt="Dodaj stronę Cafe News do zakładek" height="17" width="17" />'                                +
                                'Dodaj stronę Cafe News do zakładek'+
                            '</span>'+
                         '</a>');
       
    
    }


}


var photoNr =0;


function changePhoto(id0,id1,time)
{
    var div0 = document.getElementById(id0);
    var div1 = document.getElementById(id1);

    if(photoNr ==0)
    {
        photoNr =1;
        div0.style["display"] = "none";
        div1.style["display"] = "block";
        
    }
    else
    {
        photoNr =0;
        div1.style["display"] = "none";
        div0.style["display"] = "block";
        
    }
    window.setTimeout("changePhoto('"+id0+"','"+id1+"',"+time+");",time);                                                       
}

function runChangePhoto(id0,id1,time)
{
   
    // uruchamiamy podmianę divów
   window.setTimeout("changePhoto('"+id0+"','"+id1+"',"+time+");",time);        
}