
function MainWin (URL, Opt) {

	if (this["opener"] != null) {

		var parent = this["opener"];
		var parentP = parent["opener"];

		if (parentP != null) {
			parentP.location = URL;
			parent.close();
		} else {
			parent.location = URL;
		}

	} else {
		window.location = URL;
	}

	if (Opt == 1) self.close();

	return false;
}

function RollOver (a,b,c) {


}

function RollOut (a,b,c) {


}

// -----

function Open_Job (JobUrl) {

	Open_Win (JobUrl, "Jobs", 480 ,480);
}

// -----

function Open_Note (NoteUrl) {

	Open_Win (NoteUrl, "Notes", 480 ,480);
}

// -----

function Open_Archive (ArcUrl) {

	Open_Win (ArcUrl, "Archiv", 480 ,480);
}

// -----

function Open_Ref (RefUrl) {

	Open_Win (RefUrl, "Projekte", 760 ,680);
}

// -----

function Open_Video (VideoUrl) {

	Open_Win (VideoUrl, "Videos", 592 ,540, 'no');
}

// -----

function Open_Win (childUrl, childTarget, childWidth ,childHeight, scrollbars) {

	var newChild = null;

	if (childTarget == null) childTarget = "PopUp";
	if (childWidth == null) childWidth = 640;
	if (childHeight == null) childHeight = 480;
	if (scrollbars == null) scrollbars = 'yes';

	var childStatus = 'no';
	var childScrollbars = scrollbars;
	var childLocation = 'no';
	var childTollbar = 'no';
	var childMenubar = 'no';

	var childPosLeft = Math.floor ((screen.width - childWidth) / 2);
	var childPosTop  = Math.floor ((screen.height - childHeight) / 2.5);

	var paramString = 'width='+childWidth+',height='+childHeight+',innerwidth='+childWidth+',innerheight='+ childHeight+',top='+childPosTop+',left='+childPosLeft+',status='+childStatus+',scrollbars='+childScrollbars+',location='+childLocation+',toolbar='+childTollbar+',menubar='+childMenubar;

	newChild = window.open (childUrl, childTarget, paramString);

	if (newChild != null) newChild.window.focus();

}

