//object.js javascript definition file

/Function definitions/

function GoTo(URL)
// Typical Usage:
// <FORM NAME=MyForm>
// <SELECT NAME="adbook" SIZE=1 onChange ="GoTo(document.MyForm.adbook.options[document.MyForm.adbook.selectedIndex].value)">
// <OPTION VALUE="mailto:dasauo@zedat.fu-berlin.de"> Ajmal Omar
// or
// <A HREF="Javascript:GoTo('tadpole.html')">Click here to find out.</A>
{
	if (URL != "") window.location.href = URL;
}

function OpenNewWindow(ref)
// Use this form to open:
// <A HREF="Javascript:OpenNewWindow('http://www.someplace.com/index')">Some Place Nice</A>
{
// win=window.open(ref , "note" ,
//	"toolbar=1,status=1,location=0,directories=0,menubar=1,"
//	+ "resizable=1,scrollbars=1,height=460,width=640");
	if (ref != "") NewWindow(ref,"new",640,460,1,0);
}

function NewWindow(mypage, myname, w, h, scroll, size)
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'toolbar=0,height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+size;
	win = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function ShowMenu(cur)
{
var href = new Array(16);
href[1] = 'http://www.sadayezindagi.com/index.jsp';
href[2] = 'http://www.sadayezindagi.com/ddb.jsp';
href[3] = 'http://www.sadayezindagi.com/seriesbasic.jsp';
href[4] = 'http://www.sadayezindagi.com/schedule.jsp';
href[5] = 'http://www.sadayezindagi.com/mailform.jsp';
href[6] = 'http://www.sadayezindagi.com/links.jsp';
href[7] = 'http://www.sadayezindagi.com/about.jsp';
href[8] = 'http://www.sadayezindagi.com/store';
href[9] = 'http://www.sadayezindagi.com/indexDari.jsp';
href[10] = 'http://www.sadayezindagi.com/ddbUnicode.html';
href[11] = 'http://www.sadayezindagi.com/seriesDari.jsp';
href[12] = 'http://www.sadayezindagi.com/schedule.jsp';
href[13] = 'http://www.sadayezindagi.com/mailformDari.jsp';
href[14] = 'http://www.sadayezindagi.com/linksDari.jsp';
href[15] = 'http://www.sadayezindagi.com/aboutDari.jsp';
href[16] = 'http://www.sadayezindagi.com/store';

// write flags and picture

	document.write("</DIV CLEAR ALL><CENTER>");
	document.write('<div id="banner_container">');
	document.write('<img id="banner" src="image/bannersz.jpg">');
	document.write('<a id="english" href="' + href[cur] + '">');
	document.write('English');
	document.write('</a>');
	document.write('<a id="dari_banner" href="' + href[cur + 8] + '">');
	document.write('&#1583;&#1585;&#1740;&nbsp;');
	document.write('</a></div>');

// Now menu bar
	document.write('<div class="menubar">');
	document.write("<TABLE WIDTH='100%' cellpadding=0 cellspacing=0");
	document.write(' style="border-top-style: none; border-bottom-color: Black; border-bottom-style: solid; border-bottom-width: 1;">');
// first row
	document.write("<TR><span lang=FA style='mso-bidi-language:FA'>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,1); document.write(">");
	document.write("<A href='" + href[1] + "' title='Play audio files on-line'>Listen Here!</A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,2); document.write(">");
	document.write("<A href='" + href[2] + "' title='Listen to the Bible in Dari'>Audio Scriptures</A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,3); document.write(">");
	document.write("<A href='" + href[3] + "' title='A desciption of all radio series'>Series</A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,4); document.write(">");
	document.write("<A href='" + href[4] + "' title='Our Current Radio Schedule'>Radio Schedule</A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,5); document.write(">");
	document.write("<A href='" + href[5] + "' title='Tell us what you think'>Feed Back</A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,6); document.write(">");
	document.write("<A href='" + href[6] + "' title='Lots of other places'>Links</A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,7); document.write(">");
	document.write("<A href='" + href[7] + "' title='Who we are.'>About Us</A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,8); document.write(">");
	document.write("<A href='" + href[8] + "' title='Buy on line.'>Store</A></td>");
	document.write("</TD></TR><TR>");

// second row
	document.write("<span lang=FA style='mso-bidi-language:FA'>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,1); document.write(">");
	document.write("<A href='" + href[9] + "' title='Play audio files on-line'><font size=+1>&#1576;&#1588;&#1606;&#1608;&#1740;&#1583;</font></A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,2); document.write(">");
	document.write("<A href='" + href[10] + "' title='Listen to the Bible in Dari'><font size=+1>&#1575;&#1606;&#1580;&#1610;&#1604; &#1605;&#1602;&#1583;&#1587;</font></A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,3); document.write(">");
	document.write("<A href='" + href[11] + "' title='A desciption of all radio series'><font size=+1>&#1576;&#1585;&#1606;&#1575;&#1605;&#1607; &#1607;&#1575;</font></A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,4); document.write(">");
	document.write("<A href='" + href[12] + "' title='Our Current Radio Schedule'><font size=+1>&#1575;&#1608;&#1602;&#1575;&#1578; &#1606;&#1588;&#1585;</font></A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,5); document.write(">");
	document.write("<A href='" + href[13] + "' title='Tell us what you think'><font size=+1>&#1576;&#1607; &#1605;&#1575; &#1576;&#1606;&#1608;&#1740;&#1587;&#1740;&#1583;</font></A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,6); document.write(">");
	document.write("<A href='" + href[14] + "' title='Lots of other places'><font size=+1>&#1589;&#1601;&#1581;&#1575;&#1578; &#1583;&#1740;&#1711;&#1585;</font></A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,7); document.write(">");
	document.write("<A href='" + href[15] + "' title='Who we are'><font size=+1>&#1589;&#1601;&#1581;&#1607; &#1575;&#1608;&#1604;</font></A></td>");
	document.write("<TD ALIGN=center"); MenuSelected(cur,8); document.write(">");
	document.write("<A href='" + href[16] + "' title='Buy on line.'>&#1584;&#1582;&#1740;&#1585;&#1607; &#1705;&#1606;&#1740;&#1583; </A></td>");
	document.write("</TD></TR></TABLE><P>");
	document.write("</span>");

}

function MenuSelected(a,b)
{	if (a==b) document.write(" bgcolor=#D0F0FD ");
}
