<!--

var da  = (document.all) ? 1 : 0;
var pr  = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);

var bookmarktitle = document.title;

function addfav(){
   var bookmarkurl = '/default.asp?BMID=' + parent.frames[2].document.all.xDocID.value;
	if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

function Home(){
		parent.window.location.href = 'default.asp';
}

function RecomendPage(){
		window.open("GlobalResources/Scripts/RecomendPage.asp","NewWindow","scrollbars=NO,width=450,height=370")
	}

function BookMarkPage(){
		window.open("GlobalResources/Scripts/BookMarkPage.asp","NewWindow","scrollbars=NO,width=450,height=370")
	}

function SearchSite(){
		parent.window.location.href = 'Default.asp?Action=Search&Sid_NR=1';
}

function SiteMap(){
		parent.window.location.href = 'Default.asp?Action=SiteMap&Sid_NR=1';
}

function printPage(frame, arg) {
  if (frame == window) {
    printThis();
  } else {
    link = arg; // a global variable
    printFrame(frame);
  }
  return false;
}

function printThis() {
  if (pr) { // NS4, IE5
    window.print();
  } else if (da && !mac) { // IE4 (Windows)
    vbPrintPage();
  } else { // other browsers
    alert("<%=langErrorBrowserSupport%>");
  }
}

function printFrame(frame) {
  if (pr && da) { // IE5
    frame.focus();
    window.print();
    link.focus();
  } else if (pr) { // NS4
    frame.print();
  } else if (da && !mac) { // IE4 (Windows)
    frame.focus();
    setTimeout("vbPrintPage(); link.focus();", 100);
  } else { // other browsers
    alert("<%=langErrorBrowserSupport%>");
  }
}

if (da && !pr && !mac) with (document) {
  writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
  writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
  writeln('Sub window_onunload');
  writeln('  On Error Resume Next');
  writeln('  Set WB = nothing');
  writeln('End Sub');
  writeln('Sub vbPrintPage');
  writeln('  OLECMDID_PRINT = 6');
  writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
  writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
  writeln('  On Error Resume Next');
  writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
  writeln('End Sub');
  writeln('<' + '/SCRIPT>');
}

function PrintDoc(){
		var res = window.open('PrintRead.asp','Print');
	}


function ViewImage(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=600,left = 340,top = 212');");
}


	function PrintPage(vID)
	{
		var res = window.open('NewsprintPage.asp?aID=' + vID ,null,"height=320,width=480,status=yes,toolbar=no,scrollbars=1,menubar=no,resizable=1,location=no");
	}

	function RecomendPage(){
		window.open("NewsRecomendPage.asp","NewWindow","scrollbars=NO,width=450,height=370")
	}


var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}



function Skodamynd(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=600,left = 340,top = 212');");
}


	function PrintPage(vID)
	{
		var res = window.open('PrentaFrett.asp?aID=' + vID ,null,"height=380,width=550,status=yes,toolbar=no,scrollbars=1,menubar=no,resizable=1,location=no");
	}
	var win = null;
	function RecomendPage(vID)
	{
		window.open('SendaFrett.asp?aID=' + vID ,null,"height=340,width=540,status=yes,toolbar=no,scrollbars=1,menubar=no,resizable=1,location=no,left = 690,top = 430")
	}


var win = null;
function OpnaGlugga(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}


var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

 function getDate()
{
dt = new Date();   //Gets today's date right now (to the millisecond).
   month = dt.getMonth()+1;
   day = dt.getDate();
   year = dt.getFullYear();
   var d=day + '.'+ month + '.' + year
 document.getElementById("date").value=d;
 if (month < 10) {
           month = "0" + month;
        }

     if (day < 10) {
         day = "0" + day;
         }

   var sorderDate = year+''+month+''+day  ;
   document.getElementById("searchparam1").value=sorderDate;
   //alert(sorderDate);

     }

function openwindow()
{
	window.open("sendapost.asp","mywindow","menubar=1,resizable=1,width=350,height=250");
}
 function createMediaPlayer(containerID, urlToPlay, autostart)
{
    var playerInput = "<object id=\"VefTVPlayer\" name=\"Player\" width=\"260\" height=\"190\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902\" standby=\"Windows Media Player\" type=\"application/x-oleobject\">";
    playerInput = playerInput + "<param name=\"FileName\" value=\"" + urlToPlay + "\" />";
    playerInput = playerInput + "<param name=\"animationatStart\" value=\"false\" />";
    playerInput = playerInput + "<param name=\"AutoSize\" value=\"false\" />";
    playerInput = playerInput + "<param name=\"transparentatStart\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"autoStart\" value=\"";
    if (autostart=='1')
    {
        playerInput = playerInput + "true";
    }
    else
    {
        playerInput = playerInput + "false";
    }
    playerInput = playerInput + "\" />";
    playerInput = playerInput + "<param name=\"showControls\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"showPositionControls\" value=\"false\" />";
    playerInput = playerInput + "<param name=\"showTracker\" value=\"false\" />";
    playerInput = playerInput + "<embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" src=\"" + urlToPlay + "\" name=\"VefTVPlayer\" width=\"260\" height=\"190\" autostart=\"" + autostart + "\" showtracker=\"0\" showpositioncontrols=\"0\" transparentatstart=\"1\" autosize=\"0\" ></embed>";
    playerInput = playerInput + "</object>";

    document.getElementById(containerID).innerHTML = playerInput;
}

function createMediaPlayerComplete(containerID, urlToPlay)
{
    var playerInput = "<object id=\"Player\" name=\"Player\" width=\"335\" height=\"297\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902\" standby=\"Windows Media Player\" type=\"application/x-oleobject\">";
    playerInput = playerInput + "<param name=\"FileName\" value=\"" + urlToPlay + "\" />";
    playerInput = playerInput + "<param name=\"animationatStart\" value=\"false\" />";
    playerInput = playerInput + "<param name=\"AutoSize\" value=\"false\" />";
    playerInput = playerInput + "<param name=\"transparentatStart\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"autoStart\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"showControls\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"showPositionControls\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"showTracker\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"showStatusBar\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"AllowChangeDisplaySize\" value=\"true\" />";
    playerInput = playerInput + "<param name=\"DisplaySize\" value=\"false\" />";
    playerInput = playerInput + "<embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" src=\"" + urlToPlay + "\" name=\"Player\" id=\"Player\" width=\"335\" height=\"335\" autostart=\"1\" showtracker=\"1\" showpositioncontrols=\"1\" showstatusbar=\"1\" transparentatstart=\"1\" autosize=\"0\" allowchangedisplaysize=\"1\" displaysize=\"0\" SendErrorEvents=\"1\"></embed>";
    playerInput = playerInput + "</object>";

    document.getElementById(containerID).innerHTML = playerInput;
}

// -->


// copyright 1999 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but please keep this
// notice with the code.

var rollOverArr=new Array();
function setrollover(OverImgSrc,pageImageName)
{
if (! document.images)return;
if (pageImageName == null)
    pageImageName = document.images[document.images.length-1].name;
rollOverArr[pageImageName]=new Object;
rollOverArr[pageImageName].overImg = new Image;
rollOverArr[pageImageName].overImg.src=OverImgSrc;
}

function rollover(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
if (! rollOverArr[pageImageName].outImg)
    {
    rollOverArr[pageImageName].outImg = new Image;
    rollOverArr[pageImageName].outImg.src = document.images[pageImageName].src;
    }
document.images[pageImageName].src=rollOverArr[pageImageName].overImg.src;
}

function rollout(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
document.images[pageImageName].src=rollOverArr[pageImageName].outImg.src;
}

var zxcObj

function zxcMse(event){
var zxcmseX,zxcmseY;
if (!zxcObj){ return; }
if(!event) var event=window.event;
if (document.all){ zxcmseX=event.clientX+zxcDocS()[0]; zxcmseY=event.clientY+zxcDocS()[1]; }
else {zxcmseX=event.pageX; zxcmseY=event.pageY; }
zxcObj[0].style.left=(zxcmseX+zxcObj[1])+'px';
zxcObj[0].style.top=(zxcmseY+zxcObj[2])+'px';
}

function zxcDocS(){
var zxcsx,zxcsy;
if (!document.body.scrollTop){ zxcsx=document.documentElement.scrollLeft; zxcsy=document.documentElement.scrollTop; }
else { zxcsx=document.body.scrollLeft; zxcsy=document.body.scrollTop; }
return [zxcsx,zxcsy]
}

function zxcEventAdd(zxco,zxct,zxcf) {
if ( zxco.addEventListener ){ zxco.addEventListener(zxct, function(e){ zxco[zxcf](e);}, false); }
else if ( zxco.attachEvent ){ zxco.attachEvent('on'+zxct,function(e){ zxco[zxcf](e); }); }
else {
var zxcPrev=zxco["on" + zxct];
if (zxcPrev){ zxco['on'+zxct]=function(e){ zxcPrev(e); zxco[zxcf](e); }; }
else { zxco['on'+zxct]=zxco[zxcf]; }
}
}

function zxcAddEvent(zxc,zxcfun,zxcevt){
if (zxc.addEvent){ return; }
zxc.addEvent=window[zxcfun];
zxcEventAdd(zxc,zxcevt,'addEvent');
}

var zxcEvt=0;

function zxcAddEvt(zxco,zxcfun,zxcevt){
if (zxco['zxc'+zxcfun+zxcevt]){ return; }
zxco['zxcaddEvt'+zxcEvt]=window[zxcfun];
zxco['zxc'+zxcfun+zxcevt]=true;
zxcEventAdd(zxco,zxcevt,'zxcaddEvt'+zxcEvt);
zxcEvt++;
}

zxcAddEvt(document,'zxcMse','mousemove')

function zxcMseOut(){
zxcObj[0].style.visibility='hidden';
}

function zxcPopUp(zxcobj,zxcimg,zxcxos,zxcyos){
var zxcpuobj=document.getElementById('zxcContainer')
zxcObj=[zxcpuobj,20,20];
var zxcimgobj=document.createElement('IMG');
zxcpuobj.innerHTML='';
zxcimgobj.src=zxcimg;
zxcpuobj.appendChild(zxcimgobj);
zxcObj[0].style.visibility='visible';
zxcAddEvt(zxcobj,'zxcMseOut','mouseout')


}
<!--
function emailvalidation(field, alertbox) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.is)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
apos=field.value.indexOf("@");
dotpos=field.value.lastIndexOf(".");
lastpos=field.value.length-1;
var badEmail = (apos<1 || dotpos-apos<2 || lastpos-dotpos<2)
if (goodEmail && !badEmail) {
return true;
}
else {
alert(alertbox);
field.focus();
field.select();
return false;
   }
}
function emptyvalidation(entered, alertbox)
{
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}
function formvalidation(thisform)
{
with (thisform)
{

if (emptyvalidation(name,"Vinsamlegast skrįšu inn nafn")==false) {name.focus(); return false;};

if (emailvalidation(email,"Vinsamlegast skrįšu inn gilt netfang žitt")==false) {email.focus(); return false;};

}

}

var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["/images/hausmynd.jpg", "", ""] //plain image syntax
fadeimages[1]=["/images/hausmynd1.jpg", "", ""] //image with link syntax
fadeimages[2]=["/images/hausmynd2.jpg", "", ""] //image with link and target syntax
fadeimages[3]=["/images/hausmynd3.jpg", "", ""]
fadeimages[4]=["/images/hausmynd4.jpg", "", ""]
fadeimages[5]=["/images/hausmynd5.jpg", "", ""]
//fadeimages[6]=["/images/haus7.jpg", "", ""]
//fadeimages[7]=["/images/haus8.jpg", "", ""]
//fadeimages[8]=["/images/haus9.jpg", "", ""]
//fadeimages[9]=["/images/haus10.jpg", "", ""]

var fadebgcolor="white"

////NO need to edit beyond here/////////////

var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers

var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2

if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')

if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}

fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}


fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}


fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

//-->