var resize_timeout       = false;
var resize_correction   = 225;
var sticky_correction   = 40;
var last_height              = 0;

function resize_do(){
    obi = document.getElementById('content');

    if(document.all){
             var x = ( document.compatMode == "CSS1Compat" ) ? document.documentElement.clientHeight  : document.body.clientHeight ;
    }
    else{
         var x = window.innerHeight;
    }

         if(x == last_height){
               return;
        }

    obi.style.height = '3px';
    var h = x  -   resize_correction;
    obi.style.height = h + 'px';

        //sticky bottom
        obi = document.getElementById('stickybottom');
        if(obi){
             var h = parseInt(obi.style.height);
             var t = x - h - sticky_correction;
             obi.style.top = t + 'px';
        }

}

function init_resize(){

        //form check
        var obj = document.getElementsByName('sameaddress');
        //get first
        if(obj && obj[0]) {
            obj = obj[0];
            toggle_shipping(obj);
        }

        if(resize_timeout){
             window.clearTimeout( resize_timeout );
        }
        resize_timeout = window.setTimeout( 'resize_do()', 20 );
}

function emptySearch(){
        obi = document.getElementById('q');
         if(obi.value == 'Suche'){
                 obi.value  = '';
         }
}

function sicher(){
     return confirm('Sind Sie sicher?');
}


function toggle_shipping(obj) {

    var addr = document.getElementById('shippingaddress');
    if(obj.checked) {
        addr.style.display = 'none';
    }
    else {
        addr.style.display = '';
    }
}

function bb(obj){

}




