/**********************************************************************************/
// FEATURE CONTROL BOX
// The code & design were developed by Fat-Man Colectivo Ltda [Fat-Man Collective]. 
// Copyright 2006. http://www.fat-man-collective.com

/**********************************************************************************/

function content_1(boxnumber){
// BEGIN FEATURE No 1 DONATE NOW

imgbox = "images/tn_donate.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "Your contribution will create Hope for Our Orphans. Please Donate Today "
imgbutton = "store"
buttonlink = "donatenow.htm"

// END FEATURE No 1
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_2(boxnumber){
// BEGIN FEATURE No 2 Changing Lives

imgbox = "images/tn_change_lives.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "A valuable way to improve or save the life of an Orphan  "
imgbutton = "reel"
buttonlink = "changinglives.htm"

// END FEATURE No 2
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_3(boxnumber){
// BEGIN FEATURE No 3 COLLECTION BOX

imgbox = "images/tn_collect.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "Collection boxes are an easy and efficient way to help Our Orphans"
imgbutton = "glstv"
buttonlink = "collectionboxes.htm"

// END FEATURE No 3
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_4(boxnumber){
// BEGIN FEATURE No 4 Orphan?s Bios

imgbox = "images/tn_bios.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "Hear our voices, stories from Our Orphans. "
imgbutton = "movies"
buttonlink = "orphansbios.htm"

// END FEATURE No 4
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_5(boxnumber){
// BEGIN FEATURE No 5 Sponsor an Orphan

imgbox = "images/tn_donate_way.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "To keep a lamp burning we have to keep putting oil in it. <i>Mother Teresa</i>"
imgbutton = "television"
buttonlink = "donateyourway.htm"

// END FEATURE No 5
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_6(boxnumber){
// BEGIN FEATURE No 6 Emergencies & Crisis

imgbox = "images/tn_crisis.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "How Our Orphans prepares for life threatening emergencies "
imgbutton = "dvd"
buttonlink = "emergencies.htm"

// END FEATURE No 6
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_7(boxnumber){
// BEGIN FEATURE No 7 Gallery

imgbox = "images/tn_gallery.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "Photos from visits to Our Orphanages over the past several years"
imgbutton = "music"
buttonlink = "gallery.htm"

// END FEATURE No 7
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_8(boxnumber){
// BEGIN FEATURE No 8 Get Involved

imgbox = "images/tn_involved.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "How you can help Our Orphans to truly create real and lasting happiness"
imgbutton = "games"
buttonlink = "getinvolved.htm"

// END FEATURE No 8
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_9(boxnumber){
// BEGIN FEATURE No 9 How We Help

imgbox = "images/tn_help.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "Basic needs, health, education, love and future they truly deserve"
imgbutton = "downloads"
buttonlink = "howwehelp.htm"

// END FEATURE No 9
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_10(boxnumber){
// BEGIN FEATURE No 10 Where we Help

imgbox = "images/tn_help2.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "Thanks to your support Our work is now helping Orphans globally"
imgbutton = "forum"
buttonlink = "wherewehelp.htm"

// END FEATURE No 10
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_11(boxnumber){
// BEGIN FEATURE No 11 Sponsor an Orphans

imgbox = "images/tn_sponsor.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "A great opportunity to completely transform an Orphan's life forever"
imgbutton = "mailing"
buttonlink = "sponsoranorphan.htm"

// END FEATURE No 11
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}



function content_12(boxnumber){
// BEGIN FEATURE No 12 Sponsor a Project

imgbox = "images/tn_project.jpg"

// Please do not use more than 90 characters (including spaces)
boxcontent = "A great opportunity to be involved in an Our Orphan?s project."
imgbutton = "blog"
buttonlink = "sponsoraproject.htm"

// END FEATURE No 12
box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink)
}






function box_write(boxnumber, imgbox, boxcontent, imgbutton, buttonlink){
	if(boxcontent.length > 80){
		var valid_boxcontent = boxcontent.substr(0,90)
	}else{
		var valid_boxcontent = boxcontent 
	}
//box_code = ''
box_code = '<table border="0" cellpadding="0" cellspacing="0" width="155px"><tr><td><a href="'+ buttonlink +'"><img src="'+ imgbox +'" width="155px" height="67px" border=0></a></td></tr><tr><td class=box_text valign=top>'+ valid_boxcontent +'</td></tr><tr><td class=box_button><a href="'+ buttonlink +'"><img  src="img/button_'+ imgbutton + '.gif" border=0  onmouseover="this.src=\'img/button_'+ imgbutton + '_over.gif\';" onmouseout="this.src=\'img/button_'+ imgbutton + '.gif\';"></a></td></tr></table>'

document.getElementById(boxnumber).innerHTML = box_code
//document.getElementById(boxnumber).style.display = "none"
}

// BEGIN FEATURES RANDOM FUNCTION

//var tb1 = 0
var tb2 = 0
var tb3 = 0
var tb4 = 0
var tb5 = 0
var tb6 = 0
var tb7 = 0
var tb8 = 0

//var tc1 = 0
var tc2 = 0
var tc3 = 0
var tc4 = 0
var tc5 = 0
var tc6 = 0
var tc7 = 0
var tc8 = 0
var tc9 = 0
var tc10 = 0
var tc11 = 0
var tc12 = 0

var ttc2 = 'movies'
var ttc3 = 'reel'
var ttc4 = 'glstv'
var ttc5 = 'television'
var ttc6 = 'dvd'
var ttc7 = 'music'
var ttc8 = 'games'
var ttc9 = 'downloads'
var ttc10 = 'forum'
var ttc11 = 'mailing'
var ttc12 = 'blog'

var ranbox
var rancont
var labox = 2

function features_loop(){
	
	if(labox > 1 && labox < 9){
		//alert(labox)
		rancont = Math.floor((Math.random()*10)+2);
		eval('testcont = tc'+rancont+'')
		eval('testtype = ttc'+rancont+'')
		//alert(testtype)
		//alert(type_page)
		 if(testcont == 0 && testtype != this_content){
		 	
			eval('content_'+ rancont +'("box_0'+ labox +'")')
			eval('tc'+rancont+'=1')
			labox = labox + 1
			reloop()
			
		 }else{
		 reloop()
		 }
	}
}

function reloop(){
	features_loop()
}

content_1("box_01")
features_loop()



// END FEATURES RANDOM FUNCTION