

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



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

defaultStatus		= 'www.poppydog.co.uk';
pagelink		= document.location
pagename		= document.title

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

events			= 'Next events: Oct 16th - Nov 20th - Dec 18th'
news			= 'Next event: October 16th ... <br><br><a href="/news.htm">More </a>&gt;&gt;'
magazine		= 'Web Magazine: Fun Articles and Reviews from the Wendy House world...<br><br><a href="/cgi-bin/cms/magazine/index.cgi">More</a> &gt;&gt;'
comps			= 'Enter our great HIM competition. Complete the quote to win ... <br><br><a href="/competitions.htm">Enter Competition</a> &gt;&gt;'
features		= 'Send your friends a virtual card... <br><br><a href="/postcard/index.html">Send a Wendy House postcard</a> &gt;&gt;'
email			= '<a href="mailto:info@poppydog.co.uk?subject=Poppydog Web Site Comment"><span class="bartext">info@poppydog.co.uk</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,3);

if (choice==1)

document.write('<a href="http://www.flexicose4u.co.uk"><img src="images/banners/10-dog-arthritis.gif" alt="Pet Arthritis" width="468" height="60" border="0" align="top"></a>');

else if (choice == 2)

document.write('<a href="http://www.flexicose4u.co.uk"><img src="images/banners/12-dog-cat-arthritis-white.gif" alt="Dog Cat Arthritis" width="468" height="60" border="0"></a>');

else if (choice == 3)

document.write('<a href="http://www.flexicose4u.co.uk"><img src="images/banners/10-dog-protection.gif" alt="Cat Glucosamine" width="468" height="60" border="0"></a>');

}


/* ====================================================
ATHELETE TILES
==================================================== */
function athelete_tile()

{
var choice = GetRandom(1,4);

if (choice==1)

document.write('<a href="http://www.flexicose4u.co.uk"><img src="images/banners/4-pharma-quality.gif" alt="Liquid Joint Complex" width="468" height="60" border="0"></a>');

else if (choice == 2)

document.write('<a href="http://www.flexicose4u.co.uk"><img src="images/banners/3-pharma-quality-yellow.gif" alt="Joint Care" width="468" height="60" border="0"></a>');

else if (choice == 3)

document.write('<a href="http://www.flexicose4u.co.uk"><img src="images/banners/2-rebuild-and-protect.gif" alt="Glucosamine Chondroitin" width="468" height="60" border="0"></a>'); 

else if (choice == 4)

document.write('<a href="http://www.flexicose4u.co.uk"><img src="images/banners/2-rebuild-and-protect-yellow.gif" alt="Rebuild Joints" width="468" height="60" border="0"></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 + "");
}


