var basepath,basepathmedien,basepathformulare,imgpath,intLangpos;
basepath = '/v-zug/internet.nsf/';
basepathmedien = '/v-zug/medien.nsf/';
basepathformulare = '/v-zug/vzform.nsf/';
imgpath = '/v-zug/medien.nsf/img/';
imgpathlang = '/v-zug/medien.nsf/img'+language+'/';
function setImages(e) {
var x = (is.ns)? e.pageX : event.x+document.body.scrollLeft
var y = (is.ns)? e.pageY : event.y+document.body.scrollTop
//set images to passive
if (y <= 70 || x >= 774 || y > 360) {
imgOut("kuc");
imgOut("was");
}
return true
}
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();
}
}
// open knowhow popup
function knowhow(pageid)
{
document.write('
');
}
// open knowhow popup on WZK (different Picture)
function knowhowwzk(pageid)
{
document.write('
');
}
// create img tag
function writeimage(picturename)
{
document.write('')
}
// 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 consulter link, param 'consulterid' in the form CONSULTER#LANGUAGE
function consulter(consulterid,linktext)
{
var strConsulter;
var strConsulterLanguage;
strConsulter = getlinkfromstr(consulterid);
strConsulterLanguage = getlangfromstr(consulterid);
document.write('' + linktext + '')
}
// create text link
function writelink(linkid,linktext,targetwindow)
{
var target;
if (targetwindow == "new")
{
target = " target='_blank'";
}
else
{
target = "";
}
document.write('' + linktext + '')
}
// write a basket link:
// will add the given file from the media database to the users' basket using addToBasket
function writeBasketLink(linkid, filelang)
{
var strAltText;
if(language == "FR")
strAltText = "Un clic et le fichier à envoyer est déposé dans le panier PDF.";
else if(language == "IT")
strAltText = "Mit einem Klick wird die Datei zum Versenden in den PDF-Basket gelegt I";
else
strAltText = "Mit einem Klick wird die Datei zum Versenden in den PDF-Basket gelegt";
if (filelang == '' || filelang == undefined) //23.07.03 Bigi add: | filelang == undefined
filelang = language;
document.write('
');
}
// add the file to the basket cookie
function addToBasket(linkid)
{
var cookie;
if((cookie = Get_Cookie('basket')) == null)
cookie = '';
var found = cookie.indexOf(linkid + ";");
if(found==-1)
{
cookie += linkid + ";";
Set_Cookie('basket', cookie);
alert(lang_basket_added);
} else {
alert(lang_basket_exists);
}
}
// remove the file to the basket cookie
function removeFromBasket(linkid)
{
var cookie;
if((cookie = Get_Cookie('basket')) == null)
cookie = '';
var found = cookie.indexOf(linkid + ";");
if(found>-1)
{
pattern = linkid.replace(/\//g, '\\\/').replace(/\$/g, '\\$');
cookie_new = cookie.replace(pattern + ";", "");
if(cookie_new == cookie) // regexp is not necessary for Internet Explorer
cookie_new = cookie.replace(linkid + ";", "");
Set_Cookie('basket', cookie_new);
window.location.reload();
}
}
// create text link
function writefilelink(linkid,linktext)
{
var langstr = '';
if(arguments.length >= 4)
langstr = arguments[3];
document.write('' + linktext + '');
if(arguments.length >= 3)
{
if(arguments[2])
writeBasketLink(linkid, langstr);
} else {
writeBasketLink(linkid, langstr);
}
}
// create form link
function writeformlink(formid,linktext)
{
var strFormLink;
var strFormLanguage;
strFormLink = getlinkfromstr(formid);
strFormLanguage = getlangfromstr(formid);
document.write('' + linktext + '')
}
// create gallery link
function writegallerylink(galleryid,linktext)
{
var strGalleryLink;
var strFormLanguage;
strGalleryLink = getlinkfromstr(galleryid);
strFormLanguage = getlangfromstr(galleryid);
var strHoleLink = "javascript:void(window.open('" + basepath + "fGallery?ReadForm&gallery=" + strGalleryLink + '&index=1' + '&language=' + strFormLanguage + "','gallery','menubar=no,location=no'))";
document.write('' + linktext + '')
}
function writewzlinks(pdocid,title)
{
document.write('
| '+title+' '+lang_wz_add+' | |||
| '+lang_wz_to+' | |||