function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  window.status = '';
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("index.php?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function /*out: String*/ number_format( /* in: float   */ number,
                                        /* in: integer */ laenge,
                                        /* in: String  */ sep,
                                        /* in: String  */ th_sep ) {

	var pre = "";
	if(number < 0){
		pre = "-";
		number *= (-1)
	}
	number = Math.round( number * Math.pow(10, laenge) ) / Math.pow(10, laenge);
	str_number = number+"";
	arr_int = str_number.split(".");
	if(!arr_int[0]) arr_int[0] = "0";
	if(!arr_int[1]) arr_int[1] = "";
	if(arr_int[1].length < laenge){
		nachkomma = arr_int[1];
		for(i=arr_int[1].length+1; i <= laenge; i++){	nachkomma += "0";	}
		arr_int[1] = nachkomma;
	}
	if(th_sep != "" && arr_int[0].length > 3){
		Begriff = arr_int[0];
		arr_int[0] = "";
		for(j = 3; j < Begriff.length ; j+=3){
			Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3);
			arr_int[0] = th_sep + Extrakt +  arr_int[0] + "";
		}
		str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3));
		arr_int[0] = str_first + arr_int[0];
	}
	return pre+arr_int[0]+sep+arr_int[1];
}

var photo=null;

function showimg(file)
{
if(photo!=null)
  if(!photo.closed)photo.close();
  photo=window.open("","","resizable=1,width=10,height=10,dependent=yes");
  photo.document.open("text/html");
  photo.document.writeln("<html>");
  photo.document.writeln("<head>");
  photo.document.writeln("<title>.: Modding-Shop:.</title>");
  photo.document.writeln("</head>");
  photo.document.writeln("<script>");
  photo.document.writeln("ointer = window.setInterval(\"checkimg();\", 50);");
  photo.document.writeln("function checkimg() {");
  photo.document.writeln("  if(document.images[0].complete == true)");
  photo.document.writeln("	{");
  photo.document.writeln("		SetSize();");
  photo.document.writeln("		window.clearInterval(ointer);");
  photo.document.writeln("		ointer=\"\";");
  photo.document.writeln("	}");
  photo.document.writeln("	else");
  photo.document.writeln("	{");
  photo.document.writeln("		SetSize();");
  photo.document.writeln("	}");
  photo.document.writeln("}");  
  photo.document.writeln("function SetSize() {");
  photo.document.writeln("var breit=document.images[0].width;");
  photo.document.writeln("var hoch=document.images[0].height;");
  photo.document.writeln("self.resizeTo((breit+10),(hoch+30));");
  photo.document.writeln("}");
  photo.document.writeln("</script>");
  photo.document.writeln("<body bgcolor=#FFFFFF leftmargin=0 topmargin=0>");
  photo.document.writeln("<img src="+file+">");
  photo.document.writeln("</body>");
  photo.document.writeln("</html>");
  photo.focus();
}