// JavaScript Document
jQuery.preloadImages = function() 
{
    for (var i = 0; i < arguments.length; i++)
        jQuery("<img>").attr("src", arguments[i]);
}

function queue(szSessID, szQueue) 
{
        var nXMax, nXOffset;
        var szUrl, szOptions;
        var aParams, aVals;

        //Prep for perfect placement
        xMax = screen.width;
        xOffset = xMax - 410;

        //Set the screen display options for our popup window
        szOptions = "location=0,menubar=0,resizable=0,height=450,width=400,";
        szOptions += "screenX=" + xOffset + ",screenY=0,top=0,left=" + xOffset;

        szUrl = "http://" + "www.ioshost1.com" + "/InteractiveDemo/user_login.asp?SID=" + szSessID + "&UID=blank&QUEUE=" + szQueue + "&LID=";
        window.open(szUrl, "WebUser", szOptions);
        return false;
} 

$(document).ready(function() {
    $.preloadCssImages();
}); 


$.jGoogleAnalytics(
     'UA-2684004-1', // Your GA tracker code  
     {
     anchorClick: false, // adds click tracking to *all* anchors  
     clickEvents: null, // e.g. {'.popup': '/popup/nasty'}  
     crossDomainSelector: false, // e.g. 'a.crossDomain'  
     domainName: false, // e.g. 'nottingham.ac.uk'  

     evalClickEvents: null, // e.g. {'menu li a': "'/tabs/'+ $(this).text()"}  
     evalSubmitEvents: null, // e.g. {'menu li a': "'/tabs/'+ $(this).text()"}  

     extensions: [
         'pdf', 'doc', 'xls', 'csv', 'jpg', 'gif', 'mp3',
         'swf', 'txt', 'ppt', 'zip', 'gz', 'dmg', 'xml'
         ], // download extensions to track  

     external: '/external/', // prefix to add to external links  
     mailto: '/mailto/', // prefix to add to email addresses  
     download: '/download/', // prefix to add to downloads  

     organicSearch: null, // e.g. {'search-engine': 'query-term', 'google.nottingham.ac.uk': 'q'}  
     pageViewsEnabled: true, // can be disabled e.g. if only tracking e.g. click events  
     sampleRate: null // e.g. 50 - set the sample rate at 50%  
 }
 );

 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 (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 getParameterByName(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.href);
    if (results == null)
        return "";
    else
        return results[1];
}