var now_title="";var now_menu=default_menu;var now_section="";var now_section_url="";var now_section_2="";var now_section_url_2="";var now_ad=default_ad;var now_slogan="";var now_fastmenu="";var now_icon="";var last_url="";var last_clicked_menu_url="";var last_menu=new Array(5);var last_tab="";var original_width,banner_on=false;function go_home(){hide("page_toolbar");set_menu(default_menu);set_info(default_info);set_slogan(default_slogan);now_section="";now_section_2="";content.location=base_url+HOMEPAGE;}
function go(url){show("page_toolbar");show("content_title");show("title_line");hide("fader");if(url.indexOf("://")<0){content.location=base_url+url;}else{window.open(url,"external_link");}
hide("Sub2");}
function filter(what,filter){what.style.filter="progid:DXImageTransform.Microsoft."+filter;apply(what);}
function apply(what){try{what.filters[0].apply();}catch(oException){}}
function play(what){try{what.filters[0].play();}catch(oException){}}
function set_title(what){now_title=what;content_title.innerHTML="";setTimeout("set_title_2('"+what+"')",400);}
function set_title_2(what){var tmp=what.split(",");var section="<A class=title  HREF=\""+tmp[0]+"\" TARGET=content>"+tmp[0]+" \\ </A>";tmp=" <IMG SRC='i/ico/home.png' HEIGHT=16 WIDTH=16> <A class=title HREF=\'javascript:go_home();\'>"+HOME_TITLE+"</A> \\ ";if(now_section_2!=null&&now_section_2!="")tmp+="<A class=title HREF=\""+now_section_url_2+"\" TARGET=content>"+now_section_2+"</A> \\ ";if(now_section!="")tmp+="<A class=title HREF=\""+now_section_url+"\" TARGET=content>"+now_section+"</A> \\ ";apply(content_title);content_title.innerHTML=tmp+"<FONT STYLE='color:black;'>"+what+"</FONT>";play(content_title);}
function set_section(what){last_menu_url=now_section_url;var tmp=what.split(",");now_section=tmp[0];now_section_url=tmp[1];now_section_2=tmp[2];now_section_url_2=tmp[3];}
function set_ad(what){if(what==""){if(banner_on==true)hide_banner();}else if(lcase(what)=="yes"){now_ad=default_ad;if(banner_on==false)show_banner();banner_content.document.location.href=default_ad+"?r="+random();}else{now_ad=what;if(banner_on==false)show_banner();banner_content.document.location=base_url+what+"?r="+random();}}
function set_fastmenu(what){if(now_fastmenu==what)return 0;now_fastmenu=what;if(what!=""){go_fastmenu();ad_frame.location.href=base_url+what;}}
function menu_title(ico,title,url){return "<TR><TD height=21 align=center><IMG SRC='i/ico/"+ico+".png' VSPACE=1 WIDTH=16 HEIGHT=16 BORDER=0 ALT='"+title+"'></TD>"+"<TD class=toolboxTitle STYLE='background-color: #A2D6FD;'><A class=toolboxTitle HREF=\"'go(../"+url+"'>"+title+"</A></TD></TR>";}
var menu_items=0;function set_menu(what){menu_items=0;if(now_title==""){filter(menu,"GradientWipe(GradientSize=0.25,wipestyle=1,motion=forward)");}else if(now_menu!=what){filter(menu,"Slide(slidestyle=SWAP,Bands=1)");}else{filter(menu,"GradientWipe(GradientSize=0.50,wipestyle=0,motion=forward)");}
if(what!=default_menu){show("back_button");}else{hide("back_button");}
what=what.replace(/\}/gi,"");now_menu=what;var all=now_menu.split(",");var text="";for(var i=0;i<=all.length-1;i+=2){menu_items++;var m_url=trim(all[i+1]);r=m_url.indexOf("{");all[i]=trim(all[i]);var tmp=all[i].split(")");var m_ico="";var m_title=all[i];if(tmp.length>1){m_ico=tmp[0].substr(1,tmp[0].length);m_title=tmp[1];}
if(trim(lcase(now_title))==lcase(m_title)){text=text+"<IMG SRC='../interface/i/s.gif' HEIGHT=18 WIDTH=20><BR>";last_clicked_menu_url=m_url;}else{text+="<TR><TD height=21 align=center><IMG SRC='i/ico/"+m_ico+".png' VSPACE=1 WIDTH=16 HEIGHT=16 BORDER=0 ALT='"+m_title+"'></TD>"+"<TD class=toolboxTitle OnClick=\"go('"+m_url.substring(0,r)+"');\" STYLE='background-color: #A2D6FD;'><A class=toolboxTitle HREF=\"javascript:go('"+m_url.substring(0,r)+"');\">"+m_title+"</A></TD></TR>"
if(r>=0){text+=submenu(m_title,m_url.substring(r+1,m_url.length),1,menu_items);}}}
menu.innerHTML="<TABLE class=toolbox width=203 cellspacing=1 cellpadding=0>"+text+"</TABLE>";play(menu);}
var mouse_out=false;function hide_sub(){if(mouse_out){hide("Sub2");mouse_out=false;}}
var last_level_top;function submenu(name,alternatives,level,index){hide("Sub2");var html="";var all;if(level==1){all=alternatives.split(";");}else{all=alternatives.split("|");}
for(var i=0;i<=all.length-1;i+=2){menu_items++;var m_url=trim(all[i+1]);var tmp=all[i].split(")");var m_ico="";var m_title=all[i];if(tmp.length>1){m_ico=tmp[0].substr(1,tmp[0].length);m_title=tmp[1];}
html+="<TR><TD>&nbsp;</TD><TD height=21 class=toolbox OnMouseOut='toolbox_off(this);' ";var r=m_url.indexOf("{");if(r>=0){html+="OnMouseOver=\"toolbox_on(this); submenu(\'"+m_title+"\', \'"+m_url.substring(r+1,m_url.length)+"\',2,"+menu_items+");\" OnClick=\"go('"+m_url.substring(0,r)+"');\">&nbsp;<A CLASS=menu HREF=\"javascript:go('"+m_url.substring(0,r)+"');\"";}else{html+="OnMouseOver='toolbox_on(this);' OnClick=\"go('"+m_url+"');\">&nbsp;<A CLASS=menu HREF=\"javascript:go('"+m_url+"');\"";if(level==1){html+=" OnMouseOver=\"hide('Sub2');\"";}}
html+=">";if(m_ico!="")html+="<IMG SRC='i/ico/"+m_ico+".png' WIDTH=16 HEIGHT=16 BORDER=0 ALT='"+m_title+"'> ";html+=m_title+"</A></TD></TR>";}
if(level==1){return html;}else{submenu2.innerHTML="<TABLE class=toolbox width=203 cellspacing=0 cellpadding=0>"+html+"</TABLE>";document.getElementById("Sub2").style.top=154+((index-1)*22);show("Sub2");}}
function set_info(what){apply(info);info.innerHTML=what;play(info);}
function set_slogan(what){if(now_slogan==what)return 0;now_slogan=what;filter(logo,"Stretch(stretchstyle=PUSH)");play(logo);apply(slogan);slogan.innerHTML=what;setTimeout("play(slogan);",500);}
function set_photo(what){if(what)what="<IMG SRC='i/"+what+"'>"
apply(photo);photo.innerHTML=what;play(photo);}
function hide_news(){filter(news,"Slide(slidestyle=PUSH,Bands=1)");news.innerHTML="";play(news);}
function set_news(what){if(what!="")what="<marquee direction='left' onMouseOver='this.scrollAmount=5;' onMouseOut='this.scrollAmount=1;' scrollAmount=1 style='width:100%;cursor:hand;'><A HREF='"+NEWS_URL+"' TARGET=content>"+NEWS_TITLE+":</A> <A HREF='"+NEWS_URL+"' TARGET=content STYLE='color:black; text-decoration:none;'>"+what+"</marquee></A>";filter(news,"GradientWipe(GradientSize=0,wipestyle=1,motion=reverse);");news.innerHTML=what;play(news);}
function back_menu(){if(last_menu[2])set_menu(last_menu[2]);last_menu[1]=last_menu[2];last_menu[2]=last_menu[3];last_menu[3]=last_menu[4];last_menu[4]=last_menu[5];}
function on(img,name){img.src="i/"+name+".gif";}
function off(img){img.src="i/s.gif";}
var active_page="";function write_layer(ID,text){if(document.all[ID]!=null){document.all[ID].innerHTML=text;}}
var left_tabs_help=5;var right_tabs_help=6;function help(nr){hide_help();var x=new Array(12);var y=new Array(12);y[1]=42;x[1]=93;y[2]=54;x[2]=235;y[3]=275;x[3]=93;y[4]=418;x[4]=235;y[5]=169;x[5]=-68;y[6]=-52;x[6]=730;y[7]=169;x[7]=-68;y[8]=169;x[8]=-68;y[9]=y[6];x[9]=x[6];y[10]=y[6];x[10]=x[6];HELP[11]="<FORM NAME=frm_admin ACTION='"+base_url+"applications/login/index.asp?action=login' METHOD=post TARGET=content><B>Admin Login</B><BR><BR><TABLE STYLE='font-size:9pt;' CELLSPACING=0 CELLPADDING=0><TR><TD>User:</TD><TD><INPUT TYPE=text NAME=user STYLE='width:80px; font-size:9pt;'></TD></TR> <TR><TD>Password: &nbsp;</TD><TD><INPUT TYPE=password NAME=password STYLE='width:80px; font-size:9pt;'><NOBR> <INPUT TYPE=submit VALUE=Go STYLE='width:25px; font-size:9pt;' OnClick='hide_help();';></TD></TR></TABLE></FORM>";y[11]=500;x[11]=690;apply(help_box);write_layer("help_text",HELP[nr]);help_box.style.top=y[nr];help_box.style.left=x[nr];show("help_box");play(help_box);if(nr==11)frm_admin.user.focus();}
function hide_help(){close_help();}
function close_help(){hide("help_box");}
function reloadURL(what){content.location=what;window.setTimeout("content.location.reload();",2000);}
function toolbox_on(what){what.style.background="#E5E5E5";}
function toolbox_off(what){what.style.background="#FBFBFB";}
function print_random_banner(){var number_of_banners=16
tmp_random=Math.round(Math.random()*number_of_banners-1);if(tmp_random<1)tmp_random=1;document.write("<A HREF='../content/marketing/index.html' TARGET=content><IMG SRC='i/banners/banner_"+tmp_random+".jpg' HEIGHT=60 WIDTH=468 BORDER=0 ALT='Reklamirajte se na Konjic.com - Kliknite za vise informacija.'></A>");}