sfHover = function() {
	var sfEls = document.getElementById("navbar").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function addtext() {
	var newtext = document.ktform.inputtext.value;
        newtext2=newtext.replace(/aa/g, '\u00E5');
        newtext3=newtext2.replace(/ae/g, '\u00E4');
        newtext4=newtext3.replace(/ooo(?=)/g, 'o\u00F6');
        newtext5=newtext4.replace(/oo(?!o)/g, '\u00F6');
        newtext6=newtext5.replace(/Aa/g, '\u00C5');
        newtext7=newtext6.replace(/AA/g, '\u00C5');
        newtext8=newtext7.replace(/Ae/g, '\u00C4');
        newtext9=newtext8.replace(/AE/g, '\u00C4');
        newtext10=newtext9.replace(/OOo(?=)/g, 'O\u00D6');
        newtext11=newtext10.replace(/OO(?!O)/g, '\u00D6');   
        newtext12=newtext11.replace(/Oo/g, '\u00D6');     
	document.ktform.outputtext.value = newtext12;
}

function addtext2() {
	var newtext = document.ktform.inputtext.value;
        newtext2=newtext.replace(/aa/g, '\u00E5');
        newtext3=newtext2.replace(/ae/g, '\u00E6');
        newtext4=newtext3.replace(/oo/g, '\u00F8');
        newtext5=newtext4.replace(/Aa/g, '\u00C5');
        newtext6=newtext5.replace(/AA/g, '\u00C5');
        newtext7=newtext6.replace(/Ae/g, '\u00C6');
        newtext8=newtext7.replace(/AE/g, '\u00C6');
        newtext9=newtext8.replace(/Oo/g, '\u00D8');
        newtext10=newtext9.replace(/OO/g, '\u00D8');
	document.ktform.outputtext.value = newtext10;
}

function get_focus() {      
        document.getElementById("inputtext").focus();
    } 
    
function setCursor(fieldID, insertValue)
{
  var fieldObj = document.getElementById(fieldID);

  if (document.selection)
  { //IE support
    fieldObj.focus();
    document.selection.createRange().text = insertValue;
  }
  else if (fieldObj.selectionStart || fieldObj.selectionStart=='0')
  { //MOZILLA/NETSCAPE support
    endPos = fieldObj.selectionStart+1;
    fieldObj.value = fieldObj.value.substring(0, fieldObj.selectionStart) + insertValue
                   + fieldObj.value.substring(fieldObj.selectionEnd, fieldObj.value.length);
    fieldObj.selectionStart = endPos
    fieldObj.selectionEnd = endPos
    fieldObj.focus();
  }
  else
  {
    fieldObj.value += insertValue;
  }
}
 
    
function clearText(field) {

    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;

}

function hptext() {
  var aWin 
      aWin = window.open("help_nor.html","_blank1","width=424,height=660,status=1,toolbar=no,resizable=no,scrollbars=no");
}

if (document.images) {
 img_on =new Image();  img_on.src ="images/aa_down.gif"; 
 img_off=new Image();  img_off.src="images/aa.gif"; 
}

function keyPress() { 
 if (document.images) document.key.src=img_on.src;
}

function keyRelease() {
 if (document.images) document.key.src=img_off.src;
}



if (document.images) {
 img_on2 =new Image();  img_on2.src ="images/aa_s_down.gif"; 
 img_off2=new Image();  img_off2.src="images/aa_s.gif"; 
}

function keyPress2() { 
 if (document.images) document.key2.src=img_on2.src;
}

function keyRelease2() {
 if (document.images) document.key2.src=img_off2.src;
}



if (document.images) {
 img_on3 =new Image();  img_on3.src ="images/ae_sv_down.gif"; 
 img_off3=new Image();  img_off3.src="images/ae_sv.gif"; 
}

function keyPress3() { 
 if (document.images) document.key3.src=img_on3.src;
}

function keyRelease3() {
 if (document.images) document.key3.src=img_off3.src;
}


if (document.images) {
 img_on4 =new Image();  img_on4.src ="images/ae_sv_s_down.gif"; 
 img_off4=new Image();  img_off4.src="images/ae_sv_s.gif"; 
}

function keyPress4() { 
 if (document.images) document.key4.src=img_on4.src;
}

function keyRelease4() {
 if (document.images) document.key4.src=img_off4.src;
}



if (document.images) {
 img_on5 =new Image();  img_on5.src ="images/oo_sv_down.gif"; 
 img_off5=new Image();  img_off5.src="images/oo_sv.gif"; 
}

function keyPress5() { 
 if (document.images) document.key5.src=img_on5.src;
}

function keyRelease5() {
 if (document.images) document.key5.src=img_off5.src;
}



if (document.images) {
 img_on6 =new Image();  img_on6.src ="images/oo_sv_s_down.gif"; 
 img_off6=new Image();  img_off6.src="images/oo_sv_s.gif"; 
}

function keyPress6() { 
 if (document.images) document.key6.src=img_on6.src;
}

function keyRelease6() {
 if (document.images) document.key6.src=img_off6.src;
}



if (document.images) {
 img_on7 =new Image();  img_on7.src ="images/aa_down.gif"; 
 img_off7=new Image();  img_off7.src="images/aa.gif"; 
}

function keyPress7() { 
 if (document.images) document.key7.src=img_on7.src;
}

function keyRelease7() {
 if (document.images) document.key7.src=img_off7.src;
}



if (document.images) {
 img_on8 =new Image();  img_on8.src ="images/aa_s_down.gif"; 
 img_off8=new Image();  img_off8.src="images/aa_s.gif"; 
}

function keyPress8() { 
 if (document.images) document.key8.src=img_on8.src;
}

function keyRelease8() {
 if (document.images) document.key8.src=img_off8.src;
}



if (document.images) {
 img_on9 =new Image();  img_on9.src ="images/ae_down.gif"; 
 img_off9=new Image();  img_off9.src="images/ae.gif"; 
}

function keyPress9() { 
 if (document.images) document.key9.src=img_on9.src;
}

function keyRelease9() {
 if (document.images) document.key9.src=img_off9.src;
}



if (document.images) {
 img_on10 =new Image();  img_on10.src ="images/ae_s_down.gif"; 
 img_off10=new Image();  img_off10.src="images/ae_s.gif"; 
}

function keyPress10() { 
 if (document.images) document.key10.src=img_on10.src;
}

function keyRelease10() {
 if (document.images) document.key10.src=img_off10.src;
}



if (document.images) {
 img_on11 =new Image();  img_on11.src ="images/oo_down.gif"; 
 img_off11=new Image();  img_off11.src="images/oo.gif"; 
}

function keyPress11() { 
 if (document.images) document.key11.src=img_on11.src;
}

function keyRelease11() {
 if (document.images) document.key11.src=img_off11.src;
}



if (document.images) {
 img_on12 =new Image();  img_on12.src ="images/oo_s_down.gif"; 
 img_off12=new Image();  img_off12.src="images/oo_s.gif"; 
}

function keyPress12() { 
 if (document.images) document.key12.src=img_on12.src;
}

function keyRelease12() {
 if (document.images) document.key12.src=img_off12.src;
}
