var userName = new Array();  
userName[0]="toddleinfo"; 
userName[1]="carla"; 
userName[2]="toddlesales";
userName[3]="toddleinfo"; 
userName[4]="toddleinfo"; 
userName[5]="tuksubscription";
userName[6]="tcosubscription";
userName[7]="tukadmin";
userName[8]="toddleweb";
userName[9]="yummy";

var userNameFull = new Array(); 
userNameFull[0]="E-Mail Us"; 
userNameFull[1]="The ToddleBabe";
userNameFull[2]="Sales Department"; 
userNameFull[3]="Information";
userNameFull[4]="Information"; 
userNameFull[5]="E-mail our Subscription Manager";
userNameFull[6]="E-mail our Subscription Manager";
userNameFull[7]="E-mail our Us";
userNameFull[8]="E-mail our Webmaster";
userNameFull[9]="E-mail our YummyMummy Editor";

var userSubject= new Array()
userSubject[0]="Query from ToddleBabes Website"; 
userSubject[1]="Hi, Carla - Here's a Message from the ToddleBabes.co.uk Website";
userSubject[2]="Query for ToddleBabes Sales Department"; 
userSubject[3]="ToddleBabes Information Query";
userSubject[4]="ToddleBabes Information Query"; 
userSubject[5]="Subscription Query from ToddleBabes.co.uk Website - Name: please add your name here";
userSubject[6]="Subscription Query from ToddleBabes.co.uk Website - Name: please add your name here";
userSubject[7]="Query from ToddleBabes.com Website";
userSubject[8]="Technical Support Query from ToddleBabes.co.uk Website";
userSubject[9]="YummyMummy Query from ToddleBabes.co.uk Website";

var siteName = "toddlebabes.co.uk?subject=";
i=0;
do userName[i]='<a href=\"mailto:' + userName[i] + '@' + siteName + userSubject[i] +'\">' + userNameFull[i] + '</a>';
while(userName[++i]);
// end of email section

//OPENS BLOG WINDOW ONCE

function openABlogWindow(theURL,winName,features) { //v2.0
// check if window already exists
if (!ANewBlogWindow || ANewBlogWindow.closed) {
// store new ANewWindow in global var
ANewBlogWindow = window.open(theURL,winName,features);
} else {
//ANewBlogWindow.location = theURL;
ANewBlogWindow.focus();
}
}
//–>

//OPENS FORUM WINDOW ONCE

function openAForumWindow(theURL,winName,features) { //v2.0
// check if window already exists
if (!ANewForumWindow || ANewForumWindow.closed) {
// store new ANewWindow in global var
ANewForumWindow = window.open(theURL,winName,features);
} else {
ANewForumWindow.location = theURL;
ANewForumWindow.focus();
}
}
//->

// OPEN NEW MYWINDOW
var abc;
function mywindow(myurl, myname, nwidth){
abc=window.open(myurl, myname, nwidth);
abc.focus();
return false;
}

// SIGNUP SCREEN WINDOW
var signupwindow;
function mysignupwindow(signuppage)
{
         var windowFeatures="left=40,top=50,width=920,height=525 menubar=no,toolbar=no,statusbar=no,scrollbars,resizable";
         signupwindow = window.open(signuppage,"signupnumbers",windowFeatures);
         signupwindow.focus();
         return false;
}


//SCROLLING NEW WINDOW
var myscrollwindow;
function myscrollwindow(myscrollpage)
{
         var windowFeatures="left=25,top=50,width=950,height=550,scrollbars,menubar=yes,toolbar=yes,resizable";
         myscrollwindow = window.open(myscrollpage,"myscrollnumbers",windowFeatures);
         myscrollwindow.focus();
         return false;
}



/********************************************************
* Hide status bar msg II script- by javascriptkit.com 
* Visit JavaScript Kit (http://javascriptkit.com) for script
* Credit must stay intact for use automatically executes this when reading the js file
************************************************* */
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

/***************************************************
* this writes the toddlebabes Cookie
*************************************************/

/************ looks for the toddlebabes and toddleUser cookie to see if visitor has already subscribed ******************/
function GetCookie(name)
{
    var start = document.cookie.indexOf(name+"=");
    var len = start+name.length+1;
    if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
    if (start == -1) return null;
    var end = document.cookie.indexOf(";",len);
    if (end == -1) end = document.cookie.length;
    return unescape(document.cookie.substring(len,end));
}

/********** sets the values for the toddlebabes cookie ********************************/
function DoSetCookie(name,value,expires,path,domain,secure)
{
    document.cookie = name + "=" +escape(value) +
        ( (expires) ? ";expires=" + expires.toGMTString() : "") +
        ( (path) ? ";path=" + path : "") + 
        ( (domain) ? ";domain=" + domain : "") +
        ( (secure) ? ";secure" : "");
}

/********* writes a permanent toddlebabes cookie for subscription **************************/
function SetPermCookie (name, value){
	var now = new Date(); 
	var expval = new Date(); 
	expval.setTime(now.getTime() + (999 *24*3600000));
	DoSetCookie (name, value, expval, "/");
	DoSetCookie("toddleUser", document.fForm.f.value,expval,"/");
    return true;
}


/************* checks to see if toddlebabes cookie exits if it does bypasses the signupform and goes to thanks html page****/
function Loadtoddlebabes(cGoHere){
var name = 'toddlebabes';
if (name != ''  &&  GetCookie(name) == 1) { document.location.replace(cGoHere)};
}


/***** checks to see if toddleUser cookie has been set and uses name or uses friend in html text*********/
function myGetUser(){
var cName = 'Friend';

if (GetCookie("toddleUser") == null) {
   return (cName); 
   } 
else {
	 return (GetCookie("toddleUser"));
	 }
} 


  
  
/*TO OPEN A NEW WINDOW WITH AN EMAIL ADDRESS TELLAFRIEND*/
var smallwindow;
function mySmallWindow(smallpage)
{
         var windowFeatures="left=0,top=300,width=900,height=400";
         smallwindow = window.open(smallpage,"smallinfo",windowFeatures);
         smallwindow.focus();
         return false;
}



/*OPEN A NEW WINDOW TO DISPLAY INDIVIDUAL SIGNUP PAGES AND LP STUFF*/
var maxwindow;
function mymaxwindow(mypage)
{
         var windowFeatures="scrollbars,menubar,left=1,top=1,width=1024,height=768,resizable";
         maxwindow = document.location.replace(mypage,"mydetails",windowFeatures);
         maxwindow.focus();
         return false;
}


		 

/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
                
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      

/****************TO PUT IN THE DATE*/
function myDate() {
today=new Date();
today.setDate(today.getDate()-3);
day=today.getDate();
year=today.getFullYear();
month=today.getMonth()+1;
if (day==1) end=("st");
else if (day==2) end=("nd");
else if (day==3) end=("rd");
else if (day==21) end=("st");
else if (day==22) end=("nd");
else if (day==23) end=("rd");
else if (day==31) end=("st");
else end=("th");
if (month==1) cname=("January");
else if (month==2) cname=("February");
else if (month==3) cname=("March");
else if (month==4) cname=("April");
else if (month==5) cname=("May");
else if (month==6) cname=("June");
else if (month==7) cname=("July");
else if (month==8) cname=("August");
else if (month==9) cname=("September");
else if (month==10) cname=("October");
else if (month==11) cname=("November");
else cname=("December");
/*if (year<100) year="19" + year;*/
document.write(cname + " " + day + end + ", " + year);
}


