function openWindow(url, name, x, y) {
    window.open(url, name, 'scrollbars=no, resizable=no,' +
		' directories=no, toolbar=no, location=no, status=yes,' +
		' menubar=no, width=' + x + ',height=' + y);
}

function openWindowResize(url, name, x, y) {
    window.open(url, name, 'scrollbars=yes, resizable=yes,' +
		' directories=no, toolbar=no, location=no, status=yes,' +
		' menubar=no, width=' + x + ',height=' + y);
}

function Resize()
	{
		adjWidth = document.images[0].width;
		adjHeight = document.images[0].height;
		window.resizeTo(adjWidth, adjHeight);
		window.focus();
	}

function ResizeWmenu()
	{
		adjWidth = document.images[0].width;
		adjHeight = document.images[0].height + 110;
		window.resizeTo(adjWidth, adjHeight);
		window.focus();
	}

function ResizeFslide()
	{
		adjWidth = document.images[0].width;
		adjHeight = document.images[0].height + 120;
		window.resizeTo(adjWidth, adjHeight);
		window.focus();
	}

function setFocusField(setTo, formName)
	{
		var sForm = document[formName];
		if (document.layers) {
			if (document.layers[0].document.forms['login']){
				if (document.layers[0].document.forms['login'].A1){
					document.layers[0].document.forms['login'].A1.focus()
				}
			}
		}
		else if (document.all || document.getElementById ){
			if (sForm){
				if (sForm[setTo]){
					sForm[setTo].focus();
				}
			}
		}
		return true;
	}

function checkDelete(name, strref)
	{
		if(confirm('Vill du verkligen ta bort ' + name + '?'))
			{
				location.href=strref;
			}
	}
						
function checkInput(strref, id)
	{
		name=prompt('Ändra till ? ', ' Kategori')
		location.href=strref + name + '&ID=' + id;
	}

/*function macrobutton(sThings, sName)
	{
  		document.form. + sName + .value = document.form. + sName + .value + sThings;
  		document.form. + sName + .focus();
	}*/
	