var intervalTime = 0;

function Submit(id, height)
{
    var path = "/vote/scriptlet.asp?voteId=" + id + "&color=" + window.parent.document.all.vote.bgColor.replace("#", "") + "&yourAnswer=" + document.all.yourAnswer.value ;

    var html = "<IFRAME ID=votespt FRAMEBORDER=0 SCROLLING=NO WIDTH=140 HEIGHT=" + height +  " marginBottom=0 marginLeft=0 marginRight=0 marginTop=0 SRC=\"" + path + "\"></IFRAME> ";
    window.top.document.all.vote.innerHTML = html ;
}

function Result(id, height)
{
    var path = "/vote/rs_scriptlet.asp?voteId=" + id + "&color=" + window.parent.document.all.vote.bgColor.replace("#", "") ;
    
    var html = "<IFRAME ID=votespt FRAMEBORDER=0 SCROLLING=NO WIDTH=140 HEIGHT=" + height +  " marginBottom=0 marginLeft=0 marginRight=0 marginTop=0 SRC=\"" + path + "\"></IFRAME>";
    if (window.top.document.all.vote)
        window.top.document.all.vote.innerHTML = html ;
}


function showMedia(item_No,VideoPath,oldMediaItURL)
{
    var url = "/showMedia.asp?item_No=" + item_No + "&videoPath=" + VideoPath + "&oldMediaItURL=" + oldMediaItURL;
    document.open(url,"","width=590; height=420; scrollbars=1");
}

function showSummaryNewsSection(itemNo,on)
{
    var itemObj;
    itemObj = "abstract" + itemNo;
    if(on)
    {
        document.all.item(itemObj).style.display = "";
        document.all.abstract15.style.display = "none";
    }
    else
    {
        document.all.item(itemObj).style.display = "none";
        document.all.abstract15.style.display = "";
        if (intervalTime != 0)
            window.clearInterval(intervalTime);
    }    

}


function setIntervalDelay(itemNo,on)
{
    if (on)
        intervalTime = window.setInterval("showSummaryNewsSection(" + itemNo + "," + on +")",250);
    else
        showSummaryNewsSection(itemNo,on);
}

function showSummaryNewsSection1(itemNo,on)
{
    var itemObj;
    itemObj = "abstract" + itemNo;
    if(on)
    {
        document.all.item(itemObj).style.display = "";
    }
    else
    {
        document.all.item(itemObj).style.display = "none";
        if (intervalTime != 0)
            window.clearInterval(intervalTime);
    }    

}


function setIntervalDelay1(itemNo,on)
{
    if (on)
        intervalTime = window.setInterval("showSummaryNewsSection1(" + itemNo + "," + on +")",250);
    else
        showSummaryNewsSection1(itemNo,on);
}

