var guri = 'http://g.msn.co.jp/_1_jpdl/';
function OBS(n, l)
{
    i = new Image();
    i.src = guri + n + '?' + l.href;
}
function OBTR(n, l, cm, ce, hl)
{
    i = new Image();
    i.src = guri + n + '?' + l.href + '&&cm=' + cm + '&ce=' + ce + '&hl=' + hl;
}
var OBF_TargetForm;
var OBF_GImage = new Image(0, 0);
OBF_GImage.onload  = OBF_OnGImgLoad;
OBF_GImage.onerror = OBF_OnGImgLoad;
var OBF_IsLoading = false;
function OBF(f, n)
{
    if (OBF_IsLoading)
    {
        return true;
    }
    OBF_IsLoading = true;
    OBF_TargetForm = f;
    OBF_GImage.src = guri + n + '?' + f.action;
    return false;
}
var OBFTR_TargetForm;
var OBFTR_GImage = new Image(0, 0);
OBFTR_GImage.onload  = OBFTR_OnGImgLoad;
OBFTR_GImage.onerror = OBFTR_OnGImgLoad;
var OBFTR_IsLoading = false;
function OBFTR(f, n, cm ,ce, hl)
{
    if (OBFTR_IsLoading)
    {
        return true;
    }
    OBFTR_IsLoading = true;
    OBFTR_TargetForm = f;
    OBFTR_GImage.src = guri + n + '?' + f.action + '&&cm=' + cm + '&ce=' + ce + '&hl=' + hl;
    return false;
}
function OBF_OnGImgLoad()
{
    if (OBF_IsLoading)
    {
        OBF_TargetForm.submit();
    }
}
function OBFTR_OnGImgLoad()
{
    if (OBFTR_IsLoading)
    {
        OBFTR_TargetForm.submit();
    }
}
function ConvertTag(f)
{
    f.keyword.value = f.keyword.value.replace(/</g,'').replace(/>/g,'');
}
function ReloadBySelectChange(n, f, cm, ce, hl)
{
	o = f.selectedIndex;
    var href = document.GenreForm.action.replace("date=", "date="+f.options[o].value).replace(/page=[0-9]+/g,"page=1");
    i = new Image();
    i.src = guri + n + '?'  + href + '&&cm=' + cm + '&ce=' + ce + '&hl=' + hl;
	location.href = href;
}
function OpenLargePictureWindow(width, height, n, l, cm, ce, hl)
{
    OBTR(n, l, cm, ce, hl);
    window.open(l.href, "LargePicture", "width=" + width + ", height=" + height + ", toolbar=yes, location=yes, status=no, menubar=yes, scrollbars=yes, resizable=yes");
}
function SetTargetUrl()
{
    document.wordSearch.action = document.pagepath.ArticleResult.value;
}

function redirectURL(obj)
{
    var o = document.getElementById(obj);
    if (o.x.value != "")
    {
        var ao = {};
        ao.href = o.x.value;
        OBTR('1', ao, 'DigitalLifeIntelligenceSelectJob2', o.x.selectedIndex, encodeURIComponent(o.x[o.x.selectedIndex].text));
        window.top.location = o.x.value;
    }
}