

//Copyright John Mounsey, Peaknet ltd. Ta mate!



/* ====================================================
General Site variables script
==================================================== */

defaultStatus		= 'www.thewendyhouse.org';
pagelink		= document.location
pagename		= document.title

/* ====================================================
COLUMN VARIABLES
==================================================== */

events			= 'Next events: <a href="http://www.thewendyhouse.org/news.htm">April 17th</a>, May 15th, Jun 19th'
news			= 'Next event: Aptil 17th<br><br><a href="/news.htm">More </a>&gt;&gt;'
magazine		= 'Map and Directions: Find the home of The Wendy House...<br><br><a href="http://www.thewendyhouse.org/map.html">More</a> &gt;&gt;'
comps			= 'Enter our great competition. Complete the quote and win free entry ... <br><br><a href="/competitions.htm">Enter Competition</a> &gt;&gt;'
features		= 'Subscribe to our new Newsletter... <br><br><a href="http://www.thewendyhouse.org/newsletter.htm">More</a> &gt;&gt;'
email			= '<a href="mailto:info@thewendyhouse.org?subject=Wendyhouse Web Page Comment"><span class="bartext">info@thewendyhouse.org</span></a>'

/* ====================================================
RND FUNC
==================================================== */

function GetRandom(start,end)
{
  var range = end - start + 1;
  var result = start + Math.floor(Math.random()*range);
  return result;
}

/* ====================================================
LEFT TILES
==================================================== */
function left_tile()

{
var choice = GetRandom(1,4);

if (choice==1)

document.write('<A HREF="http://www.thewendyhouse.org/stickers.htm"><img src="/gfx/tiles/stickers-tile.gif" width="120" height="80" alt="New Wendy House window stickers" border="1" class="formbox"></A>');

else if (choice == 2)

document.write('<A HREF="http://www.thewendyhouse.org/newsletter.htm"><img src="/gfx/tiles/newsletter-tile.gif" width="120" height="80" alt="Subscribe to the new newsletter system here" border="1" class="formbox"></A>');

else if (choice == 3)

document.write('<A HREF="http://www.thewendyhouse.org/stickers.htm"><img src="/gfx/tiles/stickers-tile.gif" width="120" height="80" alt="New Wendy House window stickers" border="1" class="formbox"></A>');


else if (choice == 4)

document.write('<A HREF="http://www.thewendyhouse.org/stickers.htm"><img src="/gfx/tiles/stickers-tile.gif" width="120" height="80" alt="New Wendy House window stickers" border="1" class="formbox"></A>');




}


/* ====================================================
RIGHT TILES
==================================================== */
function right_tile()

{
var choice = GetRandom(1,5);

if (choice==1)

document.write('<A HREF="http://www.musicnonstop.co.uk/"><img src="/gfx/tiles/mns.gif" width="120" height="80" alt="Music Non Stop - click here for the new shop" border="1" class="formbox"></A>');


else if (choice == 2)

document.write('<A HREF="http://www.rockyhorrors.co.uk/"><img src="/gfx/tiles/rockyhorrors.gif" width="120" height="80" alt="Rocky Horrors - Alternative Clothing, Footwear and Accessories" border="1" class="formbox"></A>');

else if (choice == 3)

document.write('<A HREF="http://www.thewendyhouse.org/newsletter.htm"><img src="/gfx/tiles/newsletter-tile.gif" width="120" height="80" alt="Subscribe to the new newsletter system here" border="1" class="formbox"></A>');

else if (choice == 4)

document.write('<A HREF="http://www.mutate.info/"><img src="/gfx/tiles/mutate_tile.gif" width="120" height="80" alt="The Mutate Room - click here for info on our 2nd floor" border="1" class="formbox"></A>');

else if (choice == 5)

document.write('<A HREF="http://www.thewendyhouse.org/newsletter.htm"><img src="/gfx/tiles/newsletter-tile.gif" width="120" height="80" alt="Subscribe to the new newsletter system here" border="1" class="formbox"></A>');


}


/* ====================================================
BOOKMARK tool
==================================================== */

function bookmark()

{
	if (window.external)
	{
	external.AddFavorite(pagelink,pagename)
	}
	
	else if(navigator.appName == "Netscape")
	{
	alert('press control and D now!')
	}

	else if(navigator.appName == "Opera")
	{
	alert('press control and T now!')
	}
}


/* ====================================================
SENDPAGE tool
==================================================== */

function sendlink()

{
window.location='mailto:?subject=I saw this and thought of you!&body=' + pagename + ' : ' + pagelink
}

function previous() { history.go(-1); }
function say(message) { status=message; }



/* ====================================================
The current YEAR
==================================================== */

var now  = new Date
thisyear = now.getYear()
if (thisyear <= 1900) {thisyear = thisyear + 1900}

/* ====================================================
MM FUNCTIONS
==================================================== */


//pop up function


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
 /* Functions that shows hides layer. */
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; if(!(x=d[n])&&d.getElementById) x=d.getElementById(n);
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}


function MM_showHideLayers() {
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function launchwin(url, scrollo) {
    var larg_schermo = screen.availWidth - 10;
    var altez_schermo = screen.availHeight - 120;
    window.open(url, "WindowName", "width=" + larg_schermo + ",height=" + altez_schermo + ",top=0,left=0,scrollbars=" + scrollo + "");
}

