// JavaScript Document
function submit_query(formName, actionName, actionValue) {
	var form_obj = eval("document."+formName);
	eval("window.document."+formName+"."+actionName).value = actionValue;
	return true;
}
function submit_query_prompt(formName, actionName, actionValue, msg) {
	if ((msg != "") && (!window.confirm(msg))) {
		return false;
	}
	return submit_query(formName, actionName, actionValue);
}
function clearInput(formName, inputName) {
	eval("document."+formName+"."+inputName).value = '';
}
function view_image(path, width, height, id) {
	//window.confirm(path);
	//window.location = "admin/popup/view_image.php?"+path;
	pop = popup("units/catalog/view_image.php?file="+path+"&id="+id, "popup", width, height, false, false, 50, 150);
}
function popupbyname(url){
	xPos = window.screenLeft+10;
	yPos = window.screenTop+20;
	win = window.open(siteURL + '/objects/editor/viewpopup.php?url='+url, 'filepopup', "width=400,height=230,left="+xPos+",top="+yPos+",scrollbars=no,resizable=no,toolbars=no");
}
function toggleDiv(id){
	obj = document.getElementById(id);
	tmp = obj.style.display;
	if (tmp == 'none') obj.style.display='block';
	else obj.style.display='none';
}
function show_basket() {
	param = "top=150,left=150,width=630,height=500,scrollbars,resizable";
	popupwindow = window.open(siteURL+"/basket", "BasketWindow", param);
}
