var jran=null;
if (jran == null) {
	today=new Date();
	jran=today.getTime();
}

var debug = 0;
if ("http://vvi.virage.com:80/cgi-bin/visearch" == "http://vistage.virage.com:80/cgi-bin/visearch") viBase = "http://vistage.virage.com:80/cgi-bin/visearch"
else viBase = "<!-- Error: Tag Not Found -->"

var vistart = "<!-- Error: Tag Not Found -->";
var viend = "<!-- Error: Tag Not Found -->";

function vi_browsercheck() 
{
        var b = navigator.appName
        if (b=="Netscape") this.b = "ns"
        else if (b=="Microsoft Internet Explorer") this.b = "ie"
        else this.b = b
        this.v = parseInt(navigator.appVersion)
        this.p = navigator.appVersion
        this.w = this.p.indexOf("Win")
        this.m = this.p.indexOf("Mac")
        this.ns = (this.b=="ns" && this.v>=4)
        this.nswin = (this.b=="ns" && this.w != -1 && this.v>=4)
        this.nsmac = (this.b=="ns" && this.m != -1 && this.v>=4)
        this.ns4win = (this.b=="ns" && this.w != -1 && this.v==4)
        this.ns4mac = (this.b=="ns" && this.m != -1 && this.v==4)
        this.ns5win = (this.b=="ns" && this.w != -1 && this.v==5)
        this.ns5mac = (this.b=="ns" && this.m != -1 && this.v==5)
        this.ie = (this.b=="ie" && this.v>=4)
        this.iewin = (this.b=="ie" && this.w != -1 && this.v>=4)
        this.iemac = (this.b=="ie" && this.m != -1 && this.v>=4)
        this.ie4win = (navigator.userAgent.indexOf('MSIE 4')>0 && this.w != -1)
        this.ie4mac = (navigator.userAgent.indexOf('MSIE 4')>0 && this.m != -1)
        this.ie5win = (navigator.userAgent.indexOf('MSIE 5')>0 && this.m != -1)
        this.ie5mac = (navigator.userAgent.indexOf('MSIE 5')>0 && this.m != -1)
        if (this.ie5) this.v = 5
        this.min = (this.ns||this.ie)
}
// automatically create the "browser" object
browser_virage = new vi_browsercheck()

// establish unique page level variables
var formName = "viSearchform";
var inputField = "viKeyword";
var radioButton = null;
function vi_Formelements(unique_formName,unique_inputField,unique_radioButton)
{
if(unique_formName != null) formName = unique_formName;
if(unique_inputField != null) inputField = unique_inputField;
if(unique_radioButton != null) radioButton = unique_radioButton;
}


var saveformElement = new Array();
var k = 0;
//viSubmit
function vi_Submit() 
{
var query, urlPost, which, elementValue;
//formName = arguments[0];
//inputField = arguments[1];
if(browser_virage.ns)
        {
        if (inputField != null) query = document.layers['SNOWREPORTS'].document[formName][inputField].value;
        else query = "";
        }
        else
        {
        if (inputField != null) query = document[formName][inputField].value;
        else query = "";
        }
        for(i=0; arguments.length > i; i++) 
        {
        formElement = arguments[i];
        saveformElement[k] = formElement;
        k++
        }
        saveformElement.reverse();
        for(n=0; saveformElement.length > n; n++) 
        {
        formElement = saveformElement[n]
if(browser_virage.ns)
        {
        which = document.layers['SNOWREPORTS'].document.forms[formName][formElement].selectedIndex;
        elementValue = document.layers['SNOWREPORTS'].document[formName][formElement][which].value;
        }
        else
        {
        which = document.forms[formName][formElement].selectedIndex;
        elementValue = document[formName][formElement][which].value;
        }
        if (elementValue != "0") 
        {
        query += " " + elementValue;
        }
        }
        if(browser_virage.ns)document.layers['SNOWREPORTS'].document[formName].query.value = query;
        else document[formName].query.value = query;
}

var number = 20;
var random_number="";
ia=9301;
ic=49297;
imq=233280;
jran = (jran*ia+ic) % imq;
random_number = Math.ceil( (jran/(imq*1.0)) *number);