﻿try
{
$(document).ready(function()
{
	$('span.formaterdato').formaterDato();
});

$.fn.formaterDato = function() 
{
	return this.each(function() 
						{
							var dato = new Date($(this).text())
							$(this).empty().append(String("0"+dato.getDate()).slice(-2)+"-"+String("0"+(dato.getMonth()+1)).slice(-2)+"-"+String(dato.getFullYear()).slice(-2));
						});
};
}
catch(err)
{}
	
function ShiftPage()
{
var url = document.SearchForm1.selectname.options[document.SearchForm1.selectname.selectedIndex].value;
window.location.href = url;
}

function place_payoff()
{
document.all.payoff.style.top = document.body.clientHeight-170;
return true;
}

function frame_resizer() 
{
var iframeID = document.getElementById('fm_s');
var iframeAdjust = window.frames[0].document.body.innerHTML;
iframeID.innerHTML = iframeAdjust;
} 

function WriteDownload(name,text,asp,releasenote,filepath,filename,filesize,comment,updated)
{
var sReleaseNote = "";
if (releasenote!="")
        sReleaseNote = "" +
              "<br>For more information please refer to the <a href='http://service.dantecdynamics.com/_dwl_/_all_/release_notes/" + 
              releasenote + "' title='" + releasenote + "' target=_blank>release notes.</a><br>";

var sHTML = "" +
	"<table border=0 width=100% cellspacing=0 cellpadding=4>" +
	"<tr><td width=10%></td>" +
	"<td width=90%><b>" + name + "</b><br>" +
        "<img src='Files/Billeder/aaa_headline_seperator.gif' border=0 alt='' width=430 height=21 class='paragraphimage' /><br />" +
	text +
        sReleaseNote +
	"</td></tr><tr>" +
	"<td width=10% valign='top'><img src='files/billeder/salessupport/product specific information/dwl/dwl.png' width=32 height=32 /></td>"+
	"<td width=90% valign='center' bgColor=#EFF1F3>" +
        "<a href='http://service.dantecdynamics.com/" + asp + ".asp?file=" + filepath + "&name=" + filename + "' title='Download " + filename + "' target='_self'>" +
	filename + " (" + filesize + ")</a>" +
	"</td>" +
	"</tr><tr>" +
	"<td width=10%></td>" +
	"<td width=90%>" +
	"<font color=#808080 size=1>" +
	"Updated: " + updated +
	"<br>" + comment +
	"</font></td>" +
	"</tr></table>";

	document.write(sHTML);
}


function WriteDownloadAdd(asp,filepath,filename,filesize,comment,updated)
{
var sHTML = "" +
	"<table border=0 width=100% cellspacing=0 cellpadding=4>" +
	"<tr><td width=10%></td>" +
	"<td width=90%></td></tr><tr>" +
	"<td width=10% valign='top'><img src='files/billeder/salessupport/product specific information/dwl/dwl.png' width=32 height=32 /></td>"+
	"<td width=90% valign='center' bgColor=#EFF1F3>" +
        "<a href='http://service.dantecdynamics.com/" + asp + ".asp?file=" + filepath + "&name=" + filename + "' title='Download " + filename + "' target='_self'>" +
	filename + " (" + filesize + ")</a>" +
	"</td>" +
	"</tr><tr>" +
	"<td width=10%></td>" +
	"<td width=90%>" +
	"<font color=#808080 size=1>" +
	"Updated: " + updated +
	"<br>" + comment +
	"</font></td>" +
	"</tr></table>";
		
	document.write(sHTML);
}


function WriteDownloadOld(asp,releasedate,releaseversion,releasenote,filepath,filename,filesize)
{
var sReleaseNote = releaseversion;
if (releasenote!="")
        sReleaseNote = "" +
              "<a href='http://service.dantecdynamics.com/_dwl_/_all_/release_notes/" + 
              releasenote + "' title='" + releasenote + "' target=_blank>" + releaseversion + "</a>";

var sHTML = "" +
	"<table border=0 width=100% cellspacing=0 cellpadding=4>" +
	"<tr>" +
	"<td width=10% valign='top'><img src='files/billeder/salessupport/product specific information/dwl/dwl.png' width=32 height=32 /></td>"+
	"<td width=12% bgColor=#EFF1F3>" + releasedate + "</td>" +
                "<td width=14% bgColor=#EFF1F3>" + sReleaseNote + "</td>" +
	"<td width=64% valign='center' bgColor=#EFF1F3>" +
        "<a href='http://service.dantecdynamics.com/" + asp + ".asp?file=" + filepath + "&name=" + filename + "' title='Download " + filename + "' target='_self'>" +
	filename + " (" + filesize + ")</a>" +
	"</td>" +
	"</tr></table>";

	document.write(sHTML);
}


function WriteLink(name,text,releasenote,link,filename,filesize,comment,updated)
{
var sReleaseNote = "";
if (releasenote!="")
        sReleaseNote = "" +
              "<br>For more information please refer to the <a href='" + releasenote +"' title='Readme' target=_blank>readme file.</a><br>";

var sHTML = "" +
	"<table border=0 width=100% cellspacing=0 cellpadding=4>" +
	"<tr><td width=10%></td>" +
	"<td width=90%><b>" + name + "</b><br>" +
        "<img src='Files/Billeder/aaa_headline_seperator.gif' border=0 alt='' width=430 height=21 class='paragraphimage' /><br />" +
	text +
        sReleaseNote +
	"</td></tr><tr>" +
	"<td width=10% valign='top'><img src='files/billeder/salessupport/product specific information/dwl/dwl.png' width=32 height=32 /></td>"+
	"<td width=90% valign='center' bgColor=#EFF1F3>" +
        "<a href='" + link + "' title='Link " + filename + "' target='_self'>" +
	filename + " (" + filesize + ")</a>" +
	"</td>" +
	"</tr><tr>" +
	"<td width=10%></td>" +
	"<td width=90%>" +
	"<font color=#808080 size=1>" +
	"Updated: " + updated +
	"<br>" + comment +
	"</font></td>" +
	"</tr></table>";

	document.write(sHTML);
}

function WriteText(name,text)
{
var sHTML = "" +
	"<table border=0 width=100% cellspacing=0 cellpadding=4>" +
	"<tr><td width=10%></td>" +
	"<td width=90%><b>" + name + "</b><br>" +
        "<img src='Files/Billeder/aaa_headline_seperator.gif' border=0 alt='' width=430 height=21 class='paragraphimage' /><br />" +
	text +
	"</td></tr>" +
	"</table>";

	document.write(sHTML);
}
