	// View image
	function viewImg(id,name,w,h,scrollbars,resizable){
		str="height="+h+",width="+w+",scrollbars="+scrollbars+",resizable="+resizable;
		if(parseInt(navigator.appVersion)>3) {
			str+=",left="+(screen.width -w)/2+",top="+parseInt((screen.height -h)/3);
		}
		win = window.open(id,name,str);
	}

		//Resize element height from window size.
	function resizeElementHeight(id) {
		var element=document.getElementById(id);
		
		if(element != null) {
			var height = document.body.offsetHeight;
			element.style.height=height-180;
			//element.style.height=height-172;
		}
	}

	function insertAdress(id, name) {
		var server = 'laursenbiler.dk';
		var element=document.getElementById(id);
		if(element != null) {
			element.innerHTML = name + '@' + server;
		}
	}

	function insertContact(id, name) {
		var server = 'laursenbiler.dk';
		var element=document.getElementById(id);
		if(element != null) {
			var part1 = name + '@' + server;
			element.innerHTML = '<a href=mailto:' + part1 + '?Subject=Fra%20laursenbiler.dk:%20&body=Indtast%20deres%20navn%20og%20email%20adresse%20og%20mailen%20vil%20automatisk%20blive%20sendt%20til%20Laursenbiler.%20De%20h&oslash;re%20fra%20os%20hurtigst%20mulig. class="menuLink">Send en mail til os</a>';
		}
	}
	
	function textareaConfigSimple(propertyname, newHeight) {
		var config = new Object();    // create new config object
		
		config.width = "100%";
		config.height = newHeight;
		config.bodyStyle = 'background-color: white; font-family: "Verdana"; font-size: x-small;';
		config.debug = 0;
		
		config.toolbar = [
			['bold','italic','underline','separator'],
			['justifyleft','justifycenter','justifyright','separator'],
			['OrderedList','UnOrderedList','Outdent','Indent'],
		];
		
		config.fontstyles = [   // make sure classNames are defined in the page the content is being display as well in or they won't work!
		  { name: "Overskrift",   className: "headline",  classStyle: "font-family: Verdana; font-size: 12px; color:#000000; text-decoration:none; font-weight: bold;" },
		  { name: "Indhold",      className: "headline5",  classStyle: "background-color: #FFFFFF; font-family: Verdana; font-size: 10px; color:#000000; text-decoration:none;" }
		];
		
		editor_generate(propertyname,config);
	}	
