
// quicklinks.js
// Quicklinks sidebar component.

var res

function getRandom() {
    	return Math.random();
}



function extraIncrement(v) {
	vboolean=4;

	if (v < counter){
		while (vboolean > 3 || vboolean == 0){
			rndDecimal=getRandom()
			vboolean=(Math.round(rndDecimal*10));
		}

		if (vboolean == 1){
			res = v + 0;
		}

		vincrement=11;

		if (vboolean == 2){
			while (vincrement > 10){
				rndDecimal=getRandom()
				vincrement=(Math.round(rndDecimal*10));
			}

			res = 10 + vincrement;
		}

		if (vboolean == 3){
			vincrement = 6

			while (vincrement > 5){
				rndDecimal=getRandom()
				vincrement=(Math.round(rndDecimal*10));
			}

			res = 20 + vincrement
		}
	}
}

counter=26;
m=counter;
n=counter;

arrQuickLinks = new Array(25);

while (m >= counter){
	rndDecimalm=getRandom();
	m=(Math.round(rndDecimalm*10));
}
extraIncrement(m);
m=res
//alert(m);

z=0

while (z==0){
	rndDecimalm=getRandom();
	n=(Math.round(rndDecimalm*10));
	extraIncrement(n);
	n=res;
	if (n!=m && n<counter){
		z=1;
	}
}

arrQuickLinks[0]="Muslims and Christians: who's right? Discuss it at <a href='http://www.debate.org.uk/' TARGET='NEWIN'>The Debate</a>."
arrQuickLinks[1]="There are just <a href='http://www.matthiasmedia.com.au/2wtl/index.html' TARGET='NEWIN'>two ways to live</a>. Which one are you?"
arrQuickLinks[2]="Science & Religion: opposites? <a href='http://www.csis.org.uk/' target='NEWIN'>Christian Students in Science</a>."
arrQuickLinks[3]="What on earth is <a href='gospel.html'>Christianity</a> about anyway?"
arrQuickLinks[4]="Plain and simple: an <a href='intro.html'>introduction</a> to CenterWeb"
arrQuickLinks[5]="How we've progressed: the <a href='status.html'>site status</a> report."
arrQuickLinks[6]="Get <a href='adv.html'>good advice</a> on anything you want from the Teen advice Line."
arrQuickLinks[7]="Find out the answers to <a href='http://www.senet.com.au/hot/www.htm' target='NEWIN'>questions that make Christians Squirm</a>."
arrQuickLinks[8]="Affordable Christian web hosting: <a href='http://www.domini.org/' target='NEWIN'>Domini</a> serves up CenterWeb!"
arrQuickLinks[9]="<a href='http://www.davidnc.co.uk/evolution.html' target='NEWIN'>Creation & Evolution</a>: why they aren't mutually exclusive."
arrQuickLinks[10]="YOU can be involved in outreach! <a href='http://www.ywam.org/' target='NEWIN'>Youth With A Mission</a> is just what it says."
arrQuickLinks[11]="<a href='http://www.christiananswers.net/sex/' target='NEWIN'>Christian answers</a>, (yes, even about sex!)"
arrQuickLinks[12]="Everybody's doing it... but is <a href='sxmarriage.html'>sex out of marriage</a> safe?"
arrQuickLinks[13]="Like someone? Scared to tell them? Sure it's <a href='truelove.html'>true love?</a>"
arrQuickLinks[14]="It's normal to <a href='mast.html'>masturbate</a>... does that make it right?"
arrQuickLinks[15]="<a href='touching.html'>How far is too far</a> in a physical relationship?"
arrQuickLinks[16]="You could help out at CenterWeb: <a href='opportunities.html'>find out how</a>."
arrQuickLinks[17]="We value your comments, so please <a href='feedb.html'>tell us</a> what you think!"
arrQuickLinks[18]="Had sex and feel guilty afterwards? <a href='sex.html'>Sort things out</a>"
arrQuickLinks[19]="Relationship gone wrong? Deal with a <a href='broken.html'>broken heart</a>."
arrQuickLinks[20]="Everyone gets <a href='depression.html'>depressed</a>, but you can deal with it."
arrQuickLinks[21]="What are the <a href='truths.html'>fundamental truths</a> of Christianity? What do I have to do as a Christian?"
arrQuickLinks[22]="Do you <a href='cutting.html'>cut yourself</a> when you're depressed? Does it really make you feel better?"
arrQuickLinks[23]="Who do you look up to? Find out about <a href='models.html'>rôle models</a>."
arrQuickLinks[24]="Do you always argue and not actually sort things out? Find out how to <a href='confront.html'>converse and not confront</a>."
arrQuickLinks[25]="Feel <a href='godstouch.html'>unconditional love</a>: You'll never be alone."

quickString = "<div class='box'><p><font face='Arial, Helvetica, sans-serif' size='2'><b>Quick Links</b></font></p><p><font face='Arial, Helvetica, sans-serif' size='2' color='#6600FF'><b><font size='3'>&gt;&gt;</font></b></font><font face='Arial, Helvetica, sans-serif' size='2'>" + arrQuickLinks[m] + "</font></p><p><font face='Arial, Helvetica, sans-serif' size='2' color='#6600FF'><b><font size='3'>&gt;&gt;</font></b></font><font face='Arial, Helvetica, sans-serif' size='2'>" + arrQuickLinks[n] + "</font></p><p><font face='Arial, Helvetica, sans-serif' size='1'><a href='javascript:GiveListing()'>Complete Links Listing</A></P></div>"

document.write(quickString);

function GiveListing(){
	listing = window.open("","listingWin","menubar=no,toolbar=no,location=no,status=no,width=250,height=400,scrollbars=yes,resizable=yes");
	listing.document.write("<HEAD><TITLE>Quick Links Complete Listing</TITLE><STYLE><!--A:Hover { color:#0099ff; text-decoration: none} A:link { color:#3333CC; text-decoration: none} A:visited { color:#3333CC; text-decoration: none} A:active { color:#0099ff; text-decoration: none} //--></STYLE></HEAD><BODY LINK='#3333CC' VLINK='#3333CC'>");
	listing.document.write("<FONT FACE='Arial, Helvetica, Sans-Serif' SIZE=3 COLOR='#6633FF'><b>Quick Links<BR>Complete Listing</b></FONT><P>");
	listing.document.write("<FONT FACE='Arial, Helvetica, Sans-Serif' SIZE=2 COLOR='#000000'>Note: when you click a link you will need to maximise the window! (external links open a new window, so resize not necessary).<P><ul>")
	j=0
	while (j < counter){
		listing.document.write("<li>"+ arrQuickLinks[j] + "</li>")
		j++
	}
	listing.document.write("</ul><P><A HREF='javascript:self.close()'>Close Window</A></FONT></BODY>")
}
