function performSearch(){
    location = "/?q=" + document.getElementById('q').value;
    return false;
}

function togglePremLogin(){
    if(document.getElementById('prem_login').style.display == 'none'){
        document.getElementById('prem_login').style.display = '';
    }
    else{
        document.getElementById('prem_login').style.display = 'none';
    }
}
    
function updateOrientation(){
    
    var orientation = window.orientation;
    
    if(orientation == 90){
        document.getElementById('portrait_mode').style.display = 'none';
        document.getElementById('landscape_mode').style.display = 'table';
    }
    else if(orientation == "-90"){
        document.getElementById('portrait_mode').style.display = 'none';
        document.getElementById('landscape_mode').style.display = 'table';
    }
    else{
       document.getElementById('portrait_mode').style.display = 'table';
       document.getElementById('landscape_mode').style.display = 'none'; 
    }
    
    window.scrollTo(0, 1);

}

function toggleHomeScreenAdd(){
    if(document.getElementById('home_screen_inst').style.display == 'none'){
        document.getElementById('home_screen_inst').style.display = '';
    }
    else{
        document.getElementById('home_screen_inst').style.display = 'none';
    }
}
