<!--
 	 
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 go()
{
	box = document.forms[0].navi;
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination;
}
 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");
}

// -->