_editor_url = "/htmlarea/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }



function window_popup(url,name,win_height,win_width) {
	pos_horizon = ((screen.width/2)-(win_width/2));
	pos_vertical = ((screen.height/2)-(win_height/2));
	window.open(url,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+win_width+',height='+win_height+',top='+pos_vertical+',left='+pos_horizon);
}

function opdate_stamdata(frm) {
	id = document.kunder.id[document.kunder.id.selectedIndex].value;
	// alert(id);
}

function doubleclick(frm,sted) {
	kunde_id = frm.id[frm.id.selectedIndex].value;
	location=sted+'.asp?action=vis_kunde&id='+kunde_id;
}

function salg(frm,sted) {
	kunde_id = frm.id[frm.id.selectedIndex].value;
	location=sted+'.asp?action=salg&id='+kunde_id;
}

function visskjuldiv(id,height) {
	if(document.getElementById(id).style.visibility == '') {
		document.getElementById(id).style.visibility='hidden';
		document.getElementById(id).style.height='1px';
	}	
	if(document.getElementById(id).style.visibility == 'hidden') {
		document.getElementById(id).style.visibility='visible';
		document.getElementById(id).style.height=height;
	} else {
		document.getElementById(id).style.visibility='hidden';
		document.getElementById(id).style.height='1px';
	}	
}
