// JavaScript Document

<!--
	function confirming(id)
	{
 		var question = "Do you really want to delete item \'"+id+"\'";		
		var confirming= confirm(question);
 		if (confirming== true)
 		{
  			window.location="?action=delete&id="+id;
		}
		else
		{
			alert("Delete cancelled!!");
		}
	}
//-->

<!--


	function DoPrompt(action) {
		var currentMessage = document.form1.Story.value;

		if (action == "link") {
			var thisURL = prompt("Enter the complete URL for the link you wish to add.", "http://");
			if (thisURL == null){return;}

			var thisTitle = prompt("Now enter the title of the web page you wish to reference.  For instance, if you are linking to the URL for Infopop, you might use the title Infopop Homepage.", "web page");
			if (thisTitle == null){return;}

			document.form1.Story.value = currentMessage+"<A HREF='"+thisURL+"'>"+thisTitle+"</A>";
			document.form1.Story.focus();
			return;
		}

		if (action == "email") {
			var thisEmail = prompt("Enter the complete email address that you wish to add.", "");
			if (thisEmail == null){return;}

			document.form1.Story.value = currentMessage + "<A HREF='MAILTO:"+thisEmail+"'>"+thisEmail+"</A>";
			document.form1.Story.focus();
			return;
		}

		if (action == "bold") {
			var thisBold = prompt("Enter the text that you wish to make bold.", "");
			if (thisBold == null){return;}

			document.form1.Story.value = currentMessage + "<B>"+thisBold+"</B>";
			document.form1.Story.focus();
			return;
		}

		if (action == "italics") {
			var thisItal = prompt("Enter the text that you wish to italicize.", "");
			if (thisItal == null){return;}

			document.form1.Story.value = currentMessage + "<I>"+thisItal+"</I>";
			document.form1.Story.focus();
			return;
		}

		if (action == "image") {
			var thisImage = prompt("Enter the complete URL for the image you wish to display.", "http://");
			if (thisImage == null){return;}

			document.form1.Story.value = currentMessage + "<IMG SRC='"+thisImage+"'>";
			document.form1.Story.focus();
			return;
		}

		if (action == "paragraph") {
			document.form1.Story.value = currentMessage + "<P> Your Paragraph Here </P>";
			document.form1.Story.focus();
			return;
		}

		if (action == "break") {
			document.form1.Story.value = currentMessage + "<BR>";
			document.form1.Story.focus();
			return;
		}

		if (action == "blist") {
			document.form1.Story.value = currentMessage + "<UL> <LI> List Item 1 </LI><LI> List Item 2 </LI> </UL>";
			document.form1.Story.focus();
			return;
		}

		if (action == "nlist") {
			document.form1.Story.value = currentMessage + "<OL> <LI> List Item 1 </LI><LI> List Item 2 </LI> </OL>";
			document.form1.Story.focus();
			return;
		}

		if (action == "rbold") {
			var thisBold = prompt("Enter the text that you wish to make red and bold.", "");
			if (thisBold == null){return;}

			document.form1.Story.value = currentMessage + "<FONT COLOR='#CE2142'><B>"+thisBold+"</B></FONT>";
			document.form1.Story.focus();
			return;
		}

	}
	
	function enlargeImage(id,width,height){
		window.open("zoomImage.php?photoLink="+id,"zoomImage","scrollbars=no,menubar=no,width="+width+",height="+height+",resizable=no,toolbar=no,location=no,status=no,left=100,top=100")
	}
	
	function deleteImage(linkUrl){
		var question = "Do you really want to delete "+linkUrl+" ?";		
		var confirming= confirm(question);
		if (confirming== true){
			window.location="?action=delete&link="+linkUrl;
		} else {
			alert("Delete cancelled!!");
		}
	}
	
//-->