function my_resolution(res_num,mystyle,w_logo1,w_logo2,h_logo,h_tophead,w_midright,w_right_line,h_grey,h_circle_pic){
    this.res_num=res_num;
    this.mystyle=mystyle;
    this.w_logo1=w_logo1;
    this.w_logo2=w_logo2;
	this.h_grey=h_grey;
    this.h_logo=h_logo;
    this.h_tophead=h_tophead;
    this.w_right_line=w_right_line;
    this.w_midright=w_midright;
	this.h_topbottom=h_logo-(h_grey+h_tophead);
    this.h_circle_pic=h_circle_pic;
    return this;
    }
function define_res(scr_width){
    var arr_res=new Array(800,1024,1152);
    var i=0;
    for (i=0;i<arr_res.length;i++){
        if (scr_width==arr_res[i]) return arr_res[i];
        if (scr_width<arr_res[i]) 
            if (i==0) return arr_res[i];
            else return arr_res[i-1];
        } 
    }
function getCookieNEW(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}
//win_open(url, name, width, height)
 function win_open(url, name, width, height) {
    var tmp_h;
	var tmp_w;
	var tmp_l;
	var tmp_t;
    var iTop;
    var iLeft;
    if (name=="big_foto"){ 
//  	    height=450;
//	    width=380;
		tmp_h=getCookieNEW("objekta_logs_h");
		tmp_w=getCookieNEW("objekta_logs_w");
		tmp_l=getCookieNEW("objekta_logs_l");
		tmp_t=getCookieNEW("objekta_logs_t");
//		alert(tmp_w);
		if (tmp_h!=null) 
			if (tmp_h>0) height=tmp_h-5;//
		if (tmp_w!=null) 
			if (tmp_w>0) width=tmp_w;		
        iTop = 10;
	    iLeft = (window.screen.availWidth - width-50);
	    }

	if (tmp_t!=null)
		if (tmp_t>0) iTop=tmp_t-22;//


	if (tmp_l!=null)
		if (tmp_l>0) iLeft=tmp_l-4;//

	win = window.open(url, name, "top=" + iTop + ", left=" + iLeft + ", status=yes, toolbar=no, location=no, menubar=no, scrollbars=yes, resizable=yes, titlebar=yes, width=" + width + ", height=" + height);
	return win;
 }


var err=0;
var resol;
var myres;
try{
   if(screen.width) resol=define_res(screen.width);
   }
catch(err){
   err=1;
   }
switch (resol){
   case 800: myres=new my_resolution(800,"style800.css?a=25",147,65,102,39,180,150,10,397);
   break;
//   case 1152: myres=new my_resolution(1152,"style1024.css?a=19",196,83,152,74,359,280,13);
//   break;
   default:  
   myres=new my_resolution(1024,"style1024.css?a=25",187,83,131,50,300,218,13,508);
   }

