var dbpath,basepath,basepathmedien,basepathformulare,imgpath,intLangpos;
var loc = new String(window.parent.document.location);
dbpath = '/gkb/';
hostname= location.hostname;
basepath = '/gkb/home.nsf/';
basepathmedien = '/gkb/medien.nsf/';
basepathformulare = '/gkb/form.nsf/';
imgpath = '/gkb/medien.nsf/img/';
if (loc.indexOf("https://")!= -1)
{
prefix = "https://";
imgpath = prefix+hostname+imgpath;
basepathmedien = prefix+hostname+basepathmedien;
}
// Remove outline around active links
// Needs to be called from body onLoad event
function buttonBlur() {
var lnks = document.links, i;
for (i = 0; i < lnks.length; ++i) {
//lnks[i].onclick = "this.blur()"; // non-DOM2 browsers like IE
lnks[i].onfocus = "this.blur()"; // non-DOM2 browsers like IE
//lnks[i].setAttribute("onclick", "this.blur()"); // DOM2 browser like NN7
lnks[i].setAttribute("onfocus", "this.blur()"); // DOM2 browser like NN7
}
}
var windowopen = false;
function open_window(url,width,height,scroll)
{
if (windowopen) {
if (hwin.closed) {
hwin = window.open(url,"popup","alwaysRaised=yes,resizable=yes,scrollbars=no,width=" + width + ",height=" + height +","+ scroll);
} else {
hwin.location.href = url;
hwin.resizeTo(width,height);
hwin.focus();
}
} else {
hwin = window.open(url,"popup","alwaysRaised=yes,resizable=yes,scrollbars=no,width=" + width + ",height=" + height +","+ scroll);
windowopen = true;
}
}
function close_window()
{
if (windowopen) {
if (!hwin.closed)
hwin.close();
}
}
// create img tag
function writeimage(picturename)
{
document.write('')
}
// form image submit button
function writesubmitimage(picturename)
{
var onclickaction = 'submit()';
writesubmitimage2(picturename, onclickaction);
}
// form image submit button, with possibility to define onclick action
function writesubmitimage2(picturename, onclickaction)
{
document.write('')
}
// ceate a link to a mediendb document
function writemediendblink(file, linktext)
{
document.write('' + linktext + '')
}
// ceate a link to a mediendb document - open link in a new window
function writemediendblink_newwindow(file, linktext, titleattributetext)
{
document.write('' + linktext + '');
}
// get link from string ANYLINK#LANGUAGE
function getlinkfromstr(strText)
{
intLangpos = strText.indexOf("#");
if (intLangpos > 0) {
return strText.substr(0,intLangpos);
} else {
return strText;
}
}
// get language from string ANYSTRING#LANGUAGE
function getlangfromstr(strText)
{
intLangpos = strText.indexOf("#");
if (intLangpos > 0) {
return strText.substr(intLangpos + 1,2);
} else {
return "DE";
}
}
// create text link
function writelink(linkid,linktext)
{
document.write('' + linktext + '')
}
// create image link
function writeimagelink(linkid,imagename)
{
document.write('
')
}
// create text link
function writefilelink(linkid,linktext,titleattributetext)
{
var titleattribute = '';
// add title attribute if the titleattribute text is set
if (titleattributetext != undefined && titleattributetext != '') {
titleattribute = ' title="' + titleattributetext + '" ';
}
document.write('' + linktext + '');
}
// create form link
function writeformlink(formid,linktext)
{
var strFormLink;
var strFormLanguage;
strFormLink = getlinkfromstr(formid);
strFormLanguage = getlangfromstr(formid);
document.write('' + linktext + '')
}
//---- Cookiefunction Bibliothek -----
function Get_Cookie(name) {
var start = document.cookie.indexOf(name+"=");
var len = start+name.length+1;
if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
if (start == -1) return null;
var end = document.cookie.indexOf(";",len);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(len,end));
}
function Set_Cookie(name,value) {
document.cookie = name + "=" +escape(value) + ";path=/;";
}
// ------ zoom --------
function zoom(quelle, links, oben, bildbreite, bildhoehe, scrollen)
{
filelaenge = quelle.length;
pos = filelaenge - 1;
pos1 = quelle.charAt(filelaenge - 1);
pos2 = quelle.charAt(filelaenge - 2);
pos3 = quelle.charAt(filelaenge - 3);
endung = pos3 + pos2 + pos1;
if(endung == "jpg" || endung == "jpeg" || endung == "gif"){
eigenschaften = "left=" + links + ",top=" + oben + ",width=" + bildbreite + ",height=" + bildhoehe + ",resizable";
inhalt = "