/*
 * WKSA subpage JavaScript
 * SWF Object embeds and other stuff
 */

var flashvars = {};
var params = { wmode:"transparent", menu:"false" };
var attributes = {};

swfobject.embedSWF("flash/subflash.swf", "subflash_embed", "964", "240", "9.0.0","flash/expressInstall.swf", flashvars, params, attributes);

function set_geo_id(id){
    document.getElementById('geo_id').value = id;
    document.getElementById('geo_frm').submit();
}

function update_owner_pass(id){
    var pass = $F('owner_update_pass');
    var params = 'type=uop&id=' + id + '&pass=' + pass;
    var ajax = new Ajax.Updater(
        { success: 'pass_update_box' },
        'script/ajax.php?type=uop',
        { method: 'get', parameters: params, onFailure:function(req){ $('pass_update_box').html(req); } }
    );
}

function clear(id){
    $(id).html("");
    $(id).hide();
    return false;
}

function show_lost_password(){
    $('lost_pass_container').show();
}

function hide_lost_password(){
    $('lost_pass_container').hide();
}

function send_owner_rest(){
    var email = $F('owner_email'); // the email address to lookup
    var params = 'type=sorp&email=' + email;
    var ajax = new Ajax.Updater(
        { success: 'lost_pass_container' },
        'script/ajax.php?type=uop',
        { method: 'get', parameters: params, onFailure:function(req){ $('lost_pass_container').html(req); } }
    );
}
