var IE6 = false;
var body = '';

// WHEN DOM READY
function init () {

// FIX CRUMBS
var crumbs = document.getElementById('crumbs');
if (crumbs!=null){
crumbs.innerHTML = 'You are here: ' + crumbs.innerHTML.replace('&gt;','&raquo;')
}

// CHANGE ARTICLE PADDING
body = document.getElementsByTagName('body')[0];
if (body.id=='article' && document.getElementsByTagName('h1')[0]==null) {
document.getElementById('content').style.paddingTop = "80px"
}


}

// CHANGES FOR SCREEN SIZE
var w = screen.width;
if (w<1025) {
document.getElementsByTagName('html')[0].className = 'sm'}


window.onload = amIBig;

function amIBig () {
//var body = document.getElementsByTagName('body')[0];
if (w>1280 && body.id!= 'pop') {
body.style.background = '#98D4D4 url(/params/img/waves.jpg) no-repeat fixed 50% 100%';}
}


// FOR IE 6 AS IT SUCKS ARSE
function setMenu () {
if (navigator.userAgent.match('MSIE 6')) {
IE6 = true;
var navs = document.getElementById('menu').getElementsByTagName('li')
for (var i=0;i<navs.length;i++) {
navs[i].onmouseover = function(){this.className='ie_on'};
navs[i].onmouseout = function(){this.className=''};
}
}
}


// EMBEDS THE FLASH
function embedFlash (url,w,h) {
document.write('<object type="application/x-shockwave-flash" data="'+url+'" width="'+w+'" height="'+h+'" menu="false" wmode="transparent">');
document.write('<param name="movie" value="'+url+'" />');
document.write('<param name="menu" value="false" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<\/object>');
}

// EMBEDS A YOUTUBE MODULE
function embedYouTube (url) {
//document.write('<object type="application/x-shockwave-flash" data="'+url+'" width="270" height="223" menu="false" wmode="transparent">');
document.write('<object type="application/x-shockwave-flash" data="'+url+'" menu="false" wmode="transparent">');
document.write('<param name="movie" value="'+url+'">');
document.write('<param name="menu" value="false">');
document.write('<param name="wmode" value="transparent">');
document.write('You need Flash (version 8+) to view the video... please download it <a href="http://www.adobe.com/go/getflashplayer" target="_blank">here</a>.<br><br>');
document.write('<\/object>');
}

// EMBEDS AN UPLOADED FLV
function embedVideo (url) {
//document.write('<object type="application/x-shockwave-flash" data="/params/video/player.swf?video='+url+'" width="270" height="223" menu="false" wmode="transparent">');
document.write('<object type="application/x-shockwave-flash" data="/params/video/player.swf?video='+url+'" menu="false" wmode="transparent">');
document.write('<param name="movie" value="/params/video/player.swf?video='+url+'">');
document.write('<param name="menu" value="false">');
document.write('<param name="wmode" value="transparent">');
document.write('You need Flash (version 8+) to view the video... please download it <a href="http://www.adobe.com/go/getflashplayer" target="_blank">here</a>.<br><br>');
document.write('<\/object>');
}
