var gepoppt = 0;
var popname;
var rest;
var reststring;
var ziel;

function popUpNow()
	{
	tracklist = window.open(ziel,'winname',reststring);
	gepoppt = 1;
	}

function popUp(ziel,winname,breite,hoehe)
	{
//	if(gepoppt == 1)
//		{
//		tracklist.close();
//		}
	if(breite == 540)
		{
		rest = "directories=0,status=no,location=no,resizable=no,menubar=0,toolbar=no,scrollbars=no";
		}
	else
		{
		rest = "directories=0,status=no,location=no,resizable=no,menubar=0,toolbar=no,scrollbars=yes";
		}
	reststring = "width="+breite+",height="+hoehe+","+rest;
	tracklist = window.open(ziel,'winname',reststring);
	gepoppt = 1;
	tracklist.focus();
//	window.setTimeout("popUpNow()",100);
	}

function killMyPopUp()
{
if(gepoppt == 1)
	{
	tracklist.close();
	}
}

function popLang(which) {
	which=window.open('popup_'+which+'.php',''+which+'','width=700, height=500, menubar=no, toolbar=no, location=no, status=no, scrollbars=yes, dependent=yes');
	which.focus();
}

function winPop(winName) {
  myWin=window.open(winName,'myWin','width=1000, height=600, menubar=no, toolbar=no, location=no, status=no, scrollbars=yes, dependent=yes');
  myWin.focus();
}

function wOpen(winName,b,h) {
  myWin=window.open(winName,'myWin','width='+b+', height='+h+', menubar=no, toolbar=no, location=no, status=no, scrollbars=yes, dependent=yes');
  myWin.focus();
}

function dgPop(id,b,h) {

  var thisSite = ""+self.location+"";
  if(thisSite.search(/rec=98/) != -1) {
    myWin=window.open('http://www.deutschegrammophon.com/cat/single?PRODUCT_NR=0734618','myWin','width=1024, height=800, menubar=no, toolbar=no, location=no, status=no, scrollbars=yes, dependent=yes');
    myWin.scrollTo(0.200);
  } else {
    myWin=window.open('http://www2.deutschegrammophon.com/cat/product-ext?PRODUCT_NR='+id+'&SITE=MUTAN&CSS=http://www2.deutschegrammophon.com/html/tracklist_stylesheets/tl-stylesheet-asmutter.css&COVERSIZE=200&BIG_BUTTONS=0&SUPPRESS_ARTISTS=0','myWin','width='+b+', height='+h+', menubar=no, toolbar=no, location=no, status=no, scrollbars=yes, dependent=yes');
  }

  myWin.focus();
}