/*
    carrousel scroller
*/


Event.observe(window, 'load', function () { globalINIT(); }, false);

function globalINIT()
{

}

function toggleDiv(divName)
{
    if(typeof divName == "string")
    {
        if($PT(divName))
        {
            el=$PT(divName);
            if(!el.visible())
            {
                el.style.display="block";
            } else {
                el.style.display="none";
            }
        }
    }
}

function getRandomToken()
{
    var d = new Date();
    return d.getTime();
}

function QueryStringBuilder() {
  this.Url = '';
  this.Pairs = new Array();

  QueryStringBuilder.prototype.GetFullString = function() {
    var queryString = (this.Url.length > 0) ? this.Url + "&" : '';

    for(var key in this.Pairs) {
      if (key=='vari'||key=='edi') {
        queryString += escape(key) + "=" + escape(this.Pairs[key]) + "&";
      }
    }
    
    return queryString.substring(0, queryString.length - 1);
  }
}

function buildQuery(linkid,builder,name,value) {

  builder.Pairs[name] = value;
  document.getElementById(linkid).href = builder.GetFullString();
}



/*
 *
 * GX Functions from here - GX Functions from here - GX Functions from here
 *
 */
//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
    if (window.XMLHttpRequest) {
        return new XMLHttpRequest(); //Not IE
    } else if(window.ActiveXObject) {
        return new ActiveXObject("Microsoft.XMLHTTP"); //IE
    } else {
        //Display your error message here. 
        //and inform the user they might want to upgrade
        //their browser.
        alert("Your browser doesn't support the XmlHttpRequest object.  Better upgrade to Firefox.");
    }
}


function showFlvPlayer(url, width, height) {
 document.write(unescape('%3Cembed src="http://www.vi.nl/static/vi/swf/player.swf" width="' + width + '" height="' + height + '" allowscriptaccess="always" allowfullscreen="true" flashvars="autostart=true&height=250&width=400&file=' + url + '"/%3E'));
}