function SignInGoogle(){
    var f = document.getElementById("openid_hidden_form");
	f.openid_identifier.value = "https://www.google.com/accounts/o8/id"; 
	f.signinwith.value = "google";
	f.submit();
}

function validatePAD(url){
    var validatepad = document.getElementById("validatepad");
    validatepad.URL.value = url;
    validatepad.submit();
}

function getOSCategoryID(oscat){
    var oscatid = "";
    if (oscat == "windows") 
        oscatid = "01";
    else 
        if (oscat == "mac") 
            oscatid = "02";
        else 
            if (oscat == "linux") 
                oscatid = "03";
            else 
                if (oscat == "mobile") 
                    oscatid = "04";
                else 
                    oscatid = "00";
    return oscatid;
}

function searchChangeOS(obj){
    var padtube_search_form = document.getElementById("padtube_search_form");
    padtube_search_form["action"] = "/Search/30-" + getOSCategoryID(obj.value) + "-0-0.html";
}

function searchTags(oscat, string){
    var padtube_search_form = document.getElementById("padtube_search_form");
    /*	padtube_search_form [ "action" ] = "/Search/30-" + getOSCategoryID(oscat) + "-0-0.html?q=" + string;	*/
    padtube_search_form["action"] = "/Search/30-" + getOSCategoryID(oscat) + "-0-0.html";
    padtube_search_form.search.value = "company title desc80 keywords";
    padtube_search_form.string.value = string;
    padtube_search_form.ptype.value = "all";
    padtube_search_form.sort.value = "relevance";
    padtube_search_form.page.value = 1;
    padtube_search_form.scope.value = "sub";
    padtube_search_form.submit();
}
