function notificationType(){
    this.id = '';
    this.width = 410;
    this.logo = 'images/singlesignon/icon_alert.jpg';
    this.message = '';
}

function displayNotification(idType, notificationParameter){
    // Location Message Based On ID Type   
    for(var nLoop=0; nLoop<notification.length; nLoop++){
        if(notification[nLoop].id==idType){       
            var message = notification[nLoop].message;
            if(notificationParameter != "" && notificationParameter != undefined){
                var parmeters = notificationParameter.split("|");
                for(var nCounter=0; nCounter<parmeters.length; nCounter++){
                    var parmeterValues = parmeters[nCounter].split("=");
                    message = message.replace(parmeterValues[0], parmeterValues[1]);
                }            
            }
            $("#dialog_alert div.dialog_message").html(message);
            $("#dialog_alert div.dialog_icon").css('background-image', 'url(' + notification[nLoop].logo + ')');
            $("#dialog_alert" ).dialog( "option", "width", notification[nLoop].width );
            $("#dialog_alert").dialog("open"); 
            return;
        }
    }
    // No Match Found - Display Secondary Notification Parameter    
    var tempNotification = new notificationType();
    $("#dialog_alert div.dialog_message").html(notificationParameter);
    $("#dialog_alert div.dialog_icon").css('background-image', 'url(' + tempNotification.logo + ')');
    $("#dialog_alert" ).dialog( "option", "width", tempNotification.width );
    $("#dialog_alert").dialog("open");
}

var notification = new Array();
notification[0] = new notificationType();
notification[0].id = 'AX1';
notification[0].message = "It appears as if the EDI ActiveX component is not installed.<br><br>Please run the EDI Diagnostics tool or contact customer support for further assistance.";
notification[0].width = 450;
notification[0].logo = 'images/singlesignon/icon_info.jpg';

notification[1] = new notificationType();
notification[1].id = 'AX2';
notification[1].message = "Unable to launch IE in KIOSK mode. Please run the EDI Diagnostics.";
notification[1].logo = 'images/singlesignon/icon_info.jpg';

notification[2] = new notificationType();
notification[2].id = 'VLD1';
notification[2].message = "You must enter your Centre Code, Candidate Number and Order Number.";

notification[3] = new notificationType();
notification[3].id = 'TDF0';
notification[3].message = "You have already sat and completed this test.";
notification[3].width = 450;

notification[4] = new notificationType();
notification[4].id = 'TDF1';
notification[4].message = "This test #wasis# scheduled for #date#.";
notification[4].logo = 'images/singlesignon/icon_info.jpg';

notification[5] = new notificationType();
notification[5].id = 'TDF2';
notification[5].message = "The record for this exam does not have a date.";

notification[6] = new notificationType();
notification[6].id = 'TDF3';
notification[6].message = "We are sorry, we could not find a record matching your Candidate and Order numbers.";
notification[6].width = 450;

notification[7] = new notificationType();
notification[7].id = 'TDF4';
notification[7].message = "There are multiple records in Campus with this candidate number and order number.";
notification[7].width = 450;

notification[8] = new notificationType();
notification[8].id = 'TDF5';
notification[8].message = "You have been scheduled to sit a paper based assessment.";
notification[8].width = 340;

notification[9] = new notificationType();
notification[9].id = 'TDF6';
notification[9].message = "You have been scheduled to sit an Off-Line assessment.";
notification[9].width = 340;

notification[10] = new notificationType();
notification[10].id = 'TDF7';
notification[10].message = "You have been scheduled to sit an ELSA based assesment.<br/>You should logon via <a href='http://elsa.ediplc.com'>http://elsa.ediplc.com</a>.";

notification[11] = new notificationType();
notification[11].id = 'TDF8';
notification[11].message = "The test corresponding to this order (#code#) cannot be launched from here, this maybe because a paper version has not been setup for this component code. Please contact EDI for assistance.";
notification[11].width = 560;

notification[12] = new notificationType();
notification[12].id = 'TDF99';
notification[12].message = "Unknown problem validating your details against Campus.";