function pagenum(p, filename){
    document.forms["nav"].elements["page"].value = p;
    document.forms["nav"].elements["filename"].value = filename;
    document.forms["nav"].submit();
}

function my_confirm(to, what){
	if (confirm(what))
		document.location=to;
}
				
var foto_windows = new Array();
function open_foto(url, winname, width, height){
	foto_windows[foto_windows.length] = window.open(url,winname,'height='+height+',width='+width+',resizable=0,scrollbars=no,menubar=no,status=no');
	for(i = 0; foto_windows.length > i; i++){
		if(!foto_windows[i].closed)
			foto_windows[i].focus();
	}
}

function do_search(text){
	var search_line = document.getElementById('sline');
	search_line.value = text;
	document.forms['web'].submit();
}

function newWindow(url,w,h){
w = w + 18;
h = h + 27;
Win = window.open(url, "Win", "width=" + w + ",height=" + h + "location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0","top=0,left=0");}

function tableLinesOn(pos)
{
	if (!document.getElementById) return;
	var id1 = document.getElementById('id1' + pos );
	var id2 = document.getElementById('id2' + pos );
	var id3 = document.getElementById('id3' + pos );
	if(id1.className == 'number')
		id1.className = 'numberOn';
	if(id2.className == 'name')
		id2.className = 'nameOn';
	if(id3.className == 'price')
		id3.className = 'priceOn';
	}

function tableLinesOff(pos)
{
	if (!document.getElementById) return;
	var id1 = document.getElementById('id1' + pos );
	var id2 = document.getElementById('id2' + pos );
	var id3 = document.getElementById('id3' + pos );
	if(id1.className == 'numberOn')
		id1.className = 'number';
	if(id2.className == 'nameOn')
		id2.className = 'name';
	if(id3.className == 'priceOn')
		id3.className = 'price';
	
	}

function tableClick(host, mode, pos)
{
	alert("aa1");
	alert(host + mode + pos);
	}
