﻿// JScript File
//********** LOADING SECTION *********************************** 
//var j = 0;
//var crossFadeDuration = 3;
//var intervalId = null;
//var interval = 6500;
//var preLoad = new Array();
//var randLoad = new Array();
//Pic = new Array()  
//Pic[0] = 'layout/banner001.jpg';
//Pic[1] = 'layout/banner020.jpg';
//Pic[2] = 'layout/banner003.jpg';
//Pic[3] = 'layout/banner004.jpg';
//Pic[4] = 'layout/banner005.jpg';
//Pic[5] = 'layout/banner006.jpg';
//Pic[6] = 'layout/banner007.jpg';
//Pic[7] = 'layout/banner008.jpg';
//Pic[8] = 'layout/banner009.jpg';
//Pic[9] = 'layout/banner010.jpg';
//Pic[10] = 'layout/banner011.jpg';
//Pic[11] = 'layout/banner012.jpg';
//Pic[12] = 'layout/banner013.jpg';
//Pic[13] = 'layout/banner014.jpg';
//Pic[14] = 'layout/banner015.jpg';
//Pic[15] = 'layout/banner016.jpg';
//Pic[16] = 'layout/banner017.jpg';
//Pic[17] = 'layout/banner018.jpg';
//Pic[18] = 'layout/banner019.jpg';


//var temp = '';
//randLoad[0] = 0;
// 
//for(i = 1; i < 19; i ++)
//{
//    var unique = false;
//    
//    while(unique == false)
//    {
//         var rand_no = Math.floor((18-0)*Math.random()) + 1;
//         unique = true;
//         
//         for (k = 0; k < randLoad.length; k++)
//         {
//           if(rand_no == randLoad[k])
//           {
//                unique = false;
//                break;
//           }
//        } 
//    }
//    randLoad[i] = rand_no;
//}


//for (i = 0; i < Pic.length; i++){
//   preLoad[i] = new Image();
//   preLoad[i].src = Pic[(randLoad[i])];
//}

//intervalId = setInterval('slideShow(1)', interval);
// 

////*************** FUNCTION SLIDESHOW *************************
//function slideShow(direction){
//    var slides = window.document.getElementById('slide');
//    var browserName=navigator.appName; 
//    
//    if(slides != null)
//    {
//        if (browserName=="Microsoft Internet Explorer")
//        {
//            slides.style.filter="blendTrans(duration=2)";
//            slides.filter="blendTrans(duration=crossFadeDuration)";
//            slides.filters.blendTrans.Apply() ; 
//            
//             if (document.all){
//                slides.filters.blendTrans.Play();
//             }    
//        }

//        
//        if(direction < 1)
//        {
//            j = j - 1;
//            if (j < 0){ 
//                j= (Pic.length - 1);
//            }
//             slides.src = preLoad[j].src;
//        }
//        else
//        {
//            j = j + 1;
//            if (j > (Pic.length-1)){ 
//                j=0;
//            }
//              slides.src = preLoad[j].src;
//        }
//    }
//}

// INITIAZIE REQUEST *******************************************
function InitializeRequest(sender, args)
{
    // needed for credit card processing.
    //Disables the page from making any callbacks if another one is already in progress
    if (prm.get_isInAsyncPostBack()) 
    {
        alert('There was already a postback in progress when another control on this form has attempted a postback, \n please wait for the original operation to complete. \n The original operation has most likely had time to complete by the time you have read this message information \n (This is an information message and not a system error message)');
        prm.abortPostBack();                 //cancels current request
        args.set_cancel(true);               //cancels new request
    }
}

// CALENDAR UPDATE *******************************************
function UpdateCalendar(mnth, day)
{
    var days = parseInt($get('ctl00_hdnDay').value);
    var month = parseInt($get('ctl00_hdnMonth').value);
    
    if(mnth > 0 )
    {                          
        month = mnth;
        days = 1;
    }
    else
    {
         days = day;
    }
   
    $get('ctl00_hdnDay').value = days.toString();
    $get('ctl00_hdnMonth').value = month.toString();
    $get('ctl00_btnCalendarUpdate').click();

}

// PRINT RECEIPT***********************************************
function showReceipt()
{
    var a = window.open('','','scrollbars=yes');
    a.document.open("text/html");
    a.document.write('<html><head><link rel="stylesheet" href="css/Styles.css" /><style type="text/css">#frame{background-image:none;background-color:#FFFFFF;}</style></head><body style="padding-left:20px;background-image:none;background-color:#FFFFFF;text-align:center;">');
    a.document.write($get('ctl00_cph1_print').innerHTML);
    a.document.write('</body></html>');
    a.document.close();
    a.print();
}


// AWARDS NOM
function categoryDescription(name)
{
    $get('ctl00_cph1_hdnDesc').value = name;
    $get('ctl00_cph1_btnShowDesc').click();
    
}

//SCRIPT MANAGER END
if(typeof(Sys) !== 'undefined'){
    Sys.Application.notifyScriptLoaded();
}




