	// <![CDATA[

			var permanotice;
			var tooltip;
			var _alert;
			var credit_shown = false;

			$(document).ready(function(){
				// This is how to change the default settings for the entire page.
				//$.pnotify.defaults.pnotify_width = "400px";
				// If you don't want new lines ("\n") automatically converted to breaks ("<br />")
				//$.pnotify.defaults.pnotify_insert_brs = false;

				

				// This notice is used as a tooltip.
				tooltip = $.pnotify({
					pnotify_title: "Tooltip",
					pnotify_text: "I'm not in a stack. I'm positioned like a tooltip with JavaScript.",
					pnotify_hide: false,
					pnotify_closer: false,
					pnotify_history: false,
					pnotify_animate_speed: 100,
					pnotify_opacity: .9,
					pnotify_notice_icon: "ui-icon ui-icon-comment",
					// Setting stack to false causes Pines Notify to ignore this notice when positioning.
					pnotify_stack: false,
					pnotify_after_init: function(pnotify){
						// Remove the notice if the user mouses over it.
						pnotify.mouseout(function(){
							pnotify.pnotify_remove();
						});
					},
					pnotify_before_open: function(pnotify){
						// This prevents the notice from displaying when it's created.
						pnotify.pnotify({
							pnotify_before_open: null
						});
						return false;
					}
				});

				$(".wrapper :button").button();

				if ($.fn.themeswitcher) {
					$('#switcher').themeswitcher();
				} else {
					$('#switcher').html("Couldn't load theme switcher widget.")
				}
			});

			function show_rich() {
				$.pnotify({
					pnotify_title: '<span style="color: green;">Rich Content Notice</span>',
					pnotify_text: '<span style="color: blue;">Look at my beautiful <strong>strong</strong>, <em>emphasized</em>, and <span style="font-size: 1.5em;">large</span> text.</span>'
				});
			}

			function consume_alert() {
				if (_alert) return;
				_alert = window.alert;
				window.alert = function(message) {
					$.pnotify({
						pnotify_title: 'Alert',
						pnotify_text: message
					});
				};
			}

			function release_alert() {
				if (!_alert) return;
				window.alert = _alert;
				_alert = null;
			}

			function fake_load() {
				var cur_value = 1;
				var progress;

				// Make a loader.
				var loader = $.pnotify({
					pnotify_title: "Fake Load",
					pnotify_text: "<div class=\"progress_bar\" />",
					pnotify_notice_icon: 'picon picon-throbber',
					pnotify_hide: false,
					pnotify_closer: false,
					pnotify_history: false,
					pnotify_before_open: function(pnotify){
						progress = pnotify.find("div.progress_bar");
						progress.progressbar({value: cur_value});
						// Pretend to do something.
						var timer = setInterval(function(){
							if (cur_value >= 100) {
								// Remove the interval.
								window.clearInterval(timer);
								loader.pnotify_remove();
								return;
							}
							//cur_value += Math.ceil(3 * ((100 - cur_value) / 100));
							cur_value += .3;
							progress.progressbar('option', 'value', cur_value);
						}, 2);
					}
				});
			}

			function dyn_notice() {
				var percent = 0;
				var notice = $.pnotify({
					pnotify_title: "Please Wait",
					pnotify_notice_icon: 'picon picon-throbber',
					pnotify_hide: false,
					pnotify_closer: false,
					pnotify_opacity: .75,
					pnotify_width: "150px"
				});

				setTimeout(function(){
					notice.pnotify({pnotify_title: false});
					var interval = setInterval(function(){
						percent += 2;
						var options = {
							pnotify_text: percent+"% complete."
						};
						if (percent == 80)
							options.pnotify_title = "Almost There";
						if (percent >= 100) {
							window.clearInterval(interval);
							options.pnotify_title = "Done!";
							options.pnotify_hide = true;
							options.pnotify_closer = true;
							options.pnotify_notice_icon = 'picon picon-task-complete';
							options.pnotify_opacity = 1;
							options.pnotify_shadow = true;
							options.pnotify_width = $.pnotify.defaults.pnotify_width;
							//options.pnotify_min_height = "300px";
						}
						notice.pnotify(options);
					}, 120);
				}, 2000);
			}

			function timed_notices(n) {
				var start_time = new Date().getTime();
				var end_time;
				var notices_left = n;
				for (var i = 0; i < n; i++) {
					$.pnotify({
						pnotify_title: "Notice Benchmark",
						pnotify_text: "Testing notice speed.",
						pnotify_animation: 'none',
						pnotify_delay: 0,
						pnotify_history: false,
						pnotify_after_close: function(pnotify){
							notices_left--;
							if (notices_left > 0)
								return;
							end_time = new Date().getTime();
							alert("Testing complete:\n\nTotal Notices: "+n+
								"\nTotal Time: "+(end_time - start_time)+"ms ("+((end_time - start_time) / 1000)+"s)"+
								"\nAverage Time: "+((end_time - start_time) / n)+"ms ("+((end_time - start_time) / n / 1000)+"s)")
						}
					});
				}
			}

			/*********** Custom Stacks ***********
			 * A stack is an object which Pines Notify uses to determine where
			 * to position notices. A stack has two mandatory variables, dir1
			 * and dir2. dir1 is the first direction in which the notices are
			 * stacked. When the notices run out of room in the window, they
			 * will move over in the direction specified by dir2. The directions
			 * can be "up", "down", "right", or "left". Stacks are independent
			 * of each other, so a stack doesn't know and doesn't care if it
			 * overlaps (and blocks) another stack. The default stack, which can
			 * be changed like any other default, goes down, then left. Stack
			 * objects are used and manipulated by Pines Notify, and therefore,
			 * should be a variable when passed. So, calling something like
			 *
			 * $.pnotify({pnotify_stack: {"dir1": "down", "dir2": "left"}});
			 *
			 * will NOT work. It will create a notice, but that notice will be
			 * in its own stack and may overlap other notices.
			 */
			var stack_topleft = {"dir1": "down", "dir2": "right", "push": "top"};
			var stack_bottomleft = {"dir1": "right", "dir2": "up"};
			var stack_custom = {"dir1": "right", "dir2": "down"};
			var stack_custom2 = {"dir1": "left", "dir2": "up", "push": "top"};
			/*********** Positioned Stack ***********
			 * This stack is initially positioned through code instead of CSS.
			 * This is done through two extra variables. firstpos1 and firstpos2
			 * are pixel values, relative to a viewport edge. dir1 and dir2,
			 * respectively, determine which edge. It is calculated as follows:
			 *
			 * - dir = "up" - firstpos is relative to the bottom of viewport.
			 * - dir = "down" - firstpos is relative to the top of viewport.
			 * - dir = "right" - firstpos is relative to the left of viewport.
			 * - dir = "left" - firstpos is relative to the right of viewport.
			 */
			var stack_bottomright = {"dir1": "up", "dir2": "left", "firstpos1": 15, "firstpos2": 15};

			function show_stack_topleft(err) {
				var opts = {
					pnotify_title: "Over Here",
					pnotify_text: "Check me out. I'm in a different stack.",
					pnotify_addclass: "stack-topleft",
					pnotify_stack: stack_topleft
				};
				if (err) {
					opts.pnotify_title = "Oh No";
					opts.pnotify_text = "Watch out for that water tower!";
					opts.pnotify_type = "error";
				}
				$.pnotify(opts);
			};
			function show_stack_bottomleft(err) {
				var opts = {
					pnotify_title: "Over Here",
					pnotify_text: "Check me out. I'm in a different stack.",
					pnotify_addclass: "stack-bottomleft",
					pnotify_stack: stack_bottomleft
				};
				if (err) {
					opts.pnotify_title = "Oh No";
					opts.pnotify_text = "Watch out for that water tower!";
					opts.pnotify_type = "error";
				}
				$.pnotify(opts);
			};
			function show_stack_bottomright(err) {
				var opts = {
					pnotify_title: "Over Here",
					pnotify_text: "Check me out. I'm in a different stack.",
					pnotify_addclass: "stack-bottomright",
					pnotify_stack: stack_bottomright
				};
				if (err) {
					opts.pnotify_title = "Oh No";
					opts.pnotify_text = "Watch out for that water tower!";
					opts.pnotify_type = "error";
				}
				$.pnotify(opts);
			};
			function show_stack_custom(err) {
				var opts = {
					pnotify_title: "Over Here",
					pnotify_text: "Check me out. I'm in a different stack.",
					pnotify_addclass: "stack-custom",
					pnotify_stack: stack_custom
				};
				if (err) {
					opts.pnotify_title = "Oh No";
					opts.pnotify_text = "Watch out for that water tower!";
					opts.pnotify_type = "error";
				}
				$.pnotify(opts);
			};
			function show_stack_custom2(err) {
			
				var opts = {
					pnotify_title: "News Letter",
					pnotify_text: err,
					pnotify_addclass: "stack-custom2",
					pnotify_stack: stack_custom2
				};
				if (err == 1) {
					opts.pnotify_title = "Newsletter";
					opts.pnotify_text = "mail error";
					opts.pnotify_type = "error";
				}
				$.pnotify(opts);
			};
			var info_box;
			function show_stack_info() {
				var modal_overlay;
				if (info_box) {
					info_box.pnotify_display();
					return;
				}
				info_box = $.pnotify({
					pnotify_title: "Pines Notify Stacks",
					pnotify_text: "Stacks are used to position notices and determine where new notices will go when they're created. Each notice that's placed into a stack will be positioned related to the other notices in that stack. There is no limit to the number of stacks, and no limit to the number of notices in each stack.",
					pnotify_notice_icon: "picon picon-object-order-raise",
					pnotify_delay: 20000,
					pnotify_history: false,
					pnotify_stack: false,
					pnotify_before_open: function(pnotify){
						// Position this notice in the center of the screen.
						pnotify.css({
							"top": ($(window).height() / 2) - (pnotify.height() / 2),
							"left": ($(window).width() / 2) - (pnotify.width() / 2)
						});
						// Make a modal screen overlay.
						if (modal_overlay)
							modal_overlay.fadeIn("fast");
						else
							modal_overlay = $("<div />", {
								"class": "ui-widget-overlay",
								"css": {
									"display": "none",
									"position": "fixed",
									"top": "0",
									"bottom": "0",
									"right": "0",
									"left": "0"
								}
							}).appendTo("body").fadeIn("fast");
					},
					pnotify_before_close: function(){
					modal_overlay.fadeOut("fast");
					}
				});
			};
function showHint(str)
{

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
 // alert(xmlhttp.readyState);
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	//alert(xmlhttp.responseText);
	var text = xmlhttp.responseText;
	
	if(text == 1)
	{
		$.pnotify({
						pnotify_title: 'Newsletter',
						pnotify_text: 'Unable to process now. Please try again',
						pnotify_type: 'error'
					});
	}
	else if(text == 2)
	{
		$.pnotify({
						pnotify_title: 'Newsletter',
						pnotify_text: 'Please enter your email address',
						pnotify_type: 'error'
					});
		
	}
	else
	{
			$.pnotify({
						pnotify_title: 'Newsletter',
						pnotify_text: text
					});
			
	}
	
	//document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("get","newsletter.php?id="+str,true);
xmlhttp.send();
}
