var limit=860;

function display_up(){
	detect_width();//alert(my_width);

	var text="";
	text+="<!-- UP -->\n";
	text+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"84\" background=\"../img/pixel_up.gif\">\n";
	if(my_width<limit){
		if(my_width<=790){
			text+="<tr><td><img src=\"../img/pxclear.gif\" width=\"1\" height=\"36\" border=\"0\" alt=\"\"></td>\n";
			text+="</tr>\n";
			text+="<tr><td align=\"left\" width=\"100%\" background=\"../img/pic_up.gif\"><img src=\"../img/pxclear.gif\" width=\"1\" height=\"48\" border=\"0\" alt=\"\"></td>\n";
			text+="</tr>\n";
		}else{
			text+="<tr><td><img src=\"../img/pxclear.gif\" width=\"1\" height=\"36\" border=\"0\" alt=\"\"></td>\n";
			text+="<td><img src=\"../img/pxclear.gif\" width=\"1\" height=\"36\" border=\"0\" alt=\"\"></td>\n";
			text+="</tr>\n";
			text+="<tr><td align=\"left\"><img src=\"../img/pic_up.gif\" width=\"790\" height=\"48\" border=\"0\" alt=\"\"></td>\n";
			text+="<td width=\"100%\"><img src=\"../img/pxclear.gif\" width=\"1\" height=\"48\" border=\"0\" alt=\"\"></td>\n";
			text+="</tr>\n";
		}
	}else{
		text+="<tr><td align=\"left\" valign=\"top\"><img src=\"../img/pxclear.gif\" width=\"69\" height=\"36\" border=\"0\" alt=\"\"></td><td align=\"left\" valign=\"top\" width=\"100%\"><img src=\"../img/pxclear.gif\" width=\"1\" height=\"36\" border=\"0\" alt=\"\"></td>\n";
		text+="</tr>\n";
		text+="<tr><td align=\"left\" valign=\"top\">\n";
		text+="<img src=\"../img/pxclear.gif\" width=\"69\" height=\"1\" border=\"0\"></td>\n";
		text+="<td align=\"left\" valign=\"top\"><img src=\"../img/pic_up.gif\" width=\"790\" height=\"48\" border=\"0\" alt=\"\"></td>\n";
		text+="</tr>\n";
	}

	text+="</table>\n";
	text+="<!-- /UP -->\n";
	document.write(text);
}

function start_main(){
	detect_width();

	var text="";
	text+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"360\">\n";
	text+="<tr><td background=\"../img/krug-bck.gif\" align=\"left\" valign=\"top\">\n";
	document.write(text);
}


function start_left(){
	detect_width();//alert(my_width);
	td_w=my_width-239;

	var text="";
	var text="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"360\">\n";
	text+="<tr>\n";
	if(my_width>=limit){
		text+="<td width=\"69\">\n";
		text+="<img src=\"../img/pxclear.gif\" width=\"69\" height=\"1\" border=\"0\">\n";
		text+="</td>\n";
	}
	text+="<td width=\"235\" valign=\"top\">\n";

		//table za linkove
		text+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"235\">\n";
		text+="<tr>\n";
		text+="<td background=\"../img/pixel_left_part.gif\" width=\"20\">&nbsp;</td>\n";
		text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#CEC3A7\" colspan=\"2\" width=\"201\">&nbsp;";
		text+="</td>\n";
		text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#EAD8A9\" width=\"13\">\n";
		text+="<img src=\"../img/pxclear.gif\" width=\"13\" height=\"1\">\n";
		text+="</td>\n";
		text+="</tr>\n";

		for(var i=1;i<=5;i++){
			 text+="<tr>\n";
			 if(i==curr_lnk){
     		  text+="<td background=\"../img/pixel_left_part.gif\" width=\"20\">\n";
	 		  text+="<img src=\"../img/point.gif\" width=\"21\" height=\"12\">\n";
	  		  text+="</td>\n";
	 		  text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#CEC3A7\" colspan=\"2\">\n";
			  text+="<span class=\"activelnk\">"+lnk_name[i]+"</span>\n";
			  text+="</td>\n";
			  text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#EAD8A9\" width=\"13\">\n";
			  text+="<img src=\"../img/pxclear.gif\" width=\"13\" height=\"1\">\n";
			  text+="</td>\n";
			  text+="</tr>\n";
			  for(var j=0;j<br_sublnk[i];j++){
			    text+="<tr>\n";
	 		    text+="<td background=\"../img/pixel_left_part.gif\" width=\"20\">\n";
	 		    text+="<img src=\"../img/pxclear.gif\" width=\"21\" height=\"1\">\n";
	  		    text+="</td>\n";
	  		    text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#CEC3A7\" width=\"16\" align=\"right\" class=\"right\">\n";
				 if(curr_sublnk==j){
	  		  	     text+="<img src=\"../img/pointsmall.gif\" width=\"4\" height=\"4\" align=\"right\" border=\"0\" class=\"right\">\n";
		  			 text+="</td>\n";
		  			 text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#CEC3A7\">\n";
		 			 text+="&nbsp;<span class=\"activesublnk\">"+sublnk_name[j]+"</span>\n";
				 }else{
		 			 text+="<img src=\"../img/pxclear.gif\" width=\"16\" height=\"1\">\n";
		 			 text+="</td>\n";
		 			 text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#CEC3A7\">\n";
		 			 text+="&nbsp;<a href=\"page"+i+j+".html\" class=\"left\">"+sublnk_name[j]+"</a>\n";
		 		}
	     		text+="</td>\n";
	    		text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#EAD8A9\" width=\"13\">\n";
	   		    text+="<img src=\"../img/pxclear.gif\" width=\"13\" height=\"1\">\n";
	    		text+="</td>\n";
	    		text+="</tr>\n";
	  		 }     //enf for petlje za sublnk
		 }else{
	  		 text+="<td background=\"../img/pixel_left_part.gif\" width=\"20\" align=\"right\">\n";
	   		 text+="<span class=\"left\">›</span>\n";
	  		 text+="</td>\n";
	 		 text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#CEC3A7\" colspan=\"2\">\n";
			 text+="&nbsp;<a href=\"page"+i+"0.html\" class=\"left\">"+lnk_name[i]+"</a>\n";
			 text+="</td>\n";
			 text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#EAD8A9\" width=\"13\">\n";
			 text+="<img src=\"../img/pxclear.gif\" width=\"13\" height=\"1\">\n";
			 text+="</td>\n";
			 text+="</tr>\n";
		   }
		}       //end for petlje za lnk

		text+="<tr>\n";
		text+="<td background=\"../img/pixel_left_part.gif\" width=\"20\" align=\"right\" height=\"50\">&nbsp;\n";
	   text+="</td>\n";
	   text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#CEC3A7\" colspan=\"2\" height=\"50\">&nbsp;\n";
	   text+="</td>\n";
	   text+="<td background=\"../img/pxclear.gif\" bgcolor=\"#EAD8A9\" width=\"13\" height=\"50\">\n";
	   text+="<img src=\"../img/pxclear.gif\" width=\"13\" height=\"1\">\n";
	   text+="</td>\n";
	   text+="</tr>\n";

		text+="<tr>\n";
		text+="<td background=\"../img/left_down.gif\" width=\"20\" height=\"19\">&nbsp;</td>\n";
		text+="<td background=\"../img/pixel_left_down.gif\" colspan=\"2\" width=\"201\">&nbsp;";
		text+="</td>\n";
		text+="<td background=\"../img/right_down.gif\" width=\"13\">\n";
		text+="<img src=\"../img/pxclear.gif\" width=\"13\" height=\"1\">\n";
		text+="</td>\n";
		text+="</tr>\n";
		text+="</table>";
//kraj table za linkove



	text+="</td>\n";
	if(my_width<limit){
 		text+="<td align=\"left\" valign=\"top\">\n";
 		text+="<img src=\"../img/tackice.gif\" width=\"20\" height=\"262\" border=\"0\">\n";
 		text+="</td>\n";
	}else{
 		text+="<td align=\"left\" valign=\"top\">\n";
 		text+="<img src=\"../img/tackice.gif\" width=\"20\" height=\"262\" border=\"0\">\n";
 		text+="</td>\n";
	}
	text+="</tr>\n";
	text+="</table>\n";

	document.write(text);
}

function display_text(){

	var text="";
	text+="</td>\n";
	text+="<td width=\"100%\" valign=\"top\" align=\"left\">\n";

	document.write(text);
}

function end_main(){
	var text="";

	text+="</td>\n";
	// end TEXT area
	text+="</tr>\n";
	text+="</table>\n";
	text+="<!-- /MAIN -->\n";
	document.write(text);
}

var pic_url="../img/down_mid.gif";
if(is_nav && not_nav6) pic_url="../img/down_mid_n.gif";

function display_down(){
	detect_height();
	my_h=my_height-fixed_height;

	var text="";
	text+="<!-- DOWN -->\n";
	text+="<table width=\"100%\" height=\""+my_h+"\" border=0 cellpadding=0 cellspacing=0 background=\"../img/down_pixel.gif\" bgcolor=\"#884141\">\n";
	text+="<tr><td valign=\"top\" width=\"50%\">&nbsp;\n";
	text+="</td>\n";

	text+="<td align=\"center\" valign=\"top\" background=\"../img/down_mid.gif\">\n";
		text+="<img src=\"../img/pxclear.gif\" width=\"313\" height=\""+my_h+"\">\n";
	text+="</td>\n";

	text+="<td valign=\"top\" width=\"50%\">\n";
		text+="<table border=0 cellpadding=0 cellspacing=0 width=\"100%\">\n";
		text+="<tr><td align=\"left\" valign=\"top\"><span class=\"copyright\">&copy; 2002-2008 Graovac</span></td></tr>\n";
		text+="<tr><td align=\"right\" valign=\"top\"><a href=\"http://www.massvision.net\" target=\"_blank\" class=\"design\">designed by MASSVision</a></td></tr>\n";
		text+="</table>";
	text+="</td></tr>\n";
	text+="</table>";
	text+="<!-- /DOWN -->\n";
	document.write(text);
}


