/*
COPYRIGHT    Copyright (c) 2010 Optimised Web Design
RIGHTS       The contents and design of these pages are the property of
             the copyright holder who grants no rights for copying,
             distribution or reselling without prior written agreement.
PROJECT      Bridgnorth Golf Club
AUTHOR       Optimised Web Design, Philip Kay
ADDRESS      Duken House, Wootton, Bridgnorth, WV15 6EA, UK
TEL          +44 (0) 1746 781 653
FAX          +44 (0) 1746 781 667
MOBILE       +44 (0) 7711 317 681
EMAIL        kay@osltd.co.uk
*/


var Bgc = new Cookie(document, "bgc", 1); // 1 day
Bgc.load();
Bgc.status = false;
if(!Bgc.status) Bgc.status = 'open';
Bgc.store();

var showwin;
var formwin;
var picturewin;
var multimapwin;
var panoramawin;

function pdf(Url){
	Args = 'left=0,top=0,screenX=0,screenY=0,width=450,height=640,resizable=yes,scrollbars';
	if((typeof pdfwin) != "undefined") pdfwin.close();
	pdfwin = window.open('pdfs/'+Url, 'pdf', Args);
}

function show(Url){
	Args = 'left=0,top=0,width=680,height=600,screenX=0,screenY=0,outerWidth=680,outerHeight=600,resizable=yes,scrollbars';
	if((typeof showwin) != "undefined") showwin.close();
	showwin= window.open(Url, 'show', Args);
}

function form(Url){
	Args = 'left=0,top=0,screenX=0,screenY=0,width=680,height=600,resizable=yes,menubar,scrollbars';
	if((typeof formwin) != "undefined") formwin.close();
	formwin = window.open('forms/'+Url, 'form', Args);
}

function portrait(Url, Title){
	Args = 'left=0,top=0,screenX=0,screenY=0,width=384,height=512,resizable=no';
	if((typeof picturewin) != "undefined") picturewin.close();
	picturewin = window.open('', 'picture', Args);
	picturewin.document.writeln('<html><title>Bridgnorth Golf Club: '+Title+'</title><body leftmargin=0 topmargin=0>');
	picturewin.document.writeln('<img src='+Url+' width=384 height=512 border=0>');
	picturewin.document.writeln('</body></html>');
}

function landscape(Url, Title){
	Args = 'left=0,top=0,screenX=0,screenY=0,width=512,height=384,resizable=no';
	if((typeof picturewin) != "undefined") picturewin.close();
	picturewin = window.open('', 'picture', Args);
	picturewin.document.writeln('<html><title>Bridgnorth Golf Club: '+Title+'</title><body leftmargin=0 topmargin=0>');
	picturewin.document.writeln('<img src='+Url+' width=512 height=384 border=0>');
	picturewin.document.writeln('</body></html>');
}

function multimap(Url){
	Args = 'left=0,top=0,screenX=0,screenY=0,width=870,height=600,resizable=yes,scrollbars';
	if((typeof multimapwin) != "undefined") multimapwin.close();
	multimapwin = window.open(Url, 'multimap', Args);
}

function panorama(Url, Title){
	Args = 'left=0,top=0,screenX=0,screenY=0,width=400,height=320,resizable=no';
	if((typeof panoramawin) != "undefined") panoramawin.close();
	panoramawin = window.open('', 'panorama', Args);
	panoramawin.document.writeln('<html><title>Bridgnorth Golf Club: '+Title+'</title><body leftmargin=0 topmargin=0>');
	panoramawin.document.writeln('<applet archive=ptviewer.jar code=ptviewer.class width=400 height=320>');
	panoramawin.document.writeln('<param name=file value="'+Url+'">');
	panoramawin.document.writeln('<param name="auto" value="1">');
	panoramawin.document.writeln('<param name="frame" value="panorama/control.gif">');
	panoramawin.document.writeln('<param name="shotspot0" value="x330 y306 a344 b320 u\'ptviewer:startAutoPan(1,0,1)\'">');
	panoramawin.document.writeln('<param name="shotspot1" value="x344 y306 a358 b320 u\'ptviewer:stopAutoPan()\'">');
	panoramawin.document.writeln('<param name="shotspot2" value="x358 y306 a372 b320 u\'ptviewer:startAutoPan(-1,0,1)\'">');
	panoramawin.document.writeln('<param name="shotspot3" value="x372 y306 a386 b320 u\'ptviewer:startAutoPan(0,0,0.9)\'">');
	panoramawin.document.writeln('<param name="shotspot4" value="x386 y306 a400 b320 u\'ptviewer:startAutoPan(0,0,1.1)\'">');
	panoramawin.document.writeln('</applet>');
	panoramawin.document.writeln('</body></html>');
}

function over(Id){
	document.getElementById(Id).bgColor = '#FFFFFF';
	document.getElementById(Id).style.color = '#F7A500';
}

function out(Id){
	document.getElementById(Id).bgColor = '#005100';
	document.getElementById(Id).style.color = '#FFFFFF';
}

function mover(Id){
	document.getElementById(Id).bgColor = '#FFFFFF';
	document.getElementById(Id).style.color = '#F7A500';
}

function mout(Id){
	document.getElementById(Id).bgColor = '#005100';
	document.getElementById(Id).style.color = '#FFFFFF';
}

function mdown(File){
	location = File;
}


