var i=0;
var strDirPrefix="";
var nStyle=3;

var sh = screen.height;
var sw = screen.width;
if (sw >=  630) nStyle=3;
if (sw >=  790) nStyle=3;
if (sw >= 1000) nStyle=3;
if (sw >= 1200) nStyle=4;
if (sw >= 1550) nStyle=5;
if (sh >= 700  &&  sw >= 1100 && sh < 890 )   nStyle=3;
if (sh >= 900  &&  sw >= 1550 && sh < 1200 )  nStyle=4;
if (sh >= 1180 && sw >= 1600 && sh < 1280 ) nStyle=5;

for (i=0; i<jsLevel; i++) strDirPrefix = strDirPrefix + "../";

var strFileName = strDirPrefix + "devi_lib/styles00" + nStyle + ".css";
var shm = "<link href='" + strFileName + "' rel='stylesheet' type='text/css'/>";

// Gewaehlte Aufloesung als cookie speichern
CookieSetz("style", escape(nStyle), 3000);
// Als Cookie speichern das JS aktiv ist
CookieSetz("js", 'J',  3000);

document.write(shm);

//-----------------------------------------------------------------------------
function CookieSetz(Bezeichner, Wert, Dauer)
{
  jetzt   = new Date();
  Auszeit = new Date(jetzt.getTime() + Dauer);
  document.cookie = Bezeichner + "=" + Wert + ";expires=" + Auszeit.toGMTString() + ";path=/;" ;
}


function PopupWindow(iFileName, iX, iY, wTitle)
{
	var x = screen.width;
	var y = screen.height;
	var strStatus=wTitle;

	x = (x - iX) / 2;
	y = (y - iY) / 2;

	var sp = "Width=" + iX + ", Height=" + iY + ", left=" + x + ", top=" + y + ", resizable=yes, status=yes";

	var strSource="pop.php?dt=" + wTitle + "\&im=" + iFileName;
	var hWin = window.open(strSource,"fPopup" , sp);
	hWin.Status=strStatus;
	hWin.defaultStatus=strStatus;
	hWin.focus;
	hWin.close;
}



