// Root Menu

function faq(question, answer)
{
	this.question = question;
	this.answer = answer;
}


// write HR to space FAQ's
function WriteFAQline()
{
document.write('<table cellspacing="0" cellpadding="1" border="0">');
document.write('<tr>');
document.write('	<td align="center" width="100"><img src="images/1x1-FFFFFF.jpg" width="104" height="1" alt="" border="0"></td>');
document.write('	<td align="center" width="*"><img src="images/1x1-820082.jpg" width="360" height="1" alt="" border="0"></td>');
document.write('	<td align="center" width="100"><img src="images/1x1-FFFFFF.jpg" width="10" height="1" alt="" border="0"></td>');
document.write('</tr>');
document.write('</table>');
}

function WriteFAQ() 
{
	for (var i=1; i < Faq.length; i++)
	{
	document.write('<p><font class="q-question">' +  Faq[i].question + '</font><br><font class="q-answer">' + Faq[i].answer + '</font></p>');
	WriteFAQline()
	}
}



// write masterhead
function WriteMasterHead()
{
document.write('<table width="760" height="75" align="center" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td align="left"><a href="http://www.budgieman.co.uk/index.html"><img src="http://www.budgieman.co.uk/photos/budgieman-m-1.jpg" height="120" alt="Budgieman Photo" border="0"></a></td>')
document.write('<td align="left"><a href="http://www.budgieman.co.uk/index.html"><img src="http://www.budgieman.co.uk/images/bm-title.jpg" height="120" alt="Budgieman - The famous budgie entertainer" border="0"></a></td>')
document.write('<td align="right""><a href="http://www.budgieman.co.uk/index.html"><img src="http://www.budgieman.co.uk/photos/budgieman-m-2.jpg" height="120" alt="Budgieman Photo" border="0"></a></td>')
document.write('</tr>')
document.write('</table>')
}



//write right hand tower - AMAZON
function WriteRightTower_amazon()
{
document.write('<iframe width="120" height="476" scrolling="no" frameborder=0 src="http://rcm-uk.amazon.co.uk/e/cm?t=gm44&l=st1&search=travel%20siberia&mode=books-uk&p=10&o=2&f=ifr&bg1=F7FFCE&lt1=_blank"> <table border="0" cellpadding="0" cellspacing="0" width="120" height="476"><tr><td><A HREF="http://www.amazon.co.uk/exec/obidos/redirect-home/gm44" target=_blank><img src="http://images-eu.amazon.com/images/G/02/associates/recommends/default_120x476.gif" width="120" height="476" border="0" access=regular></a></td></tr></table></iframe>')
}

//write left hand tower - AMAZON
function WriteLeftAd()
{
if ((channelid != 1) && (channelid != 4) )
	{
	document.write('<tr><td>')
	document.write('<br>')
	document.write('<iframe width="120" height="268" scrolling="no" frameborder=0 src="http://rcm-uk.amazon.co.uk/e/cm?t=gm44&l=st1&search=trans-siberia&mode=books-uk&p=8&o=2&f=ifr"> <table border="0" cellpadding="0" cellspacing="0" width="120" height="268"><tr><td><A HREF="http://www.amazon.co.uk/exec/obidos/redirect-home/gm44" target=_blank><img src="http://images-eu.amazon.com/images/G/02/associates/recommends/default_120x268.gif" width=120 height=268 border="0" access=regular></a></td></tr></table></iframe> ')
	document.write('<tr><td>')
	}
}




//write right hand tower - GOOGLE
function WriteRightTower()
{
google_ad_client = "pub-6925367576614524";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_channel ="8669592451";
google_ad_type = "text";
google_color_border = "FFCC66";
google_color_bg = "FFFFFF";
google_color_link = "6600FF";
google_color_url = "008000";
google_color_text = "000000";
document.write('<br><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></scr' + 'ipt>')
}

// write page footer - Amazon
function WriteFooterAd()
{
if (channelid != 4)
	{
	document.write('<iframe width="468" height="82" scrolling="no" frameborder=0 src="http://rcm-uk.amazon.co.uk/e/cm?t=gm44&l=st1&search=trans-siberia&mode=books-uk&p=13&o=2&f=ifr"> <table border="0" cellpadding="0" cellspacing="0" width="468" height="82"><tr><td><A HREF="http://www.amazon.co.uk/exec/obidos/redirect-home/gm44" target=_blank><img src="http://images-eu.amazon.com/images/G/02/associates/recommends/default_468x82.gif" width="468" height="82" border="0" access=regular></a></td></tr></table></iframe>')
	}
}


// write page footer - Google
function WriteFooterAd_google()
{
google_ad_client = "pub-6925367576614524";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
google_ad_type = "text";
document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></scr' + 'ipt><br>');
}


// write page footer
function WriteFooter()
{
document.write('<br><p><a class="footer" href="index.html" accesskey="h" title="JP Shopper homepage">Home</a> | <a class="footer" href="privacy.html" accesskey="p" title="Our website privacy policy">Privacy Policy</a> | <a class="footer" href="disclaimer.html" accesskey="d" title="Ensure you read this discaimer">Disclaimer</a> | <a class="footer" href="contactus.html" accesskey="c" title="Who do I contact for more information?">Contact Us</a><br><br><font class="footer">&copy; Budgieman Media Ltd 2009</p>');
}

// Popup window
function pop(url, name, width, height, features) {
	popWin = window.open(url, name, 'width=' + width + ',height=' + height + ',resizable' + ((features) ? ',' + features : ''));
	if (window.focus) setTimeout("popWin.focus()",100);
	}

// Show time
function showTime()
{
  var days = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
  var months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
  var now = new Date();
  var day = now.getDay();
  var today = now.getDate();
  var month = now.getMonth();
  var year = now.getFullYear();
	dateStamp = days[day] + ' ' + two_digit(today) + ' ' + months[month] + ' ' + year; document.write('<span class="clock">' + dateStamp + '</span>');
}

// convert to 2-digits
function two_digit(value)
{
    var s = value + '';
    if (s.length == 1)
      return('0' + s); else
        return(s);
}	
	
// Write Google search in left menu table
function WriteGoogleSearch()
{
document.write('<tr><td>')
document.write('<br>')
document.write('<!-- Search Google -->')
document.write('<center>')
document.write('<FORM method=GET action=http://www.google.com/custom>')
document.write('<TABLE align="left"	bgcolor=#FFFFFF cellspacing=0 border=0>')
document.write('<tr valign=top><td>')
document.write('<A HREF=http://www.google.com/search>')
document.write('<IMG SRC=http://www.google.co.uk/logos/Logo_25wht.gif border=0 ALT=Google align=center></A><br>')
document.write('<INPUT TYPE=text name=q size=19 maxlength=255 value=""><br>')
document.write('<INPUT type=submit name=sa VALUE="Google Search"><br>')
document.write('<INPUT type=hidden name=cof VALUE="S:http://www.trans-siberia.com;GL:0;VLC:820082;AH:center;LC:820082;ALC:820082;AWFID:00ab09419722d048;">')
document.write('<input type=hidden name=dosmains value="www.trans-siberia.com.com"><br><input type=radio name=sitesearch value="www.trans-siberia.com" checked> <font size="-2">Search this site</font> <br><input type=radio name=sitesearch value=""> <font size="-2">Search WWW </font>')
document.write('</td></tr></TABLE>')
document.write('</FORM>')
document.write('</center>')
document.write('<!-- Search Google --> ')
document.write('</td></tr>')
}



// item building
function item(title,description,alttext,statusbar,affurl,logo,width,height)
{
	this.title = title;
	this.description = description;
	this.alttext = alttext;
	this.statusbar = statusbar;
	this.affurl = affurl;
	this.logo = logo;
	this.width = width;
	this.height = height
}


// display item box
function writeitembox(itemid)
{
document.write('<div id="itembox">');
document.write('<div id="itemtitle"><a href="' + Item[itemid].affurl + '" target="_blank"');
document.write('onmouseover="window.status=&quot;goto...  ' + Item[itemid].statusbar + '&quot;; return true;" onmouseout="window.status=&quot;&quot;; return true;" ');
document.write('title="' + Item[itemid].alttext + '">' + Item[itemid].title + '</a></div>');
document.write('<div id="itemtext">' + Item[itemid].description + '</div>');
document.write('<div id="itemgraphic"><a href="' + Item[itemid].affurl + '" target="_blank"');
document.write('onmouseover="window.status=&quot;goto...  ' + Item[itemid].statusbar + '&quot;; return true;" onmouseout="window.status=&quot;&quot;; return true;" ');
document.write('title="' + Item[itemid].alttext + '"><img src="' + Item[itemid].logo + '" border=0 alt="' + Item[itemid].alttext + '"></a></div>');
document.write('</div>');
document.write('<br>');
document.write('<br>');
}

// display amazon books box
function writeitemboxamazonbooks(itemid)
{
document.write('<br>');
document.write('<div id="itemboxamazonbooks">');
document.write('<div id="itemgraphicamazonbooks"><a href="' + Item[itemid].affurl + '" target="_blank"');
document.write('onmouseover="window.status=&quot;goto...  ' + Item[itemid].statusbar + '&quot;; return true;" onmouseout="window.status=&quot;&quot;; return true;" ');
document.write('title="' + Item[itemid].alttext + '"><img src="' + Item[itemid].logo + '" border=0 alt="' + Item[itemid].alttext + '" width=' + Item[itemid].width + ' height=' + Item[itemid].height + '></a></div>');
document.write('<div id="itemtitleamazonbooks"><a href="' + Item[itemid].affurl + '" target="_blank"');
document.write('onmouseover="window.status=&quot;goto...  ' + Item[itemid].statusbar + '&quot;; return true;" onmouseout="window.status=&quot;&quot;; return true;" ');
document.write('title="' + Item[itemid].alttext + '">' + Item[itemid].title + '</a></div>');
document.write('<div id="itemtextamazonbooks">' + Item[itemid].description + '</div>');
document.write('</div>');
document.write('<br>');
document.write('<br>');
}

