function url(l, st){
     window.location = '{script_href}?st='+ st + '&l=' + l;
}

function row_over(obj){
     obj.className = 'row_over';
}
     
function row_out(obj){
     obj.className = 'row';
}
     
function wait_load(id, fun){
     eval('obj = '+id+';');

     if (obj.width > 0){
          eval(fun+'();');
          //eval("window.onresize = "+fun+"();";
          //return true;
     }
     ID=window.setTimeout("wait_load('"+id+"','"+fun+"');",1000);
}
          
function set_image_width(id, w) {
     eval('obj = '+id+';');
     iw = obj.width;
     dw = document.body.clientWidth;
     m  = ((dw*w)/iw);
     img.width = Math.ceil(dw*w);
     return m;
}

function correct_xy(id, m){

     de = document.getElementsByTagName("div");
     for (i=0; i<de.length; i++) {
          name = de[i].id;
          if (name.substring(0,id.length) == id){
               x = de[i].style.marginLeft;
               x = x.replace('px', '');
               x = Math.ceil(x*m);
               de[i].style.marginLeft = x;
               
               y = de[i].style.marginTop;
               y = y.replace('px', '');
               y = Math.ceil(y*m);
               de[i].style.marginTop = y;
          }
     }
}

function select_items(prefix, n){
	//de = document.getElementsByTagName(tag);
	//de = document.all;
	
	//Opera = (document.getElementById);
	Opera = (document.getElementsByTagName('*'));
	IE = (document.all);
	if (Opera)de = Opera;
	if (IE)de = IE;
	
	
	for (i=0; i<de.length; i++) {
	     if (!de[i].id){
	     	continue;
	     }
	     name = de[i].id;
	     
	     if (name.substring(0,prefix.length) == prefix){
	          
	          reg = /_(\d+)/;
	          res = reg.exec(name);
	          
	          if (!res) continue;
	          
	          if (n == res[1]){
	          	style_items(de[i], true);
	          }else{
	          	style_items(de[i], false);
	          }
	          
	     }
	}
}
