// --- galerijas apskates funkcija
function prewview(url,dir){
var url;
var dir;
var td_hei = document.body.scrollTop + 75;
var content = "<table border='0' cellpadding='0' cellspacing='0' style='height: 100%; width: 100%'>";
    content += "<tr><td height='"+td_hei+"' colspan='3' class='opac70'>&nbsp;</td></tr>";
    content += "<tr><td width='50%' class='opac70'>&nbsp;</td>";
    content += "<td bgcolor='#FFFFFF' onclick='hide()' style='cursor: pointer'><img src='"+dir+"/"+url+"' hspace='2' vspace='2'></td>";
    content += "<td width='50%' class='opac70'>&nbsp;</td></tr>";
    content += "<tr><td height='100%' colspan='3' class='opac70'>&nbsp;</td></tr>";
    content += "</table>";
document.all.img_box.innerHTML=content;
document.getElementById('img_box').style.top = 0;
if(document.body.scrollHeight > document.body.clientHeight){document.getElementById('img_box').style.height = document.body.scrollHeight;}
else{document.getElementById('img_box').style.height = document.body.clientHeight;}
}

function cur_object(id){
	var id;
	nw = window.open("php/cur_obj.php?id="+id,"obj", "toolbar=no,menubar=no,width=800,height=600,left=100,top=200,scrollbars=yes,resizable=no")
	nw.focus();
} 
	
function hide(){
document.getElementById('img_box').style.top = -1 * document.body.scrollHeight; ;
}

// --- galerijas apskates funkcija(jauns logs, viena bilde)
function view_img(url,dir){
var url;
var dir;
nw=window.open('php/show_img.php?src='+url+'&dir='+dir,"img","width=590,height=500");
nw.focus();
}
// --- galerijas apskates funkcija no admin(jauns logs, viena bilde)
function view_img_adm(url,dir){
var url;
var dir;
nw=window.open('../php/show_img.php?src='+url+'&dir='+dir,"img","width=590,height=500");
nw.focus();
}

// --- linka apstiprinaajuma funkcija
function confirm_link(link) {
	msg = "Are you shore whant to continue?";
	c_link = window.confirm(msg);
	if (c_link) {document.location = link;}
}

// --- formas apstiprinaajuma funkcija
function confirm_form(){
       msg = "Are you shore whant to continue?";
       return confirm(msg);
}

// --- lapas elementa paraadiishana vai nosleepshana
function chb(id) {
	if (document.getElementById(id).style.display=='none') {
		document.getElementById(id).style.display='inline';
	} else {
		if (document.getElementById(id).style.display=='inline') {
			document.getElementById(id).style.display='none';
		}
	}
}

// --- progresa bildes paraadiishana
function progr_go(){
document.getElementById('prog_box').style.display = "inline";
}

// --- bannera aktiv
function void_act(g_arg1,g_arg2){
	$.get("ajax/void_act.php", { rnd:Math.random(),arg1: g_arg1,arg2: g_arg2});
}	
