function ad(title, url, image, expdate)
{
	this.title	= title;
	this.url	= url;
	this.image	= image;
	this.expdate	= expdate;
}
var ads = new Array();
//##### Add banners here ########
// In this format:
// ads [x] = new ad('Link title', 'url', 'image placed in images/banners dir', 'date of expiry');
ads[0]= new ad('Buy all kinds of Jilbab', 'http://www.aljilbab.com', 'aljilbab.gif', '22/11/2009');
ads[1]= new ad('Beautiful Hijabs', 'http://www.2hijab.com', '2hijab.gif', '22/11/2008');



function fnBuildHeader()
{
	var count		= ads.length;
	var rand		= Math.floor(Math.random()*count);	
	var showad 		= ads[rand];

	bannerAdInfo = '<A HREF=' + showad.url + ' title=' + showad.title + ' TARGET=_blank><img border=0 src=images/banners/' + showad.image +'></A>';
	var cTemp = "";
	cTemp = cTemp + "<TABLE width=800 bgcolor=#606060 height=100% cellpadding=0 cellspacing=0>";
	cTemp = cTemp + "<tr><td height=160 align=center>";
	cTemp = cTemp + "<table width=795 bgcolor=white height=100% align=center>";
	cTemp = cTemp + "<tr><td width=50 background=images/top_bg.jpg  align=center valign=middle>";
	cTemp = cTemp + "<img src=images/spacer.gif></td>";
	cTemp = cTemp + "<td width=180 align=center valign=middle>";
	cTemp = cTemp + "<A HREF=http://www.nisys.org><img border=0 src=images/logo.png></A><br>";
	cTemp = cTemp + "<b>Numa Information Systems</b></td>";
	cTemp = cTemp + "<td width=565 align=center valign=middle background=images/top_bg.jpg>";
	cTemp = cTemp + bannerAdInfo;
	cTemp = cTemp + "</td></tr>";
	document.write(cTemp);
}

function fnBuildTopMenu()
{
	var my_date	= new Date();
	var day		= my_date.getDay();
	var am		= 3;
	var rand		= Math.floor(Math.random()*am);	
	var imgCode		= rand * (day + 1);
	var html 		= '<td width=391 height=134 align=right valign=bottom background="images/body-ban_02-' + imgCode + '.gif" ></td>';
	var html2		= '<td rowspan=2><img src="images/body-ban_04-' + imgCode + '.gif" width=43 height=188></td>';


	var menuSplitter = "</td><td width=15 align=center><img src=images/menu_splitter.gif></td><td width=70 align=center>";

	var cTemp = "";
	cTemp = cTemp + "<tr><td colspan=3 background=images/menu_bg.gif align='left' valign='middle' height='31'>";
	cTemp = cTemp + "<table height=31 cellspacing=0 cellpadding=0><tr>";
	cTemp = cTemp + "<td width=70 align=center>";
	cTemp = cTemp + "<A HREF=index.html>Home</A>";
	cTemp = cTemp + menuSplitter;
	cTemp = cTemp + "<A HREF=services.html>Services</A>";
	cTemp = cTemp + menuSplitter;
	cTemp = cTemp + "<A HREF=orders.html>Orders</A>";
	cTemp = cTemp + menuSplitter;
	cTemp = cTemp + "<A HREF=support.html>Support</A>";
	cTemp = cTemp + menuSplitter;
	cTemp = cTemp + "<A HREF=about.html>About Us</A>";
	cTemp = cTemp + menuSplitter;
	cTemp = cTemp + "<A HREF=contact.html>Contact Us</A>";
	cTemp = cTemp + "</td></tr></table></td></tr>";


	document.write(cTemp);
}


function fnCloseHeader(parent, url, current)
{
	var currPage = '<A HREF=' + url + '>' + parent + '</A> > ' + current;
	var cTemp = "";
	cTemp = cTemp + "<tr><td colspan=3 width='100%' align=left height='40' background=images/curr_page_bg.jpg>";
	cTemp = cTemp + '<font color=white><b>Current Page: ' + currPage + '</b></font>';
	cTemp = cTemp + "</td></tr></table></td></tr><tr>";
	cTemp = cTemp + "<td width=100% align=center>";
	cTemp = cTemp + "<table bgcolor=white  width=795 height=100% cellpadding=0 cellspacing=2>";
	cTemp = cTemp + "<tbody><tr><td height=20></td></tr><tr><td width=600 align=center>";

	document.write(cTemp);
}


function fnBuildRightSection()
{
	var tableHeader  = 'Our Customers';
	var tableContent = new Array(6);
	var tabContUrl   = new Array(6);
	tableContent[0] = "KNS Hajee Coir Products";
	tabContUrl[0]   = "www.knshajee.com";
	tableContent[1] = "Design'r Furniture";
	tabContUrl[1]   = "www.designrfurniture.com";
	tableContent[2] = "Research Products";
	tabContUrl[2]   = "www.nisys.org";	
	tableContent[3] = "P2V Virtualization Forums";
	tabContUrl[3]   = "p2v.nisys.org";
	tableContent[4] = "Anas Personal Webpage";
	tabContUrl[4]   = "anas.nisys.org";

	var cTemp = "";
	cTemp = cTemp + "</td><td valign=top align=right width=200>";

// Table1 starts here
	cTemp = cTemp + "<table bgcolor=white width=200 cellpadding=0 cellspacing=0>";
	cTemp = cTemp + "<tbody><tr><td align='left' valign='top'>";
	cTemp = cTemp + "<img src='images/rightcorner01.gif' alt='' height='17' width='15'></td>";
	cTemp = cTemp + "<td background=images/right_ex_t.gif width='99%'><br></td>";
	cTemp = cTemp + "<td align='right' valign='top'>";
	cTemp = cTemp + "<img src='images/rightcorner02.gif' alt='' height='17' width='16'>";
	cTemp = cTemp + "</td></tr><tr><td background=images/right_ex_l.gif><br></td>";
	cTemp = cTemp + "<td align='left' valign='top'>";
	cTemp = cTemp + "<table bgcolor=white cellpadding='0' cellspacing='0' width='100%'>";
	cTemp = cTemp + "<tbody><tr><td colspan='2' align='left' valign='top' style='padding:5px;'>";
	cTemp = cTemp + "<b>" + tableHeader + "</b></td></tr>";
	for (i=0;i<5;i++){
		cTemp = cTemp + "<tr><td style='padding:3px;' valign='middle'>";
		cTemp = cTemp + "<img src='images/right_bullet.gif' alt='' height='5' width='5'></td>";
		cTemp = cTemp + "<td style='padding:3px;'><A target=_blank HREF=http://" + tabContUrl[i] + ">";
		cTemp = cTemp + tableContent[i];
		cTemp = cTemp + "</A><br></td></tr><tr>";
		cTemp = cTemp + "<td background=images/right_line.gif  colspan='2'>";
		cTemp = cTemp + "<img src='images/spacer.gif' alt='' height='2' width='1'></td></tr>";
	}
	cTemp = cTemp + "</tbody></table></td>";
	cTemp = cTemp + "<td background=images/right_ex_r.gif align='right'><br>";
	cTemp = cTemp + "</td></tr><tr><td align='left' valign='middle'>";
	cTemp = cTemp + "<img src='images/rightcorner03.gif' alt='' height='17' width='15'></td>";
	cTemp = cTemp + "<td background=images/right_ex_b.gif width='99%'><br>";
	cTemp = cTemp + "</td><td align='right' valign='top'>";
	cTemp = cTemp + "<img src='images/rightcorner04.gif' alt='' height='17' width='16'>";
	cTemp = cTemp + "</td></tr></tbody></table>";

	document.write(cTemp);
}



function fnBuildFooter()
{
	var cTemp = "";
	cTemp = cTemp + "</td></tr></tbody></table>";
	cTemp = cTemp + "</td></tr><tr><td align=center>";
	cTemp = cTemp + "<font color=white style=bold>Copyrights 2008 Numa Information Systems</font>";
	cTemp = cTemp + "</td></tr></table>";

	document.write(cTemp);
}






