﻿var gVid = new Array();
    function inArray(arr){
        for(i=0; i<gVid.length; i++){
            if(gVid[i] == arr ){
                return true;
            }
        }
        return false;
    }
    function sendEvent(swf,typ,prm) {
        thisMovie(swf).sendEvent('playpause');
    }
    function getUpdate(typ,pr1,pr2,swf) {
        if( typ == "time") {
            if( pr1 > 0.75) {
                if( inArray(swf) == false) {
                    gVid.push(swf);
                    window.setTimeout(sendEvent(swf,'playpause'),50);
                }
            }
        }
    }
    function thisMovie(swf) {
        if(navigator.appName.indexOf("Microsoft") != -1) {
            return window[swf];
        }else{
            return document[swf];
        }
    }

    function filterSoapResults(script, branch, term){
        document.location.href = script + "?data[term]=" + term + "&data[branch]=" + branch;
    }
