function Init(){

document.getElementById("Contacts").url.value = StikMig('url',false);
var sendOK = StikMig('formsubmit',false);

if(sendOK=="ok"){
document.getElementById("mailOK").style.display="";
}
else{
document.getElementById("sendmail").style.display="";
if(document.getElementById("Contacts").Email.focus) document.getElementById("Contacts").Email.focus();
}}

function StikMig(parm,local){
var url;
if(local) url=location.href;
else url = parent.location.href;
var hasparm = url.indexOf(parm);
if(hasparm == -1) return '';
else{
 var start = url.indexOf(parm) + parm.length + 1;
 var slut = url.substring(start).indexOf('&');
 if(slut==-1) slut = url.length;
 return unescape(url.substring(start,slut+start));
 }
}

function move(){
top.globalFormID = "sendThisPageForm";
top.sprog = "NO";

if(checkEmpty('Email','Mottakers e-post','NO')){return true}; 
if(checkEmail('Email','NO')){return true};
if(document.getElementById("Contacts").url.value==""){ alert('Funksjonen kan ikke benyttes på denne siden.');return true; }

document.getElementById("Contacts").kvitURL.value = location.protocol+"//"+location.host+"/Documents/SendThisPage/SendThisPageNO.htm?formsubmit=ok";
document.getElementById("Contacts").submit();

}

function closeWin(){window.close();}

window.onload = Init;
