//  script für html popups
//tmtC_winOpen
var newWin;
//tmtC_winOpenEnd

function tmt_winOpen(u,id,f,df){
	if(eval(id)==null||eval(id+".closed")){
	eval(id+"=window.open('"+u+"','"+id+"','"+f+"')");eval(id+".focus()");}
	else if(df){eval(id+".focus()");}
	else{eval(id+"=window.open('"+u+"','"+id+"','"+f+"')");eval(id+".focus()");}
}

//  2.  script für popups
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//unterhalb script für print function
function tmt_winPrint(id){ 
	if(window.print()){
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+".print()");}}
}

//unterhalb script für close popup
function close_window() {
    window.close();
}


//  Script für namd anchors
function GoToAnchor() {

    // First, get the anchor reference off the parent frame's URL, if there is one.
    parentURL = ""+parent.document.location;
    parSharpIndex = parentURL.indexOf("#");
    if (parSharpIndex >= 0) {
        anchorString = parentURL.substring(parSharpIndex, parentURL.length);
    }
    else {
        return;
    }

    // Then, strip the anchor off this document's URL, if it's got one.
    documentURL = ""+document.location;
    docSharpIndex = documentURL.indexOf("#");
    if (docSharpIndex >= 0) {
        // Break out if we're already at the right anchor.
        if (anchorString == documentURL.substring(docSharpIndex, documentURL.length)) {
            return;
        }
        docStrippedURL = documentURL.substring(0, docSharpIndex);
    }
    else {
        docStrippedURL = documentURL;
    }

    // Now, slap the two together, and point this frame to the new, combined URL.
    document.location.replace(docStrippedURL + anchorString);

}

