preHtml = "<" + "HTML>  <" + "HEAD>  <" + "TITLE>fotoalbum<" + "/TITLE>  <" + "BODY BGCOLOR=\"pink\">  <" + "CENTER>  ";
tweenHtml = "<" + "FORM><" + "INPUT TYPE=\"BUTTON\" VALUE=\"Tilbage\" onClick=\"history.go(-1)\"><" + "/FORM>";
postHtml = "<" + "/HTML>";
textBelowPic =true;

function showPic(theUrl,theText) {
	//tjek filkode
	fileExt = theUrl.substring(theUrl.lastIndexOf(".")+1,theUrl.length);
	fileExt = fileExt.toLowerCase();
	
	fileIsPic = (fileExt=="gif" 
		|| fileExt=="png"
		|| fileExt=="jpg"
		|| fileExt=="jpeg"
		|| fileExt=="jpe"
		|| fileExt=="jfif");

	if(fileIsPic) {
		if(textBelowPic) {
			docStr = preHtml + "<IMG SRC=" + theUrl +">" + tweenHtml + theText + postHtml;
		} else {
			docStr = preHtml + theText + tweenHtml + "<IMG SRC=" + theUrl +">" + postHtml;
		}
		makeDoc(docStr);
		return false;
	} else {
		return true;
	}
}

function makeDoc(theStr) {
	document.open();
	document.write(theStr);
	document.close();
}
