// Prepend user idenitity with status URL, submit
function submitExtCKLogin() {
    var idURL = 'id.contentkash.com';
    document.extCKLogin.openid_identifier.value = idURL + '/' + document.extCKLogin.id_provided.value;
    document.extCKLogin.submit();
    document.extCKLogin.id_provided.disabled = true;
    if (document.extCKLogin.target == '_blank') {
	$('#ckLoginStatus').html("Confirm Identity in Pop-Up Window");
    }
    return true;
}

// Read a page's GET URL variables and return them as an associative array
function getExtCKUrlVars() {
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++) {
	    hash = hashes[i].split('=');
	    vars.push(hash[0]);
	    vars[hash[0]] = hash[1];
	}
    return vars;
}

// Clear browser status message
function clearCKBrowserStatus() {
    window.status = "";
}

