﻿
_which=0
_alreadyVoted=0

 function SetVote(n)
{
    _which = n
}
 function openResultsWindow(poll_id)
{
    popupWin=window.open('/surveys/results.asp?pid='+poll_id,'Survey','width=640,height=530,top=50,left=50,scrollbars=yes,buttons=no,location=no,resizable=no,status=no,directories=no,toolbar=no');
}
 function openArchiveWindow(poll_id)
{
    popupWin=window.open('/surveys/archivelist.asp','Survey','width=640,height=530,top=50,left=50,scrollbars=yes,buttons=no,location=no,resizable=no,status=no,directories=no,toolbar=no');
}
 function openSubmitWindow(poll_id,thisform)
{   
    if (_which == 0)
    {
        alert("Please select an answer before submitting your vote!") 
    }
    else
    {
        if (_alreadyVoted == 0)
        {
            popupWin=window.open('/surveys/results.asp?pid='+poll_id+'&vote='+_which,'remote', 'width=640,height=530,top=50,left=50,scrollbars=yes,buttons=no,location=no,resizable=no,status=no,directories=no,toolbar=no');
        }
        else
            alert("Sorry, but you've already voted once in this survey.  You'll be able to vote again in the next survey!");
        _alreadyVoted=1;
    }   
}

 function SiteUnderConstruction()
{
    popupWin=window.open('/help/SiteUnderConstruction.asp','Survey','width=300,height=200,top=200,left=200,scrollbars=no,buttons=no,location=no,resizable=no,status=no,status=no,directories=no,personalbar=no,dependent=yes,modal=yestoolbar=no');
}

if (navigator.appName.indexOf('Netscape') != -1) 
{
    document.write('<IMG SRC="/ua/ternopil/images/transparent.gif" border="0" height="1" width="550">');
}

function MM_preloadImages() 
{ //v3.0
    var d = document; 
    if (d.images)
    { 
        if(!d.MM_p) 
            d.MM_p = new Array();
         var i,j = d.MM_p.length,a = MM_preloadImages.arguments; 
         for (var i = 0; i < a.length; i++)
            if (a[i].indexOf("#")!= 0)
            { 
                d.MM_p[j] = new Image; 
                d.MM_p[j++].src=a[i];
            }
    }
}

function MM_jumpMenu(targ,selObj,restore)
{ //v3.0
    eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value + "'");
    if (restore) 
        selObj.selectedIndex = 0;
}

_uacct = "UA-2853306-1";
//urchinTracker();


