<!--
function funcUrl(xmlPath){
	alert(xmlPath);
}

function openFullScreen( theurl, winTitle ) {
	w=800
	h=600
	if ( window.screen ) {
		w = window.screen.availWidth;
		h = window.screen.availHeight;
	}
	window.open( theurl, winTitle, 'width='+w+',height='+h+',top=0,left=0');
}

function printproduct( id ){
	openwinSpec( "printcontent.asp?id=" + id + "", 550, 550, "yes", "yes" );
}

function openwin(theurl, vHeight, vWidth){
	refwindow = window.open(theurl,'Window','resizable=yes,scrollbars=1,height='+ vHeight +',width='+ vWidth);
	refwindow.focus();
}

function openwinSpec(theurl, vHeight, vWidth, scroll, resize){
	refwindow = window.open(theurl,'Window','resizable='+ resize +',scrollbars='+ scroll +',height='+ vHeight +',width='+ vWidth);
	refwindow.focus();
}

function confirmRedir(txt, url){
	if (confirm(txt)){
		document.location.href = url;
	}
}

function isEmail(string) {
	if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
		return true;
	else
		return false;
}


function validateContact(){
	var formok = true;
	if( !document.contact.firstname.value ){
		document.contact.firstname.focus();
		alert( 'Please type in Your firstname.');
		return false;
	}
	if( !document.contact.surname.value ){
		document.contact.surname.focus();
		alert( 'Please type in Your surname.');
		return false;
	}
	//if( !document.contact.city.value ){
	//	document.contact.city.focus();
	//	alert( 'Please type in the name of Your city.');
	//	return false;
	//}
	//if( !document.contact.zip.value ){
	//	document.contact.zip.focus();
	//	alert( 'Please type in Your zip code.');
	//	return false;
	//}
	//if( !document.contact.country.value ){
	//	document.contact.country.focus();
	//	alert( 'Please type in the name of Your country.');
	//	return false;
	//}
	if( !document.contact.phone.value ){
		document.contact.phone.focus();
		alert( 'Please type in Your phone number.');
		return false;
	}
	if ( !document.contact.email.value ){
		document.contact.email.focus();
		alert( 'Please type in Your e-mail address.');
		return false;
	}else{
		if(!isEmail( document.contact.email.value )){
			alert( 'Please type in a valid e-mail address.');
			return false;
		}
	}
	if( !document.contact.issue.value ){
		document.contact.issue.focus();
		alert( 'Please type in Your question / request.');
		return false;
	}

	if( !document.contact.contactCountry.value ){
		document.contact.contactCountry.focus();
		alert( 'Please select a country to address Your question / request.');
		return false;
	}

	return true;
}


function validateAdmin() {
	message='';
	if (!document.admin.firstname.value){
		message += 'Indtast et fornavn.\n';
	}

	if (!document.admin.lastname.value){
		message += 'Indtast et efternavn.\n';
	}

	if (!document.admin.login.value){
		message += 'Indtast et login.\n';
	}

	if (!document.admin.password1.value){
		message += 'Indtast et password.\n';
	}

	if (!document.admin.password2.value){
		message += 'Bekræft venligst passwordet.\n';
	}

	if ( document.admin.password1.value != document.admin.password2.value ){
		message += 'Password 1 og password 2 er ikke identiske.\n';
	}

	if(message==''){
		document.admin.submit();
	}else{
		alert(message);
	}
}

function validatePage() {
	message='';
	if (!document.update.title.value){
		message += 'Indtast en titel.\n';
	}
	if(message==''){
		document.update.submit();
	}else{
		alert(message);
	}
}



function validateHTML() {
	message='';
	if (!document.element.title.value){
		message += 'Please remember to type in a title.\n';
	}

	if (!document.element.layoutID.value){
		message += 'Please remember to select a layout.\n';
	}else{

		//alert('Layout: ' + document.element.layoutID.value);
		//alert('Content: ' + document.element.content.value);
		//alert('Picture: ' + document.element.picNameHidden.value);

		// ONLY TEXT //
		if(document.element.layoutID.value=='1' && !document.element.content.value ){
			message += 'Please remember to type in some content.\n';
		}
		// ONLY PICTURE //
		if(document.element.layoutID.value=='2' && (!document.element.picName.value && !document.element.picNameHidden.value)){
			message += 'Please remember to select a picture.\n';
		}
		// TEXT AND PICTURE //
		if(document.element.layoutID.value=='3' && (!document.element.content.value || !document.element.picNameHidden.value)){
			message += 'Please remember to type in some content and select a picture.\n';
		}
		if(document.element.layoutID.value=='4' && (!document.element.content.value || !document.element.picNameHidden.value)){
			message += 'Please remember to type in some content and select a picture.\n';
		}
		if(document.element.layoutID.value=='5' && (!document.element.content.value || !document.element.picNameHidden.value)){
			message += 'Please remember to type in some content and select a picture.\n';
		}
		if(document.element.layoutID.value=='6' && (!document.element.content.value || !document.element.picNameHidden.value)){
			message += 'Please remember to type in some content and select a picture.\n';
		}
		if(document.element.layoutID.value=='7' && (!document.element.content.value || !document.element.picNameHidden.value)){
			message += 'Please remember to type in some content and select a picture.\n';
		}
		if(document.element.layoutID.value=='8' && (!document.element.content.value || !document.element.picNameHidden.value)){
			message += 'Please remember to type in some content and select a picture.\n';
		}
		if(document.element.layoutID.value=='9' && (!document.element.content.value || !document.element.picNameHidden.value)){
			message += 'Please remember to type in some content and select a picture.\n';
		}
	}

	if(message==''){
		document.element.submit();
	}else{
		alert(message);
	}
}

function jump() {
	url = document.selLanguage.actLanguage.value;
	if(url != "0") {
		window.location.href=url
	}
	return true;
}

function insertChar() {
	if(document.element.specChars.value!='0'){
		// TRANSFER VALUE
		document.element.spectag.value = document.element.specChars.value;

		// HANDLE AND COPY TEXT TO CLIPBOARD
		var tempval = document.element.spectag;
		therange = tempval.createTextRange()
		therange.execCommand("Copy")

		pasteChar()
	}
}

function subScript() {
	// COPY SELECTED TEXT TO CLIPBOARD
	copyChar()

	//HANDLE TEXT
	copiedText = window.clipboardData.getData("Text");
	document.element.spectag.value = '<sub>' + copiedText + '</sub>';

	if (document.element.spectag.value) {
		// HANDLE AND PASTE TEXT TO CLIPBOARD
		var tempval = document.element.spectag;
		therange = tempval.createTextRange();
		therange.execCommand("Copy")
		pasteChar()
	}
}

function superScript() {
	// COPY SELECTED TEXT TO CLIPBOARD
	copyChar()

	//HANDLE TEXT
	copiedText = window.clipboardData.getData("Text");
	document.element.spectag.value = '<sup>' + copiedText + '</sup>';

	if (document.element.spectag.value) {
		// HANDLE AND PASTE TEXT TO CLIPBOARD
		var tempval = document.element.spectag;
		therange = tempval.createTextRange();
		therange.execCommand("Copy")
		pasteChar()
	}
}

function internalLinks(linkspecs) {
	// COPY SELECTED TEXT TO CLIPBOARD
	copyChar()

	//HANDLE TEXT
	copiedText = window.clipboardData.getData("Text");
	document.element.spectag.value = '<a href=\"' + linkspecs + '\">' + copiedText + '</a>';

	if (document.element.spectag.value) {
		// HANDLE AND PASTE TEXT TO CLIPBOARD
		var tempval = document.element.spectag;
		therange = tempval.createTextRange();
		therange.execCommand("Copy")
		pasteChar()
	}
}

function removeFormat() {
//	element.editor.ExecCommand(DECMD_REMOVEFORMAT,0);
//	element.editor.focus();

	// COPY SELECTED TEXT TO CLIPBOARD
	element.editor.ExecCommand(DECMD_SELECTALL,0);
	copyChar()

	copiedText = '';
	document.element.formatRemoval.value = '';

	//HANDLE TEXT
	copiedText = window.clipboardData.getData("Text");
	document.element.formatRemoval.value = copiedText;

	if (document.element.formatRemoval.value) {
		// HANDLE AND PASTE TEXT TO CLIPBOARD
		var tempval = document.element.formatRemoval;
		therange = tempval.createTextRange();
		therange.execCommand("Copy")
		pasteChar()
	}
	element.editor.focus();
}

function bold() {
	element.editor.ExecCommand(DECMD_BOLD,0);
	element.editor.focus();
}

function italic() {
	element.editor.ExecCommand(DECMD_ITALIC,0);
	element.editor.focus();
}

function underline() {
	element.editor.ExecCommand(DECMD_UNDERLINE,0);
	element.editor.focus();
}

function oList() {
	element.editor.ExecCommand(DECMD_ORDERLIST,0);
	element.editor.focus();
}

function uList() {
	element.editor.ExecCommand(DECMD_UNORDERLIST,0);
	element.editor.focus();
}

function indentPlus() {
	element.editor.ExecCommand(DECMD_INDENT,0);
	element.editor.focus();
}

function indentMinus() {
	element.editor.ExecCommand(DECMD_OUTDENT,0);
	element.editor.focus();
}

function hyperlink() {
	element.editor.ExecCommand(DECMD_HYPERLINK,0);
	element.editor.focus();
}

function copyChar() {
	element.editor.ExecCommand(DECMD_COPY,0);
	element.editor.focus();
}

function pasteChar() {
	element.editor.ExecCommand(DECMD_PASTE,0);
	element.editor.focus();
}



/* ********************** */
/* ***** TOC EDITOR ***** */

function tocinsertChar() {
	if(document.toceditor.tocspecChars.value!='0'){
		alert('1');
		// TRANSFER VALUE
		document.toceditor.tocspectag.value = document.toceditor.tocspecChars.value;

		// HANDLE AND COPY TEXT TO CLIPBOARD
		var tempval = document.toceditor.tocspectag;
		therange = tempval.createTextRange()
		therange.execCommand("Copy")

		tocpasteChar()
	}
}

function tocsubScript() {
	// COPY SELECTED TEXT TO CLIPBOARD
	toccopyChar()

	//HANDLE TEXT
	copiedText = window.clipboardData.getData("Text");
	document.toceditor.tocspectag.value = '<sub>' + copiedText + '</sub>';

	if (document.toceditor.tocspectag.value) {
		// HANDLE AND PASTE TEXT TO CLIPBOARD
		var tempval = document.toceditor.tocspectag;
		therange = tempval.createTextRange();
		therange.execCommand("Copy")
		tocpasteChar()
	}
}

function tocsuperScript() {
	// COPY SELECTED TEXT TO CLIPBOARD
	toccopyChar()

	//HANDLE TEXT
	copiedText = window.clipboardData.getData("Text");
	document.toceditor.tocspectag.value = '<sup>' + copiedText + '</sup>';

	if (document.toceditor.tocspectag.value) {
		// HANDLE AND PASTE TEXT TO CLIPBOARD
		var tempval = document.toceditor.tocspectag;
		therange = tempval.createTextRange();
		therange.execCommand("Copy")
		tocpasteChar()
	}
}

function tocinternalLinks(linkspecs) {
	// COPY SELECTED TEXT TO CLIPBOARD
	copyChar()

	//HANDLE TEXT
	copiedText = window.clipboardData.getData("Text");
	document.toceditor.tocspectag.value = '<a href=\"' + linkspecs + '\">' + copiedText + '</a>';

	if (document.toceditor.tocspectag.value) {
		// HANDLE AND PASTE TEXT TO CLIPBOARD
		var tempval = document.element.tocspectag;
		therange = tempval.createTextRange();
		therange.execCommand("Copy")
		tocpasteChar()
	}
}

function tocremoveFormat() {
	toceditor.toc.ExecCommand(DECMD_REMOVEFORMAT,0);
	toceditor.toc.focus();
}

function tocbold() {
	toceditor.toc.ExecCommand(DECMD_BOLD,0);
	toceditor.toc.focus();
}

function tocitalic() {
	toceditor.toc.ExecCommand(DECMD_ITALIC,0);
	toceditor.toc.focus();
}

function tocunderline() {
	toceditor.toc.ExecCommand(DECMD_UNDERLINE,0);
	toceditor.toc.focus();
}

function tocoList() {
	toceditor.toc.ExecCommand(DECMD_ORDERLIST,0);
	toceditor.toc.focus();
}

function tocuList() {
	toceditor.toc.ExecCommand(DECMD_UNORDERLIST,0);
	toceditor.toc.focus();
}

function tocindentPlus() {
	toceditor.toc.ExecCommand(DECMD_INDENT,0);
	toceditor.toc.focus();
}

function tocindentMinus() {
	toceditor.toc.ExecCommand(DECMD_OUTDENT,0);
	toceditor.toc.focus();
}

function tochyperlink() {
	toceditor.toc.ExecCommand(DECMD_HYPERLINK,0);
	toceditor.toc.focus();
}

function toccopyChar() {
	toceditor.toc.ExecCommand(DECMD_COPY,0);
	toceditor.toc.focus();
}

function tocpasteChar() {
	toceditor.toc.ExecCommand(DECMD_PASTE,0);
	toceditor.toc.focus();
}
/* ***** TOC EDITOR ***** */
/* ********************** */

//-->