// Temporary s2f fix.
	function chk_url(theurl) {
		finalurl = theurl;
		alert('chk_url: finaleurl=' + finalurl);
		if (theurl.indexOf('?') >0) {
			if (theurl.indexOf('demo.prospero.com')) {
				finalurl = 'http://demo.prospero.com/';
			} else {
				finalurl = 'http://forums.prospero.com/';
			}
	
			var start = theurl.indexOf('webtag=');
			var end = theurl.indexOf('&',start);
			//alert('start=' + start + ', end=' + end);
			webtag = theurl.substring(start+7,end);
			//alert(webtag);
			finalurl += webtag;
		}
		alert('finalurl=' + finalurl);
		return(finalurl);
	}

	// Dynamic s2f
	function s2fSendForm2() {
	    if (!window.S2F_altURL) {
	      s2fURL = window.document.location.href;
	    } else {
	      s2fURL = window.S2F_altURL;
	    }

		var mywin = window.open('http://www.ivillage.co.uk/s2f/ukform/?channelID=' + channelID + '&s2fURL=' +
		//channelID + 
		//',00.html?s2fURL=' + 
		escape(s2fURL) + 
		'&s2fTitle=' + 
		escape(window.document.title), 's2f', 'height=610,width=510,resizable=no,scrollbars=yes');

	    return false;
	}

	// New UK Google Search form edit.
	function noEntry2(form) {
		//alert(form.qry.value);
	
		// Check for null value
		if ((form.q.value.length < 1)||(form.q.value.substring(0,6)=="******")) {
		   alert("Your search could not be completed because no search words were entered.");
	       form.q.focus();
	       form.q.select();
		   return false;
		}
	
		form.action = 'http://search.ivillage.co.uk/search/ivillageuk';
		return true;
	}

	function reportSpam() {
		var mywin = window.open('http://www.ivillage.co.uk/prospero/reportSpam.html', '', 'height=450,width=600,resizable=yes,scrollbars=yes');
	}

	function generate_popup_css () {
		newWindow.document.write("<style>");
		newWindow.document.write(".vividBlueBackground { background-color: #80CCEA; }");
		newWindow.document.write(".darkBlueHeaderText { font-family: arial; font-size: 16px; line-height: 20px; color: #104171; text-decoration: none; font-weight: bold; }");
		newWindow.document.write(".darkBlueText { font-family:  arial; font-size: 12px; line-height: 18px; color: #104171; text-decoration: none; font-weight: normal; }");
		newWindow.document.write("a.darkBlueSmallText { font-family:  arial; font-size: 10px; line-height: 18px; color: #104171; text-decoration: underline; font-weight: normal; }");
		newWindow.document.write("</style>");
	}

	// === HOW DO I READ AND POST A MESSAGE ===
	function drawReadPost () {  
		newWindow = window.open("", "", "height=220,width=500,scrollbars=no,resizable=no"); 
		newWindow.document.write("<html><head><title>Read and post messages?</title>");
		generate_popup_css();
		newWindow.document.write("</head><body bgcolor=ffffff>");
		newWindow.document.write("<div class=darkBlueHeaderText>Read and post messages?</div><div class=darkBlueText>When you open a board, you will see a list of discussion topics. To read a message, just click on the title. To ask a question and start a discussion of your own, click on the <span style='font-weight: bold;'>Start a new discussion</span> button. To reply to a message, click <span style='font-weight: bold;'>Reply to this message</span> once you have read it. The main message board page also lists the name of the person who started the discussion, the number of replies the message has received and the time of the most recent reply. <i>The message list is organised by time of reply, so discussions with new messages appear at the top of the list</i>.</div><div align=left>");
		newWindow.document.write("<imgsrc='http://a820.g.akamai.net/f/820/822/1d/i.ivillage.co.uk/uk_en/boards/images/uk_popup_logo.gif' width=103 height=25 border=0 align=right><a href='javascript: this.window.close();'class=darkBlueSmallText>Click here to close this window</a></div>");
		newWindow.document.write("</body></html>"); 
		newWindow.document.close(); 
		newWindow.focus(); 
	} 

	// === GET EMAIL NOTIFICATION ===
	function drawGetEmail () {  
		newWindow = window.open("", "", "height=210,width=500,scrollbars=no,resizable=no"); 
		newWindow.document.write("<html><head><title>Get email notification when someone replies to my message?</title>");
		generate_popup_css();
		newWindow.document.write("</head><body bgcolor=ffffff>");
		newWindow.document.write("<div class=darkBlueHeaderText>Get email notification when someone replies to my message?</div>");
		newWindow.document.write("<div class=darkBlueText>You can choose to be notified whenever someone responds to a message that you&#039;ve posted. The email will be sent to the email address associated with your member name. Just click on the link in the email and you&#039;ll be taken to the board to read the reply. To receive email notifications to all messages you post, customise your <b>board settings</b> so that you always receive notifications of replies.</div><div align=left>");
newWindow.document.write("<img src='http://a820.g.akamai.net/f/820/822/1d/i.ivillage.co.uk/uk_en/boards/images/uk_popup_logo.gif' width=103 height=25 border=0 align=right><a href='javascript: this.window.close();' class=darkBlueSmallText>Click here to close this window</a></div>");
		newWindow.document.write("</body></html>"); 
		newWindow.document.close(); 
		newWindow.focus(); 
	} 

	// === SAVE THIS BOARD ===
	function drawSaveBoard () {  
		newWindow = window.open("", "", "height=225,width=500,scrollbars=no,resizable=no"); 
		newWindow.document.write("<html><head><title>Save this board?</title>");
		generate_popup_css();
		newWindow.document.write("</head><body bgcolor=ffffff>");
		newWindow.document.write("<div class=darkBlueHeaderText>Save this board?</div>");
		newWindow.document.write("<div class=darkBlueText>At the top of message board pages, you&#039;ll also see a link to <b>favourite boards</b>. Favourite boards is a handy (and private) place to store a list of the boards you like to visit. To add a board to your Favourites list, click on the <b>&quot;Add this board to your favourites&quot;</b> button in the shaded area at the top right of the board.<br>Favourite Boards also keeps track of message boards that you&#039;ve recently visited, so you can use it to help you find your way back to an interesting discussion.</div>");
		newWindow.document.write("<img src='http://a820.g.akamai.net/f/820/822/1d/i.ivillage.co.uk/uk_en/boards/images/uk_popup_logo.gif' width=103 height=25 border=0 align=right><a href='javascript: this.window.close();'class=darkBlueSmallText>Click here to close this window</a></div>");
		newWindow.document.write("</body></html>"); 
		newWindow.document.close(); 
		newWindow.focus(); 
	} 

	// === SETUP MY PROFILE ===
	function drawMyProfile () {  
		newWindow = window.open("", "", "height=300,width=500,scrollbars=no,resizable=no"); 
		newWindow.document.write("<html><head><title>Set up my profile?</title>");
		generate_popup_css();
		newWindow.document.write("</head><body bgcolor=ffffff>");
		newWindow.document.write("<div class=darkBlueHeaderText>Set up my profile?</div>");
		newWindow.document.write("<div class=darkBlueText>Creating a member profile gives you a chance to express yourself - and helps other members get to know you better. To view someone&#039;s profile, just click on her member name. To create a profile, click on the <b>your profile</b> link near the <b>Welcome</b> message at the top of the message board page. Answer the questions you choose to answer, then save the page. If you would rather not answer a question, just leave the field blank and it won&#039;t be displayed on your profile.<br>You can choose a personal avatar (image) to display on messages that you post. From your profile, you can also see private lists of members that you&#039;ve added to your Friends or Ignore lists. When you add other members to your Ignore list, the messages that they&#039;ve posted won&#039;t be displayed to you.</div>");
		newWindow.document.write("<img src='http://a820.g.akamai.net/f/820/822/1d/i.ivillage.co.uk/uk_en/boards/images/uk_popup_logo.gif' width=103 height=25 border=0 align=right><a href='javascript: this.window.close();' class=darkBlueSmallText>Click here to close this window</a></div>");
		newWindow.document.write("</body></html>"); 
		newWindow.document.close(); 
		newWindow.focus(); 
	} 

	// === CREATE MY BOARD SETTINGS ===
	function drawBoardSettings () {  
		newWindow = window.open("", "", "height=190,width=500,scrollbars=no,resizable=no"); 
		newWindow.document.write("<html><head><title>Create my board settings?</title>");
		generate_popup_css();
		newWindow.document.write("</head><body bgcolor=ffffff>");
		newWindow.document.write("<div class=darkBlueHeaderText>Create my board settings?</div>");
		newWindow.document.write("<div class=darkBlueText>Right next to <b>Welcome</b> at the top of message board pages, you&#039;ll see a link to <b>board settings</b>. Board settings allows you to set your preferences so you receive automatic notifications whenever someone responds to a post that you&#039;ve written. You can also decide whether you want boards where you&#039;ve posted messages to be automatically included on your Favourite Boards list. The Board Settings page is private - you are the only one who can access it.</div>");
		newWindow.document.write("<img src='http://a820.g.akamai.net/f/820/822/1d/i.ivillage.co.uk/uk_en/boards/images/uk_popup_logo.gif' width=103 height=25 border=0 align=right><a href='javascript: this.window.close();' class=darkBlueSmallText>Click here to close this window</a></div>");
		newWindow.document.write("</body></html>"); 
		newWindow.document.close(); 
		newWindow.focus(); 
	} 

	// === FAQ ===
	function drawFAQ () {  
		newWindow = window.open("", "", "height=190,width=500,scrollbars=yes,resizable=no"); 
		newWindow.document.write("<html><head><title>Frequently asked questions?</title>");
		generate_popup_css();
		newWindow.document.write("</head><body bgcolor=ffffff>");
		newWindow.document.write("<div class=darkBlueHeaderText>Frequently asked questions?</div>");
		newWindow.document.write("<div class=darkBlueText><b>Why are you changing the message boards?</b> The new boards offer a host of brilliant new features that are not possible on the old system. These include email notification when you receive a reply to one of your messages, search, easier posting and the option to ignore certain members if you wish to. What will happen to the old messages? We are transferring all our old messages to our new system. You will be able to read, search, print and bookmark old messages: however you wont be able to reply to archived messages.<p><b>Why do old discussions keep moving to the top of the board?</b> Whenever someone replied to a message, the message instantly moves to the top of the board. This means that lively conversations stay near the top of the board. If you post a message but it doesn&#039;t get any replies, you can move it to the top of the list again by adding another message to it yourself.<p><b>What if I don&#039;t want my posts to be searchable?</b> Messages posted on the Internet have never been private. Every day, thousands of lurkers read our messages boards and members should always be mindful of this when posting personal information. One way to protect your identity is to create a separate member name when you are discussing a sensitive issue.<p><b>Will I be able to edit or delete my messages after I have posted them?</b> No, once a message has been submitted you will not be able to alter or delete it. Before posting, you will be able to &#039;preview&#039; your message, so please make sure you are happy with it at that stage.<p><b>Why do I have to fill in a new profile?</b> The new profile pages are integrated with the new board system. The good news is that the new profile page has lots of advanced features. When viewing another person&#039;s profile, you can automatically add him or her to your friends list or opt to ignore all messages by that member.<p><b>How do I get email notification?</b> To receive notification that a message you have posted has received a reply go to board settings and tick the box next to E-mail Notification.<p><b>How do I change the time zone?</b> To receive notification that a message you have posted has received a reply go to board settings and choose the correct time zone from the Time Zone drop down.<p><b>How do I get a personal icon to appear next to my name each time I post?</b> To receive notification that a message you have posted has received a reply go to board settings &gt; Personal Icon. Click, Change Icon. Select the icon you would like to use then tick the Use Personal Icon box.</div>");
		newWindow.document.write("<img src='http://a820.g.akamai.net/f/820/822/1d/i.ivillage.co.uk/uk_en/boards/images/uk_popup_logo.gif' width=103 height=25 border=0 align=right><a href='javascript: this.window.close();' class=darkBlueSmallText>Click here to close this window</a></div>");
		newWindow.document.write("</body></html>"); 
		newWindow.document.close(); 
		newWindow.focus(); 
	} 
