// openUrl öffnet das angegebene Dokument in einem 830x750 Pixel grossen Popup-Fenster
function openUrl (url, target) {
    	newWindow = window.open(url, target,
			'left=200,width=830,height=750, dependent=yes,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=yes')
	newWindow.focus();
        return;
	}


// This Java function opens a link in a new window with the parameters width and height
// handed over from the invocation of the function.
// If the window already exists it will be first closed and then opend again with the new URL.
var objectWindow=null;
function openUrlSize (url, target, width, height) {
        width+=20;
       	height+=20;
       	if (objectWindow && objectWindow.location) {
       	    objectWindow.close();
       	}
        objectWindow = window.open(url, target,'left=400,width=' + 
               			   width +',height=' + height +
               			   ', dependent=yes,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=yes')
        objectWindow.focus();
        return;
}


// siteMap öffnet die Sitemap-URL in einem 540x380 Pixel grossen Popup-Fenster
// Bei language = "de" wird "http://www.docsndrugs.de/sitemap.html" geöffnet, ansonsten
// "http://www.docsndrugs.de/sitemap[.language].html", also z.B. "http://www.docsndrugs.de/sitemap.en.html"
var sitemapWindow=null;
function siteMap (language, windowname) {
	if ( language != "de")
		sitemapurl = "http://www.docsndrugs.de/sitemap."+language+".html";
		// sitemapurl = "/sitemap."+language+".html";
	else
		sitemapurl = "http://www.docsndrugs.de/sitemap.html";
		// sitemapurl = "/sitemap.html";

        if (sitemapWindow && sitemapWindow.location) {sitemapWindow.close();}
	sitemapWindow = window.open(sitemapurl,'sitemap',
			'width=540,height=380, dependent=yes,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=no')
	sitemapWindow.focus();
	return;
	}


// imprint öffnet die Impressum-URL in einem 400x380 Pixel grossen Popup-Fenster
// Bei language = "de" wird "http://www.docsndrugs.de/imprint.html" geöffnet, ansonsten
// "http://www.docsndrugs.de/imprint[.language].html", also z.B. "http://www.docsndrugs.de/imprint.en.html"
var imprintWindow=null;
function imprint (language, windowname) {
	if ( language != "de")
		imprinturl = "http://www.docsndrugs.de/imprint."+language+".html";
		// imprinturl = "/imprint."+language+".html";
	else
		imprinturl = "http://www.docsndrugs.de/imprint.html";
		// imprinturl = "/imprint.html";

        if (imprintWindow && imprintWindow.location) {imprintWindow.close();}
	imprintWindow = window.open(imprinturl,'imprint',
			'width=400,height=380, dependent=yes,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=no')
	imprintWindow.focus();
	return;
	}


// falls das aktuelle Fenster kein Sitemap-fenster ist, ist es ein Hauptfenster und erhält den Titel "main", damit es
// als Hauptfenster referenziert werden kann.
// Dies ist nötig, um die Links aus der Sitemap in einem Hauptfester darstellen zu können
/*if (window.name != "sitemap") {
	window.name = "main";
}*/


// This Java function opens a link in a new window with the parameters width and height
// handed over from the invocation of the function.
// If the window already exists it will be first closed and then opend again with the new URL.

var objectWindow=null;

function openUrlSize (url, target, width, height) {
        width+=20;
        height+=20;
        if (objectWindow && objectWindow.location) {objectWindow.close();}
                objectWindow = window.open(url, target,'left=200,width=' + width +',height=' + height +', dependent=yes,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=no')
        objectWindow.focus();
        return;
}



// This Java function opens a new window an shows the result of a servlet invocation.
// The URL for the servlet invocation is
// http://<adress-teil>?<parameter1>&<parameter2>


var PopUP=null;

function popup(username){
	popwin = window.open('http://dnd.informatik.uni-ulm.de/servlets/dnd.collaboration.ui.servlet.UserContactServlet' +
                                '?user=' + username +
                                '&typ=img',
                                'PopUp',
                                'left=30,top=30,width=640,height=300,'+
                                'dependent=yes,resizable=yes,toolbar=no,'+
                                'status=no,menubar=no,scrollbars=no');
        popwin.focus();
	return;
}



// This Java function opens a new window an shows the contents of URL

function openStoryBoard(url) {
    var w = window.open(url, '_blank','dependent=no,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=yes')
    w.focus();
}

