function Set_Cookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

function goflash(flash, klasa){

   var version = deconcept.SWFObjectUtil.getPlayerVersion();
   if(version['major']<1)
    flash=0;
   if (flash && document.getElementById && (version['major'] < 7))
    {
    var agree=confirm("You are using old version of flash player. Do You wish to upgrade?");
    if (agree)
	document.location="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
    else
     {
     flash="0";
     var lokacija = document.location.href;
     lokacija = lokacija.replace("flash=1","flash=0");
     Set_Cookie("flash", "0", 30, "/", "www.obz.hr", false);
     document.location=lokacija;
     }
    }

  var ime;
  switch(klasa)
   {
   case 21:
    ime = "002_general_data";
    break;
    case 22:
    ime = "003_local_selfgovernment";
    break;
	case 23:
    ime = "004_county_government";
    break;
	case 26:
    ime = "007_interregional";
    break;
	case 27:
    ime = "008_space";
    break;
	case 28:
    ime = "009_county_economy";
    break;
	case 29:
    ime = "010_public_services";
    break;
	case 12:
    ime = "016_national_minorities";
    break;
	case 16:
    ime = "018_publications";
    break;


   default:
    ime = "001_home";
    break;
   }

  if (flash=="1" )
   {
   var so = new SWFObject("design/images/top/"+ime+".swf", ime+".swf", "700", "218", "7", "#FFFFFF");
   so.write("baner");


   var so = new SWFObject("design/images/top.swf", "top.swf", "960", "25", "7", "#FFFFFF");
   so.write("gornjatraka");
   var so = new SWFObject("design/images/bottom.swf", "design/images/bottom.swf", "920", "77", "7", "#FFFFFF");
   so.write("dno");

  
   }
  else
   {
   var inner='<img src="/en/design/images/top/'+ime+'.jpg">';
   document.getElementById("baner").innerHTML=inner;
   }
}