
//Banner include code, ad.js
//***************
//Total number of ads variable:
numAds = 30;
//****************

//Defaults
onColorx = "#0099ff";
backColorx = "#003399";
offColorxy = "#FFFFFF";

if (navigator.userAgent.indexOf("MSIE")    != -1 && 
	navigator.userAgent.indexOf("Windows") != -1 && 
	navigator.appVersion.substring(0,1) > 3) {
var goodBrowser = true;
}

function mouseOverxy(){
if (goodBrowser){
	window.event.srcElement.style.color = onColorx;
}
}

function mouseOutxy(){
if (goodBrowser){
	window.event.srcElement.style.color = offColorxy;
}
}

function mouseClick(){
	parent.location.href=arrLinks[x];
}

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

whichAdd = 0;

function rolloverAd() {
if (goodBrowser){
	if (whichAdd == 0){
		ad.innerHTML = "<P align='RIGHT'>" + arrMessagesSecond[x];
		whichAdd=1;
	}
	else {
		ad.innerHTML = "<P align='LEFT'>" + arrMessages[x];
		whichAdd=0;
	}
}
}

function timeRollover() {
	var timer1=window.setTimeout("rolloverAd()", 5000);
	var timer2=window.setTimeout("timeRollover()", 5001);
}

y=3;
x=19;

while (y > 2){
	rndDecimalx=getRandom();
	y=(Math.round(rndDecimalx*10));
    }

/* Comment all the random x generation code out, as
new one has been made involving the time, (see below).
while (x > 18){
	rndDecimal=getRandom();
	x=(Math.round(rndDecimal*10));
}

xboolean=3;

if (x < 18){
	while (xboolean > 2 || xboolean == 0){
		rndDecimal=getRandom();
		xboolean=(Math.round(rndDecimal*10));
	}

	if (xboolean == 1){
		x = x + 0;
	}

increment=9;

	if (xboolean == 2){
		while (increment > 8){
			rndDecimal=getRandom();
			increment=(Math.round(rndDecimal*10));
		}

		x = 10 + increment;
	}
}
*/

//New random ad code.
timenow = new Date();
secs = timenow.getSeconds();

while (secs > numAds){
	secs=Math.round(secs/2);
	secs = secs - 1
}

x=secs;


arrFonts = new Array(3);
arrFontsClose = new Array(3);

arrFonts[0] = "<font face='Arial, Helvetica, sans-serif' size='5' color='" + offColorxy + "'><b>"
arrFonts[1] = "<font face='Verdana, Arial, Helvetica, sans-serif' size='5' color='" + offColorxy + "'><i>"
arrFonts[2] = "<font face='Courier New, Courier, mono' size='5' color='" + offColorxy + "'><b>"
arrFontsClose[0] = "</b></font>"
arrFontsClose[1] = "</i></font>"
arrFontsClose[2] = "</b></font>"

arrMessages = new Array(numAds);
arrMessagesSecond = new Array (numAds);
arrLinks = new Array(numAds);

arrMessages[0] = "Confused...?"
arrMessagesSecond[0] = "...Get <u>advice</u> here"
arrLinks[0] = "adv.html"
arrMessages[1] = "Sex = Love?"
arrMessagesSecond[1] = "Why not?"
arrLinks[1] = "sxmarriage.html"
arrMessages[2] = "What is LOVE?"
arrMessagesSecond[2] = "Find out here"
arrLinks[2] = "truelove.html"
arrMessages[3] = "G O D"
arrMessagesSecond[3] = "exists? Find out"
arrLinks[3] = "gospel.html"
arrMessages[4] = "Touching..."
arrMessagesSecond[4] = "...how far is too far?"
arrLinks[4] = "touching.html"
arrMessages[5] = "What is he thinking...?"
arrMessagesSecond[5] = "Thoughts of the sexes"
arrLinks[5] = "touching.html"
arrMessages[6] = "Why bother?"
arrMessagesSecond[6] = "Our goals"
arrLinks[6] = "goals.html"
arrMessages[7] = "Help!"
arrMessagesSecond[7] = "We need you!"
arrLinks[7] = "opportunities.html"
arrMessages[8] = "Write in..."
arrMessagesSecond[8] = "...Get an answer"
arrLinks[8] = "advform.html"
arrMessages[9] = "You're reading this"
arrMessagesSecond[9] = "So advertise here!"
arrLinks[9] = "mailto:centerweb@domini.org?subject=advertising"
arrMessages[10] = "Had Sex?"
arrMessagesSecond[10] = "Worried? Sort things out."
arrLinks[10] = "sex.html"
arrMessages[11] = "Cut yourself?"
arrMessagesSecond[11] = "Want to stop? Here's How."
arrLinks[11] = "cutting.html"
arrMessages[12] = "Are you Depressed?"
arrMessagesSecond[12] = "Symptoms & Solutions"
arrLinks[12] = "depression.html"
arrMessages[13] = "Broken hearted?"
arrMessagesSecond[13] = "Why don't some couples work?"
arrLinks[13] = "broken.html"
arrMessages[14] = "Don't confront..."
arrMessagesSecond[14] = "Converse. Find out why."
arrLinks[14] = "confrontation.html"
arrMessages[15] = "Stressed?"
arrMessagesSecond[15] = "There's peace available!"
arrLinks[15] = "whirlwind.html"
arrMessages[16] = "Who are you Imitating?"
arrMessagesSecond[16] = "Rôle Models: Good?"
arrLinks[16] = "models.html"
arrMessages[17] = "Insecure?"
arrMessagesSecond[17] = "Feel unconditional love."
arrLinks[17] = "godstouch.html"
arrMessages[18] = "Christians..."
arrMessagesSecond[18] = "What do they believe?"
arrLinks[18] = "truths.html"
arrMessages[19] = "Shy?"
arrMessagesSecond[19] = "You don't have to be!"
arrLinks[19] = "shyness.html"
arrMessages[20] = "Why end Life?"
arrMessagesSecond[20] = "Deal with Suicide."
arrLinks[20] = "suicide.html"
arrMessages[21] = "High expectations on you?"
arrMessagesSecond[21] = "Love's not perfection."
arrLinks[21] = "expectations.html"
arrMessages[22] = "Beautiful..."
arrMessagesSecond[22] = "...but what is beauty?"
arrLinks[22] = "beauty.html"
arrMessages[23] = "E C S T A S Y"
arrMessagesSecond[23] = "Find out before you try."
arrLinks[23] = "ecstasy.html"
arrMessages[24] = "Words..."
arrMessagesSecond[24] = "Think about what you say."
arrLinks[24] = "pwrwords.html"
arrMessages[25] = "You have values:"
arrMessagesSecond[25] = "don't got with the flow!"
arrLinks[25] = "beliefs.html"
arrMessages[26] = "Friends:"
arrMessagesSecond[26] = "how much do you care?"
arrLinks[26] = "friends.html"
arrMessages[27] = "Rape & Abuse:"
arrMessagesSecond[27] = "Heal the hurt."
arrLinks[27] = "abuse.html"
arrMessages[28] = "Have confidence:"
arrMessagesSecond[28] = "You're special."
arrLinks[28] = "confidence.html"
arrMessages[29] = "Contraceptives"
arrMessagesSecond[29] = "What and how Effective."
arrLinks[29] = "contraceptives.html"
arrMessages[30] = "Unprotected sex:"
arrMessagesSecond[30] = "The R I S K S"
arrLinks[30] = "risks.html"

wrtString="<TD BGCOLOR=" + backColorx + ">" + arrFonts[y] + "<DIV ID='ad' onMouseOver='mouseOverxy()' onMouseOut='mouseOutxy()' onClick='mouseClick()' STYLE='cursor:hand'>" + arrMessages[x] + "</DIV>" + arrFontsClose[y] + "<CENTER><FONT FACE='Arial,Helvetica,sans-serif' size='1'><A HREF='" + arrLinks[x] + "' TITLE='Click here to access the page advertised.' onMouseOver='mouseOverxy()' onMouseOut='mouseOutxy()'><font color='" + offColorxy + "'>Click Here</font></A></FONT></CENTER></TD>"

if (goodBrowser) {
	document.write(wrtString);
}

else {
//for non DHTML browsers
wrtString="<TD BGCOLOR=" + backColorx + ">" + "<TABLE WIDTH='100%' VSPACE='0' HSPACE='0' COLS='1' ROWS='2' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD>" + arrFonts[y] + arrMessages[x] + arrFontsClose[y] + "</TD></TR><TR><TD><P ALIGN='RIGHT'>" + arrFonts[y] + arrMessagesSecond[x] + arrFontsClose[y] + "<CENTER><FONT FACE='Arial,Helvetica,sans-serif' size='1'><A HREF='" + arrLinks[x] + "' TITLE='Click here to access the page advertised.'><font color='" + offColorxy + "'>Click Here</font></A></FONT></CENTER></TD></TR></TABLE></TD>";
document.write(wrtString);
}

timeRollover();