if (top != self)
	top.location = self.location;


$(document).ready(cols_resize);

function cols_resize()
{
	var ifooter = 0;
	var iwrap = $('#wrap').height();

	if ( $('#footer').length )
	{
		ifooter = $('#footer').height();
	}
	
	iheight = iwrap - ifooter;

	if ( $('#col1').length )
	{
//		$('#col1').height(iheight);
		$('#col1').css({'min-height': iheight}); 
	}
	if ( $('#col2').length )
	{
//		$('#col2').height(iheight - 207);
		var icol2height = iheight - 207;
		$('#col2').css({'min-height': icol2height}); 
	}
	if ( $('#col3').length )
	{
//		$('#col3').height(iheight);
		$('#col3').css({'min-height': iheight}); 
	}
}

function cols_resize_col1(iheight) {
	var iwrap = $('#wrap').height();
	$('#wrap').height(iwrap + iheight);
	cols_resize();
}
/*
function cols_resize()
{
	var icol1 = 0;
	var icol2 = 0;
	var icol3 = 0;
	var imax = 0;
	
	
	if ( $('#col1').length )
	{
		icol1 = $('#col1').height() - 207;
	}
	if ( $('#col2').length )
	{
		icol2 = $('#col2').height();
	}
	if ( $('#col3').length )
	{
		icol3 = $('#col3').height() - 207;
	}
	

	if (icol2 > icol3) {
		imax = icol2;
	} else {
		imax = icol3;
	}
	
	if (imax < icol1) {
		imax = icol1;
	}
	if ( $('#col1').length )
	{
		icol1 = $('#col1').height(imax + 207);
	}
	if ( $('#col2').length )
	{
		$('#col2').height(imax);
	}
	if ( $('#col3').length )
	{
		$('#col3').height(imax + 207);
	}
	
}
*/
/*
function cols_resize()
{

	if (document.getElementById('col1')) {
		icol1 = parseInt(document.getElementById('col1').offsetHeight);
	} else {
		icol1 = 0;
	}
	if (document.getElementById('col2')) {
		icol2 = parseInt(document.getElementById('col2').offsetHeight) + 209;
	} else {
		icol2 = 0;
	}
	
	if (document.getElementById('col3')) {
		icol3 = parseInt(document.getElementById('col3').offsetHeight);
	} else {
		icol3 = 0;
	}

	max = 0;
	
	if (icol2 > icol3) {
		imax = icol2;
	} else {
		imax = icol3;
	}
	
	if (imax < icol1) {
		imax = icol1;
	} 
	
	if (document.getElementById("col1")) {
		document.getElementById("col1").style.height = imax + "px";
	}
	if (document.getElementById("col2")) {
		document.getElementById("col2").style.height = (imax - 207) + "px";
	}
	if (document.getElementById("col3")) {
		document.getElementById("col3").style.height = imax + "px";
	}
}
*/
var konami = {
        input:"",
        clear:setTimeout('konami.clear_input()',2000),
        load: function(link) {
                window.document.onkeyup = function(e) {
                        konami.input+= e ? e.keyCode : event.keyCode         
                        if (konami.input == "3838404037393739666513") {
                                konami.code(link)
                                clearTimeout(konami.clear)
                                }
                        clearTimeout(konami.clear)
                        konami.clear = setTimeout("konami.clear_input()",2000)
                        }
        },
        code: function(link) { window.location=link},
        clear_input: function() {
                konami.input="";
                clearTimeout(konami.clear);
        }
}
/*
function cols_resize_col1(iheight) {
	if ( $('#col1').length )
	{
		icol1 = $('#col1').height();
		$('#col1').height(icol1 + iheight);
	}
	if ( $('#col1').length )
	{
		icol1 = $('#col2').height();
		$('#col2').height(icol1 + iheight);
	}
	if ( $('#col3').length )
	{
		icol1 = $('#col3').height();
		$('#col3').height(icol1 + iheight);
	}
	cols_resize();
}*/