
//window.onresize = function() {
var fixFooter = function() {
/*
	var footer = $('footer');

	// try to reset footer first
	footer.setStyle('top', 0);
	
	
	//var ender = $('ender');
	var fCoords = footer.getCoordinates();
	//var enderCoords = ender.getCoordinates();	
	//var coords = window.getScrollSize();
	var coords = window.getScrollSize();
	var pos = coords.y - 3*fCoords.height - 230;
	// - fCoords.top;
	
	console.log("fCoords.top:"+fCoords.top);
	console.log("pos:"+pos+" windows size, coords.y:"+coords.y+" fCoords.height:"+fCoords.height+" fCoords.top:"+fCoords.top);

	if (pos > 500)
	{
		console.log("Force zero at first:"+pos);
		pos = 0;
	}
	
	//if (pos !== 0) {
	if ((pos > 0) && (pos !== 0)){	
		console.log("setting pos normally to:"+pos);
		footer.setStyle('top', pos);
	} else {
		console.log("zeroing pos:"+pos);
		footer.setStyle('top', 0);
	}
*/	
    var c = window.getCoordinates();
    var footer = $('footer');
    var footerC = footer.getCoordinates();
    var bottom = c.height - footerC.height;
    var main = $('main').getCoordinates();
    //console.log((main.top + main.height));
    //console.log(bottom);
    var pos = bottom - (main.top + main.height);
    if (pos > 0) {
        footer.setStyle('top', pos);
    }
}
function init()
{
sIFR.autoInitialize = false;


var sanukOTBold = {
  src: '/assets/swf/sanukOTBold.swf'
};

sIFR.activate(sanukOTBold);


var sanukOTBoldFrontpage = {
  src: '/assets/swf/sanukOTBold.swf'
};

sIFR.activate(sanukOTBoldFrontpage);


var sanukOTBoldLeftHeaders = {
  src: '/assets/swf/sanukOTBold.swf'
};

sIFR.activate(sanukOTBoldLeftHeaders);




var sanukregular = {
  src: '/assets/swf/sanukregular.swf'
};

sIFR.activate(sanukregular);


sIFR.replace(sanukOTBold, {
selector: 'h1',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #5ea833; background-color: #1B2228; font-size: 30px;}'
,'a { text-decoration: none; }'
,'a:link { color: #5ea833; }'
,'a:hover { color: #5ea833; text-decoration: underline; }'
]
});

/*
sIFR.replace(sanukOTBold, {
selector: '#frontpageslogan h1',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #5ea833; background-color: #1B2228; font-size: 32px;}'
,'a { text-decoration: none; }'
,'a:link { color: #5ea833; }'
,'a:hover { color: #5ea833; text-decoration: underline; }'
]
});
*/



/*
sIFR.replace(sanukregular, {
  selector: 'p.ing',
  wmode: 'transparent',
  css: {'.sIFR-root': { 'color': '#333333','background-color': '#ffffff', 'font-size': '18px'}
}
});
*/

sIFR.replace(sanukregular, {
selector: 'p.ing',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #333333; background-color: #1B2228; font-size: 18px;}'
,'a { text-decoration: underline; }'
,'a:link { color: #333333; }'
,'a:hover { color: #333333; text-decoration: none; }'
]
});



sIFR.replace(sanukOTBoldFrontpage, {
selector: '#frontpage h3',
wmode: 'transparent',
forceSingleLine: true,
css: [
'.sIFR-root { color: #000000; background-color: #ffffff; font-size: 14px;}'
,'a { text-decoration: none; }'
,'a:link { color: #000000; }'
,'a:hover { color: #000000; text-decoration: underline; }'
]
});

sIFR.replace(sanukOTBoldLeftHeaders, {
selector: '#productpage h4',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #000000; background-color: #ffffff; font-size: 12px;, text-align: right;}'
,'a { text-decoration: none; }'
,'a:link { color: #000000; }'
,'a:hover { color: #000000; text-decoration: underline; }'
]
});

sIFR.replace(sanukOTBoldLeftHeaders, {
selector: '#frontpageblog h2',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #000000; background-color: #ffffff; font-size: 18px;, text-align: left;}'
,'a { text-decoration: none; }'
,'a:link { color: #000000; }'
,'a:hover { color: #000000; text-decoration: underline; }'
]
});


sIFR.replace(sanukOTBoldLeftHeaders, {
selector: '#buttonnavi h2',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #000000; background-color: #ffffff; font-size: 18px;, text-align: left;}'
,'a { text-decoration: none; }'
,'a:link { color: #000000; }'
,'a:hover { color: #000000; text-decoration: underline; }'
]
});

sIFR.replace(sanukOTBoldLeftHeaders, {
selector: '#frontpageevent h2',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #000000; background-color: #ffffff; font-size: 18px;, text-align: left;}'
,'a { text-decoration: none; }'
,'a:link { color: #000000; }'
,'a:hover { color: #000000; text-decoration: underline; }'
]
});



sIFR.replace(sanukOTBoldLeftHeaders, {
selector: '#solutions h4',
wmode: 'transparent',
forceSingleLine: false,
css: [
'.sIFR-root { color: #000000; background-color: #ffffff; font-size: 12px;, text-align: right;}'
,'a { text-decoration: none; }'
,'a:link { color: #000000; }'
,'a:hover { color: #000000; text-decoration: underline; }'
]
});


sIFR.initialize();

	
	
	var midContent = $('midContent')
	if(midContent){
		var so = new SWFObject('/assets/swf/xtract_front2010.swf', 'xtract_front2010', '950', '313', '9', '#FFFFFF');
		so.addParam('menu', 'false');
		so.addParam('scale', 'noscale');
		so.addParam('wmode', 'transparent');
	//	so.addVariable('imgfolder','/images/raise/');
	//	so.addVariable('xmlurl','/xml/frontpage.xml');
		so.write("midContent");
}



//window.onresize();
window.addEvent('domready', function() {
	//fixFooter();
	//window.addEvent('resize', fixFooter);
	window.addEvent('resize', fixFooter);
    fixFooter.delay(100);
});

}

