function viewGal(gallery){
	window.open("viewpic.php?gallery="+gallery,'helpwin', 'width=680,height=680,location=0,menubar=0,resizable=0,scrollbars=1,status=1,titlebar=1,toolbar=0,screenX=100,left=100,screenY=30,top=60');
}

function delObj(id){
		if(confirm("Really delete this object?")){
		document.getElementById("objb").src="includes/handler.php?action=del&id="+id;
	}
}

function editObj(id){
	document.getElementById("objb").src="includes/edit_obj.php?id="+id;
}


function checkEnter(e, goto){
	if((e.keyCode == 13) || (e.which == 13)){
		eval(goto);
	}
}


function doSearch(){
	var q = document.getElementById("search").value;
	window.location = "handler.php?q="+q;
}

function viewpic(path){
	window.open("viewpic.php?f=" + path,'viewpic', 'width=680,height=680,location=0,menubar=0,resizable=0,scrollbars=1,status=1,titlebar=1,toolbar=0,screenX=100,left=100,screenY=30,top=60');
}

function checkOK(msg, direct){
	if(confirm(msg)){
		window.location = direct;
	}
}
