// #########################	Flash At Top Of Page	#########################

function flashHeader(){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="750" height="50" id="logo" align="left">');
	document.write('<param name="movie" value="logo.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="bgcolor" value="#000000">');
	document.write('<embed src="logo.swf" quality="high" bgcolor="#000000" width="750" height="50" name="logo" align="left" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write('</embed></object>');
}

// #########################	Customer Feedback Videos	#########################

function feedbackVideo(videoFile){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="128" height="81">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="movie" value="auxiliary/' + videoFile + '">');
	document.write('<param name="scale" value="noscale">');
	document.write('<param name="bgcolor" value="#000000">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="menu" value="false">');
	document.write('<embed src="auxiliary/' + videoFile + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="128" height="81" bgcolor="#000000" scale="noscale" quality="high" wmode="transparent" menu="false"></embed>');
	document.write('</object>');
	document.write('<br><br>');
}

function feedbackVideos(){
	feedbackVideo('cw1.swf');
	feedbackVideo('ct1.swf');
	feedbackVideo('mum1.swf');
}

// #########################	Footer Placement	#########################

function adjustFooter(){
	var mainContent = document.getElementById('main_content');
	var sidebar = document.getElementById('sidebar');
	var footer = document.getElementById('footer');
	var brandingHeight = 230;
	var footerTopMargin = 20;
	var fPos = Math.max(sidebar.offsetHeight, mainContent.offsetHeight) + brandingHeight + footerTopMargin;
	footer.style.top = fPos + 'px'
	footer.style.visibility = 'visible';
}

// #########################	About Page Videos	#########################

function baronVideo() {
	popUp('<embed src=http://www.youtube.com/v/wMjUHN-ys2s&amp;autoplay=1 type=application/x-shockwave-flash wmode=transparent width=425 height=350></embed>');
}

function johnVideo() {
	popUp('<embed src=http://www.youtube.com/v/EqPdsA2axCM&amp;autoplay=1 type=application/x-shockwave-flash wmode=transparent width=425 height=350></embed>');
}

// #########################	Make menu compatible with older IE	#########################

function cssMenuIECompat(){
		var lis = document.getElementsByTagName('li');
		for(i = 0; i < lis.length; i++)
		{
			var li = lis[i];
			if (li.className == 'cssmenuhead')
			{
				li.onmouseover = function() { this.getElementsByTagName('ul').item(0).style.display = 'block'; }
				li.onmouseout = function() { this.getElementsByTagName('ul').item(0).style.display = 'none'; }
			}
		}
}

// #########################	display contact info	#########################
function showContact() {

	document.write('<div id="contact_box">');
	document.write('<b>ChessBaron Traditional Games<br>');
	document.write('6b Matrich House<br>');
	document.write('Goulton Street<br>');
	document.write('Hull HU3 4DD<br>');
	document.write('United Kingdom</b>');
	document.write('<hr><b>Office Phone: 01482 327019</b><BR>');
	document.write('<hr>Office Fax: 01482 210490<BR>');
	document.write('Calling from outside UK: +44 1482 327019<br>');
	document.write('Skype Call: <b>baron.turner</b>');
	document.write('<hr>Technical/Business/Ownership: Baron Turner - 01278 426100');
	document.write('<hr>Our eMail: ');
	document.write(' <A HREF="mailto:mail@chessbaron.co.uk?subject=Question about ChessBaron products or services&body=Please include contact details if you would like someone to contact you">ChessBaron Email</a></font>');
	document.write('</div>');
}

function showShortContact() {
	document.write('<hr><p>Call 01482 327019<br>(Or After Hours:<br>07862 704667)</p>');
}

// #########################	used in checkout.php	#########################

function refreshit() {
	// DB 07/12/06
	location.href=location.href+"&"+"dcountry="+document.former.DeliveryCountry.value;
	//location.href=location.href+"&"+"dcountry="+document.all.former.DeliveryCountry.value;
	/////
}
