/* 	Development:	ARTware-Software.com
	Project:	Amsterdam Writing Workshops website
	File: 		AWW_quote_js.js
	Version: 	1.0 
	Description:	Javascript support page for Quotes
*/

var sel    = 0
var numCol = 3
var backCol= new Array("RGB|bkg|","#DEFFFF|tur|","#DEDEFF|lav|","#FFFFBE|yel|")

function selQuote() {
    sel = 1 + Math.floor( (Math.random()*numCol) )
    var col = backCol[sel]
    info = col.split('|')
    var txt = '<!-- Top Background -->'
    txt += '<tr valign=bottom><td height=25 colspan=3>'
    txt += '<img src=images/aww_bg-' + info[1] + '_top.png border=0></td></tr>'
    txt += '<!-- Left Side -->'
    txt += '<tr valign=top><td height=636 width=53>'
    txt += '<img src=images/aww_bg-' + info[1] + '_left.png border=0></td>'
    txt += '<td width=850 height=580 bgcolor=' + info[0]
    txt += '><table height=416 width=850 cellpadding=0 cellspacing=0 border=0>'
    txt += '<tr valign=top><td><a HREF=/cgi-bin/test/AWW_ws.pl><SPAN class=quote>'
    txt += RandomQuote + '</SPAN></a><SPAN class=auth> — ' + Author + '</SPAN>'
    txt += '<!--- End Top CONTENT ---------------------------------------------------------- -->'
    txt += '</a></td></tr></table>'
    document.write(txt)
}

function finishQuote() {
    var txt = '</td><td height=636 align=left width=53>'
    txt += '<!-- Right Side -->'
    txt += '<img src=images/aww_bg-' + info[1] + '_right.png border=0></td></tr>'
    txt += '<!-- Bottom Background -->'
    txt += '<tr valign=top><td height=25 colspan=3>'
    txt += '<img src=images/aww_bg-' + info[1] + '_bottom.png border=0>'
    txt += '</td></tr></table>'
    document.write(txt)
}
