function jwaStripe(backgroundset,pagebg) {

backgroundset=backgroundset.toLowerCase();
//background selection
var bgsrc=new Array();
var bgset=new Array();

bgsrc[0]='wood01.jpg';
bgset[0]='light wood';
bgsrc[1]='wood02a.jpg';
bgset[1]='dark wood';
bgsrc[2]='wood03.jpg';
bgset[2]='light wood';
bgsrc[3]='wood04.jpg';
bgset[3]='dark wood';
bgsrc[4]='#f90066';
bgset[4]='strong colour pink';
bgsrc[5]='#ffffff';
bgset[5]='strong colour white';
bgsrc[6]='wood03p.jpg';
bgset[6]='pale wood';
bgsrc[7]='wood05.jpg';
bgset[7]='light wood';
bgsrc[8]='wood05p.jpg';
bgset[8]='pale wood';
bgsrc[9]='wood06.jpg';
bgset[9]='light wood';
bgsrc[10]='wood06p.jpg';
bgset[10]='pale wood';
bgsrc[11]='wood07.jpg';
bgset[11]='dark wood';
bgsrc[12]='wood07p.jpg';
bgset[12]='pale wood';
bgsrc[13]='wood08.jpg';
bgset[13]='dark wood';
bgsrc[14]='#000000';
bgset[14]='strong colour black';
bgsrc[15]='#dcdcdc';
bgset[15]='light colour grey';
bgsrc[16]='#daa520';
bgset[16]='strong colour gold';
bgsrc[17]='#2f4f4f';
bgset[17]='strong colour slate';
//bgsrc[17]='painted_new1.jpg';
//bgset[17]='painted';
bgsrc[18]='#faebd7';
bgset[18]='pale colour';
bgsrc[19]='#e0ffff';
bgset[19]='light colour light cyan';
bgsrc[20]='#d2b48c';
bgset[20]='light colour tan';
bgsrc[21]='#20b2aa';
bgset[21]='strong colour dodger blue';
bgsrc[22]='#ffff66';
bgset[22]='strong colour lemon';
bgsrc[23]='wood09.jpg';
bgset[23]='dark wood';
bgsrc[24]='wood10.jpg';
bgset[24]='light wood';
bgsrc[25]='wood10p.jpg';
bgset[25]='pale wood';
bgsrc[26]='wood11.jpg';
bgset[26]='hold';
bgsrc[27]='metal01.jpg';
bgset[27]='metal strong colour';
bgsrc[28]='metal02.jpg';
bgset[28]='metal strong colour';
bgsrc[29]='#faf0e6';
bgset[29]='pale colour linen';
bgsrc[30]='#faebd7';
bgset[30]='pale colour antiquewhite';
bgsrc[31]='#fdf5e6';
bgset[31]='pale colour oldlace';
bgsrc[32]='painted1.jpg';
bgset[32]='painted';
//bgsrc[33]='painted_new2';
//bgset[33]='painted';
//bgsrc[34]='wood13.jpg';
//bgset[34]='hold';

//bgsrc[37]='greenwood1.jpg';
//bgset[37]='painted';

bgoptions=bgsrc.length;

//choose background
bgchoice=0;

bgchoice=Math.floor(Math.random()*bgoptions);

while(backgroundset!='all') {
	bgchoice=Math.floor(Math.random()*bgoptions);
	if (bgset[bgchoice].indexOf(backgroundset)!=-1) {
	break; 
	}
}

rootstring='jwa_images/bg/';
chosensrc=rootstring+bgsrc[bgchoice];

if (pagebg) {
//set page background
if (bgsrc[bgchoice].indexOf('#')==-1) {
	//image stripe
	document.write('<body style="background: url('+chosensrc+') fixed; width: 100%" topmargin="0" leftmargin="0" onload="runSlideShow();">');
	}
	else {
	//color stripe
	document.write('<body style="background-color: '+bgsrc[bgchoice].substring(1,7)+'; width: 100%" topmargin="0" leftmargin="0" onload="runSlideShow();">');
	}

} else {
//set stripe background
if (bgsrc[bgchoice].indexOf('#')==-1) {
	//image stripe
	document.write('<tr valign="middle" style="background: url('+chosensrc+') fixed">');
	}
	else {
	//color stripe
	document.write('<tr valign="middle" style="background-color: '+bgsrc[bgchoice].substring(1,7)+'">');
	}

//end fucntion
}
}


function jwaStripes(stripes) {

stripes=stripes.toLowerCase();
//background selection
var bgsrc=new Array();
var bgset=new Array();

bgsrc[0]='wood01.jpg';
bgset[0]='light wood';
bgsrc[1]='wood02.jpg';
bgset[1]='dark wood';
bgsrc[2]='wood03.jpg';
bgset[2]='light wood';
bgsrc[3]='wood04.jpg';
bgset[3]='dark wood';
bgsrc[4]='#f90066';
bgset[4]='strong colour pink';
bgsrc[5]='#ffffff';
bgset[5]='strong colour white';
bgsrc[6]='wood03p.jpg';
bgset[6]='pale wood';
bgsrc[7]='wood05.jpg';
bgset[7]='light wood';
bgsrc[8]='wood05p.jpg';
bgset[8]='pale wood';
bgsrc[9]='wood06.jpg';
bgset[9]='light wood';
bgsrc[10]='wood06p.jpg';
bgset[10]='pale wood';
bgsrc[11]='wood07.jpg';
bgset[11]='dark wood';
bgsrc[12]='wood07p.jpg';
bgset[12]='pale wood';
bgsrc[13]='wood08.jpg';
bgset[13]='dark wood';
bgsrc[14]='#000000';
bgset[14]='strong colour black';
bgsrc[15]='#dcdcdc';
bgset[15]='light colour grey';
bgsrc[16]='#daa520';
bgset[16]='strong colour gold';
bgsrc[17]='#2f4f4f';
bgset[17]='strong colour slate';
bgsrc[18]='#7fff00';
bgset[18]='strong colour chartreuse';
bgsrc[19]='#fafad2';
bgset[19]='pale colour';
bgsrc[20]='#faebd7';
bgset[20]='pale colour';
bgsrc[21]='#e0ffff';
bgset[21]='light colour light cyan';
bgsrc[22]='#d2b48c';
bgset[22]='light colour tan';
bgsrc[23]='#20b2aa';
bgset[23]='strong colour dodger blue';
bgsrc[24]='#ffff66';
bgset[24]='strong colour lemon';
bgsrc[25]='wood09.jpg';
bgset[25]='dark wood';
bgsrc[26]='wood10.jpg';
bgset[26]='light wood';
bgsrc[27]='wood10p.jpg';
bgset[27]='pale wood';
bgsrc[28]='wood11.jpg';
bgset[28]='dark wood';
bgsrc[29]='metal01.jpg';
bgset[29]='metal strong colour';
bgsrc[30]='metal02.jpg';
bgset[30]='metal strong colour';
bgsrc[31]='#faf0e6';
bgset[31]='pale colour linen';
bgsrc[32]='#faebd7';
bgset[32]='pale colour antiquewhite';
bgsrc[33]='#fdf5e6';
bgset[33]='pale colour oldlace';

bgoptions=bgsrc.length;

var backgroundset='?';
var current='?';
var force=null;

//find window size
winW=640;
winH=480;
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
		winW = window.innerWidth;
		winH = window.innerHeight;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1) {
		winW = document.body.offsetWidth;
		winH = document.body.offsetHeight;
		}
	}

var toff=0;
var loff=0;
var boff=winH;
var roff=winW;
si=100;

while(current!='*') {
	//new stripe
	si++;

	pos=stripes.substring(0,1);
	size=parseFloat(stripes.substring(1,4));
	current=stripes.substring(4,stripes.length);
	backgroundset=current.substring(0,current.indexOf(','));
	current=current.substring(backgroundset.length+1,current.length);
	stripes=current;

	//choose background
	bgchoice=0;
	
	bgchoice=Math.floor(Math.random()*bgoptions);
	
	while(backgroundset!='all') {
		bgchoice=Math.floor(Math.random()*bgoptions);
		if (bgset[bgchoice].indexOf(backgroundset)!=-1) {
		break; 
		}
	}
	
	rootstring='jwa_images/bg/';
	chosensrc=rootstring+bgsrc[bgchoice];
	
	//write stripe
	stripe_id='stripe'+si;
		
	if (bgsrc[bgchoice].indexOf('#')==-1) {
		//image stripe
		if(pos=='t') {
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: '+toff+'px; left: 0px; width: 100%; height: '+size+'px; background: url('+chosensrc+') fixed; z-index:'+si+';"></div>');
			toff=toff+size;
			}
		if(pos=='b') {
			boff=boff-size;
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: '+boff+'px; left: 0px; width: 100%; height: '+size+'px; background: url('+chosensrc+') fixed; z-index:'+si+';"></div>');
			}
		if(pos=='l') {
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: 0px; left: '+loff+'px; height: 100%; width: '+size+'px; background: url('+chosensrc+') fixed; z-index:'+si+';"></div>');
			loff=loff+size;
			pos='r'; si=si+1;
			}
		if(pos=='r') {
			roff=roff-size;
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: 0px; left: '+roff+'px; height: 100%; width: '+size+'px; background: url('+chosensrc+') fixed; z-index:'+si+';"></div>');
			}
		}
		else {
		//color stripe
		if (pos=='t') {
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: '+toff+'px; left: 0px; width: 100%; height: '+size+'px; background-color: '+bgsrc[bgchoice].substring(1,7)+'; z-index:'+si+';"></div>');
			toff=toff+size;
			}
		if (pos=='b') {
			boff=boff-size;
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: '+boff+'px; left: 0px; width: 100%; height: '+size+'px; background-color: '+bgsrc[bgchoice].substring(1,7)+'; z-index:'+si+';"></div>');
			}
		if (pos=='l') {
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: 0px; left: '+loff+'px; height: 100%; width: '+size+'px; background-color: '+bgsrc[bgchoice].substring(1,7)+'; z-index:'+si+';"></div>');
			loff=loff+size;
			pos='r'; si=si+1;
			}
		if (pos=='r') {
			roff=roff-size;
			document.write ('<div id="'+stripe_id+'" style="position: absolute; top: 0px; left: '+roff+'px; height: 100%; width: '+size+'px; background-color: '+bgsrc[bgchoice].substring(1,7)+'; z-index:'+si+';"></div>');
			}
		}
//end main loop
}

//end fucntion
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  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]; 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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function redirectNetscape() {
	if (navigator.appName=="Netscape") {
		window.open('jwa_home.php','noscroll','scrollbars=no');
		}
}

function leftSpacer(width) {
	var spcW=40;
	if (width!=null) {
		spcW=width;
		}
	document.write('<td><img src="jwa_images/x.gif" width="'+spcW+'" height="1"></td>');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function fullScreen() {
self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);
}