﻿//////////////////////////////////////////////////////////////////////////////////
// 
// Start Vnvn_wma_Image_26
// 
//////////////////////////////////////////////////////////////////////////////////

var Vnvn_wma_Image_26 = {

    //=========================================================================
    // Xu ly button Next Back  cua Image small
    //=========================================================================

    Next: function(path, fdr, dv) {
        var sQry = "cmd=100&sData=" + Vnvn_wma_Image_26.findTheDivByID(path).src + "&ProductID=" + fdr + "&idimg=" + path; //+Vnvn_wma_Image_26.GetProductID(fdr);
        Vnvn_wma_Image_26.SendDataToServer(dv, "VNVN_Web/VNVN_19_Server.aspx", "Post", sQry);
    },
    Back: function(path, fdr, dv) {
        var sQry = "cmd=101&sData=" + Vnvn_wma_Image_26.findTheDivByID(path).src + "&ProductID=" + fdr + "&idimg=" + path; //+Vnvn_wma_Image_26.GetProductID(fdr);
        Vnvn_wma_Image_26.SendDataToServer(dv, "VNVN_Web/VNVN_19_Server.aspx", "Post", sQry);
    },

    ////////////////////////////////////////////////
    // start           Print News 
    ////////////////////////////////////////////////


    PrintNews: function(div2, div3, div4) //phan nay de Print page tren trang product  detail
    {
        if (navigator.appName == "Microsoft Internet Explorer") {
            fileCss = 'IE.css';
        }
        else fileCss = 'FF.css';
        w = open();
        w.document.writeln('<html>');
        w.document.writeln('<head>');
        w.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
        w.document.writeln('<link rel="stylesheet" href="../App_Themes/Skin1/' + fileCss + '" type="text/css" />');
        w.document.writeln('</head>');
        w.document.writeln('<body topmargin=3 leftmargin=0 marginheight=3 marginwidth=0  >');
        w.document.writeln('<center>')
        w.document.writeln('<table width="500"  cellspacing="0" cellpadding="0">');
        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2">');
        w.document.writeln('<img src="../App_Themes/Skin1/images/logo.png" id="logo" />');
        w.document.writeln('</th>');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<td style="padding-left:10px;padding-top:10px;">');
        w.document.writeln(document.getElementById(div2).innerHTML); // lay title product    
        w.document.writeln('</td>');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<td style="font-size:11px;" >');
        w.document.writeln(document.getElementById(div3).innerHTML); //lay tat ca thong tin lien quan den product    
        w.document.writeln('</td>');
        w.document.writeln('</tr>');

        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2" align="center" style="font-size:11px;padding:10px 0px;">');
        w.document.writeln('<img  src="../App_Themes/Skin1/images/Img_Print_20x18.jpg" alt="Print" width="20" height="18" id="imgPrint"/>');
        w.document.writeln('<a onclick="javascript:window.print();" style=" cursor:pointer" >');
        w.document.writeln('Print this page');
        w.document.writeln('</a>');
        w.document.writeln('</th >');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2">');
        w.document.writeln(document.getElementById(div4).innerHTML); //lay dong chu copyright 
        w.document.writeln('</th>');
        w.document.writeln('</tr>');

        w.document.writeln('</table >');
        w.document.writeln('</center>');
        w.document.writeln('</body>');
        w.document.writeln('</html>');
        w.document.title = document.title;
        w.document.close();
        return false;
    },

    ////////////////////////////////////////////////
    // end          Print page  
    ////////////////////////////////////////////////

    ////////////////////////////////////////////////
    // start           Print page 
    ////////////////////////////////////////////////


    PrintPage: function() //phan nay de Print page tren trang product  detail
    {
        if (navigator.appName == "Microsoft Internet Explorer") {
            fileCss = 'IE.css';
        }
        else fileCss = 'FF.css';
        w = open();
        w.document.writeln('<html>');
        w.document.writeln('<head>');
        w.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
        w.document.writeln('<link rel="stylesheet" href="../App_Themes/Skin1/' + fileCss + '" type="text/css" />');
        w.document.writeln('<style>');
        w.document.writeln('body{line-height:1.5em;font-family:Tahoma;font-size:13px;}.MVF_Footer_Copyright_WhiteText{color:#000;}');
        w.document.writeln('.ASIA_Footer_Copyright_WhiteText{color:#000000;font-weight:bold;font-family:Tahoma;font-size:13px;padding-left:4px;text-decoration:none;}');
        w.document.writeln('.Css_Bg_Dics{background-image:url(App_themes/Skin1/images/bg_songlist.jpg);background-repeat:no-repeat;float:left;clear:both;font-family:tahoma;font-size:12px;font-weight:bold;margin-bottom:5px;padding-left:8px;text-transform:uppercase;width:523px;}');
        w.document.writeln('.EGF_Bkg_A5_TopBorder_Product{width:321px} .EGF_Div_TitleProductDetail{float:left;width:321px;} .EGF_Div_TitleProductDetail span{width:310px;}');
        w.document.writeln('</style>');
        w.document.writeln('<script type="text/javascript"> function Off(){document.getElementById("gAdd_ibt_AddToCart_A5_005").style.display = document.getElementById("pnl_A5_L6_X2_Y5_009").style.diplay = document.getElementById("pnl_A5_L6_X2_Y5_009").style.display = "none";document.getElementById("pnl_A5_L6_X2_Y7_009").style.display = "none";}  </script>');
        w.document.writeln('</head>');
        w.document.writeln('<body topmargin=3 leftmargin=0 marginheight=3 marginwidth=0>');
        w.document.writeln('<center>')
        w.document.writeln('<table  cellspacing="0" cellpadding="2" width="660">');
        w.document.writeln('<tr>');
        w.document.writeln('<td colspan="2">');
        w.document.writeln('<img src="../App_Themes/Skin1/images/logo.png" id="logo" />');
        w.document.writeln('</td>');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<td style="font-size:12px;vertical-align:top;">');
        w.document.writeln('<table>');
        w.document.writeln('<tr>');
        w.document.writeln('<td style="font-size:12px;width:325px;" valign="top" >');
        w.document.writeln(document.getElementById('pnl_A5_L5_X2_Y1_005').innerHTML); /*//lay tam hinh       */
        w.document.writeln('</td>');
        w.document.writeln('<td style="font-size:12px;vertical-align:top;line-height: 1.5em;">');
        w.document.writeln(document.getElementById('pnl_A5_L6_X5_Y3_99').innerHTML);
        w.document.writeln("<script>Off();</script>");
        w.document.writeln('</td>');
        w.document.writeln('</tr>');
        w.document.writeln('</table>');
        w.document.writeln('</td>');
        w.document.writeln('</tr>');

        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2" align="left" style="font-size:11px;">');
        w.document.writeln('<img  src="../App_Themes/Skin1/images/Img_Print_20x18.jpg" alt="Print" width="20" height="18" id="imgPrint"/>');
        w.document.writeln('<a onclick="javascript:window.print();" style=" cursor:pointer" >');
        w.document.writeln('Print this page');
        w.document.writeln('</a>');
        w.document.writeln('</th >');
        w.document.writeln('</tr>');


        w.document.writeln('</table >');
        w.document.writeln('</center>');
        w.document.writeln('</body>');
        w.document.writeln('</html>');
        w.document.title = document.title;
        w.document.close();
        return false;
    },

    ////////////////////////////////////////////////
    // end          Print page  
    ////////////////////////////////////////////////


    ////////////////////////////////////////////////
    // start           Print page song list
    ////////////////////////////////////////////////
    PrintPageSonglist: function(div1, div2, div3, div4, div5) //phan nay de Print page tren trang product  detail
    {
        if (navigator.appName == "Microsoft Internet Explorer") {
            fileCss = 'IE.css';
        }
        else fileCss = 'FF.css';
        w = open();
        w.document.writeln('<html>');
        w.document.writeln('<head>');
        w.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
        w.document.writeln('<link rel="stylesheet" href="../App_Themes/Skin1/' + fileCss + '" type="text/css" />');
        w.document.writeln('</head>');
        w.document.writeln('<body topmargin=3 leftmargin=0 marginheight=3 marginwidth=0 >');
        w.document.writeln('<center>')
        w.document.writeln('<table style="font-size:10"  cellspacing="0" cellpadding="0" >');
        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2">');
        w.document.writeln('<img src="../App_Themes/Skin1/images/logo.png" id="logo" />');
        w.document.writeln('</th>');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<th>');
        w.document.writeln(document.getElementById(div2).innerHTML); // lay tam hinh   
        w.document.writeln('</th>');
        w.document.writeln('<th align="right" style="width:300px;">');
        w.document.writeln('<div class="Css_Div_A5_MiddleCenter">');
        w.document.writeln(document.getElementById(div4).innerHTML); // lay title product          
        w.document.writeln(document.getElementById(div1).innerHTML); //lay tat ca thong tin lien quan den product    
        w.document.writeln('</div>');
        w.document.writeln('</th>');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2" align="left">');
        w.document.writeln('<img  src="../App_Themes/Skin1/images/Img_Print_20x18.jpg" alt="Print" width="20" height="18" id="imgPrint"/>');
        w.document.writeln('<a onclick="javascript:window.print();" style=" cursor:hand" >');
        w.document.writeln('Print this page');
        w.document.writeln('</a>');
        w.document.writeln('</th >');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2">');
        div = document.getElementById(div5).innerHTML;
        w.document.writeln(div); //lay song list 
        w.document.writeln('</th>');
        w.document.writeln('</tr>');
        w.document.writeln('<tr>');
        w.document.writeln('<th colspan="2">');
        w.document.writeln(document.getElementById(div3).innerHTML); //lay dong chu copyright 
        w.document.writeln('</th>');
        w.document.writeln('</tr>');
        w.document.writeln('</table >');
        w.document.writeln('</center>');
        w.document.writeln('</body>');
        w.document.writeln('</html>');
        w.document.title = document.title;
        w.document.close();
        return false;
    },

    ////////////////////////////////////////////////
    // end           Print page song list
    ////////////////////////////////////////////////

    //=========================================================================
    // Print Order
    //=========================================================================
    PrintOrder: function(div1, div3) //phan nay de Print page tren trang Order
    {
        w = open();
        var ssStyle = "";
        if (navigator.appName == "Microsoft Internet Explorer") {
            FileCss = 'IE.css';
            ssStyle = '<style>.EGF_Div_Confirmation_Col2{text-align:left;width:20%}.EGF_Bkg_Confirmation_Brown_Right,.EGF_Bkg_Confirmation_Brown,{text-align:left;width:280px!important} .EGF_Div_Confirmation_Col1{width:280px!important;float:left;clear:right;} body{line-height:1.5em!important;}#pnl_A5_L5_X2_Y1_025{width:660px!important}.Css_div_Title_Confirm{width:220px;} .EGF_Div_Confirmation_ProductTitle {width:268px;} .Css_Div_Parent_ViewCart,.EGF_Bkg_Confirmation_ShippingInformation,.EGF_Bkg_TopOrderOverview{width:660px! important;} .EGF_Bkg_Confirmation_Blue{width:300px;}</style>';
        }
        else {
            FileCss = 'FF.css';
            ssStyle = '<style>.EGF_Div_Confirmation_Col2{text-align:left;width:20%} .EGF_Div_Confirmation_Col1{width:294px;} body{line-height:1.5em;}#pnl_A5_L5_X2_Y1_025{width:660px!important}.Css_div_Title_Confirm{width:220px;} .EGF_Div_Confirmation_ProductTitle {width:200px;} .Css_Div_Parent_ViewCart,.EGF_Bkg_Confirmation_ShippingInformation,.EGF_Bkg_TopOrderOverview{width:660px! important;} .EGF_Bkg_Confirmation_Blue{width:300px;}</style>';
        }

        w.document.writeln('<html>');
        w.document.writeln('<head>');
        w.document.writeln('<title> PrintOrderPage </title>');
        w.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
        w.document.writeln('<link rel="stylesheet" href=../App_Themes/Skin1/' + FileCss + ' type="text/css" />');

        w.document.writeln(ssStyle);
        w.document.writeln('</head>');
        w.document.writeln('<body topmargin="3" leftmargin="0" marginheight="3" marginwidth="0">');
        w.document.writeln('<center>');
        w.document.writeln('<div style="width:660px;font-size:12px;">');
        w.document.writeln('<div style="text-align:center;">');
        w.document.writeln('<img src="../App_Themes/Skin1/images/logo.png" id="logo" />');
        w.document.writeln('</div>');

        w.document.writeln('<div style="margin-top:20px;bgcolor:red;text-align:left">');
        w.document.writeln(document.getElementById(div1).innerHTML); //lay tat ca thong tin lien quan den product
        w.document.writeln('</div>');

        w.document.writeln('<div  style="float:left; text-align:center; width:660px;">');
        w.document.writeln('<a onclick="javascript:window.print();" style="cursor:pointer" >');
        w.document.writeln('<img  src="../App_Themes/Skin1/images/Img_Print_20x18.jpg" alt="Print" width="20" height="18" id="imgPrint"/>');
        w.document.writeln('</a>');
        w.document.writeln('<a onclick="javascript:window.print();" style="cursor:pointer" >');
        w.document.writeln('Print this page');
        w.document.writeln('</a>');
        w.document.writeln('<a onclick="javascript:window.close();" style=" cursor:pointer" >');
        w.document.writeln(' |  Close');
        w.document.writeln('</a>');
        w.document.writeln('</div>');

        w.document.writeln('<br />');
        w.document.writeln('<br />');

        w.document.writeln('<div style="float:left;clear:both;text-align:center;width:660px;">');
        w.document.writeln(document.getElementById(div3).innerHTML); //lay dong chu copyright 
        w.document.writeln('</div>');

        w.document.writeln('</div>');
        w.document.writeln('</center>');
        w.document.writeln('</body>');
        w.document.writeln('</html>');
        w.document.close();
        return false;
    },
    //=========================================================================
    // embedPlayer  play file windown media
    //=========================================================================
    embedPlayer: function(MP3URL, div2, i) {
        // Get Operating System sQry
        var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1;
        if (isWin) { // Use MIME type application/x-mplayer2
            visitorOS = "Windows";
        } else { // Use MIME type audio/mpeg, audio/x-wav, etc.
            visitorOS = "Other";
        }
        var audioURL = Vnvn_wma_Image_26.CutString(MP3URL) + i; //MP3URL;
        var objTypeTag = "application/x-mplayer2"; // The MIME type to load the WMP plugin in non-IE browsers on Windows
        if (visitorOS != "Windows") { objTypeTag = "audio/mpeg" }; // The MIME type for Macs and Linux 

        var ctr2 = document.getElementById("dd");
        ctr2.value = audioURL;
        var ctr3 = document.getElementById("kk");
        ctr3.value = objTypeTag;
        var ctr1 = Vnvn_wma_Image_26.findTheDivByID(div2);
        ctr1.innerHTML = "<object  id=\"OD\" name=\"OD\" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" width=\"160\" height=\"150\" >" +
                    "<param id=\"kk\" name='type' value='" + objTypeTag + "'>" +
                    "<param id=\"dd\" name=\"URL\" value=\"" + audioURL + "\" />" +
                    "<param name=\"Volume\" value=\"20\" />" +
                     "<param name=\"Loop\" value=\"20\" />" +
                    "<param name=\"EnableContextMenu\" value=\"false\"/>" +
                    "<embed id=EID  src ='" + audioURL + "' type='" + objTypeTag +
                    "' autoplay='true' loop='20' enablecontextmenu='0' showcontrol='0'  volume='20' autostart='1' width=\"160\" height=\"150\"  controller='1' showstatusbar='1' ></embed>" +
                    "</object>";
    },
    CutString: function(str) // cat chuoi duong dan de loai bo  ki tu " ~ " vd: ~/image/anh.jpg  ---> image/anh.jpg
    {
        var path = "";
        var ar = new Array();
        ar = str.split('/');
        for (var i = 1; i < ar.length; i++) {
            if (i == ar.length - 1) {
                path += ar[i];
            }
            else {
                path += ar[i] += "/";
            }
        }
        return path;
    },

    GetProductID: function(Pro) {
        var path = "";
        var ar = new Array();
        ar = Pro.split('?Pid=');
        for (var i = 1; i < ar.length; i++) {
            path += ar[i];
        }
        return path;
    },
    //=========================================================================
    // Ajax
    //=========================================================================
    Ajax: function() {
        if (window.XMLHttpRequest) {
            xmlhttp = new XMLHttpRequest();
        } else {
            try {
                xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {
                    xmlhttp = false;
                }
            }
        }
        return xmlhttp;
    },
    //=========================================================================
    // Ajax :: Method 1, Send Data to Server
    //=========================================================================    
    SendDataToServer: function(sCtrID, sUrl, sMethod, sQry) {
        clientCtr = sCtrID;
        xmlhttp = Vnvn_wma_Image_26.Ajax();
        if (xmlhttp) {
            xmlhttp.open(sMethod, sUrl, true);
            xmlhttp.onreadystatechange = Vnvn_wma_Image_26.ProcessAjax;
            xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xmlhttp.send(sQry);
        } else {
            alert('Browser do not support Ajax!');
        }
    },


    //=========================================================================
    // Ajax :: Process
    //=========================================================================
    ProcessAjax: function() {
        Vnvn_wma_Image_26.OnPleaseWait(clientCtr);
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {

            var sReply = xmlhttp.responseText;
            var theDvContent = Vnvn_wma_Image_26.findTheDivByID(clientCtr);
            try {
                theDvContent.innerHTML = sReply;
            } catch (ex) { }
        }
    },

    //=========================================================================
    // Ajax :: Method 2, Send Data to Server
    //=========================================================================    
    SendToServer: function(sFun, sUrl, sMethod, sQry) {
        xmlhttp = Vnvn_wma_Image_26.Ajax();
        if (xmlhttp) {
            xmlhttp.open(sMethod, sUrl, true);
            xmlhttp.onreadystatechange = sFun;
            xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xmlhttp.send(sQry);
        } else {
            alert('Browser do not support Ajax!');
        }
    },
    //=========================================================================
    // Ajax :: On Please wait 
    //=========================================================================
    OnPleaseWait: function(clientCtr) {
        var ctr = Vnvn_wma_Image_26.findTheDivByID(clientCtr);
        ctr.innerHTML = "Loading...";
    },


    //================================================================
    // Find Div
    //================================================================
    findTheDivByID: function(sID) {

        if (window.document.all) {
            theDv = window.document.all[sID];
        }
        else if (document.layers) {
            theDv = document.layers[sID];
        }
        else if (document.getElementById) {
            theDv = document.getElementById(sID);
        }
        else {
            alert('Browser do not support Div');
        }
        return theDv;
    },



    //================================================================
    // LargeImage
    //================================================================

    NextLargeImage: function() // su dung de cho button "Next"  o trang view LargeImg ( file hinh  co property Eextra Largeimage) 
    {
        var divactive;
        var divnext;
        var count = Vnvn_wma_Image_26.findTheDivByID('arrayImg').attributes['count'].value;
        if (count > 28) { count = 28; }
        var ar = Array(count);
        for (var i = 1; i <= count; i++) {
            ar[i - 1] = "Image" + i;
        }
        for (var j = 0; j < count; j++) {
            divactive = Vnvn_wma_Image_26.findTheDivByID(ar[j]);
            if (divactive.className == "Css_LargImage") {
                if (j == ar.length - 1) {
                    divactive.className = "Css_LargImageInvisible";
                    divnext = Vnvn_wma_Image_26.findTheDivByID(ar[0]);
                    divnext.className = "Css_LargImage";
                    Vnvn_wma_Image_26.findTheDivByID("ImageCenter").src = divnext.attributes['lbl_Variable'].value;
                    break;
                }
                else {
                    divactive.className = "Css_LargImageInvisible";
                    divnext = Vnvn_wma_Image_26.findTheDivByID(ar[j + 1]);
                    divnext.className = "Css_LargImage";
                    Vnvn_wma_Image_26.findTheDivByID("ImageCenter").src = divnext.attributes['lbl_Variable'].value;
                    break;
                }
            }
        }
    },
    BackLargeImage: function() // su dung de cho button  "Back" o trang view LargeImg ( file hinh  co property Eextra Largeimage) 
    {
        var divactive;
        var divnext;
        var count = Vnvn_wma_Image_26.findTheDivByID('arrayImg').attributes['count'].value;
        if (count > 28) { count = 28; }
        var ar = Array(count);
        for (var i = 1; i <= count; i++) {
            ar[i - 1] = "Image" + i;
        }
        for (var j = 0; j < count; j++) {
            divactive = Vnvn_wma_Image_26.findTheDivByID(ar[j]);
            if (divactive.className == "Css_LargImage") {
                if (j == 0) {
                    divactive.className = "Css_LargImageInvisible";
                    divnext = Vnvn_wma_Image_26.findTheDivByID(ar[ar.length - 1]);
                    divnext.className = "Css_LargImage";
                    Vnvn_wma_Image_26.findTheDivByID("ImageCenter").src = divnext.attributes['lbl_Variable'].value;
                    break;
                }
                else {
                    divactive.className = "Css_LargImageInvisible";
                    divnext = Vnvn_wma_Image_26.findTheDivByID(ar[j - 1]);
                    divnext.className = "Css_LargImage";
                    Vnvn_wma_Image_26.findTheDivByID("ImageCenter").src = divnext.attributes['lbl_Variable'].value;
                    break;
                }
            }
        }
    },
    ClickViewImg: function(img_id) // su dung cho su kien onmouse len cac samll image de thay doi mau va view  Extralargeimage len
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('arrayImg').attributes['count'].value;
        var divactive;
        if (count > 28) { count = 28; }
        var ar = Array(count);
        for (var i = 1; i <= count; i++) {
            ar[i - 1] = "Image" + i;
        }
        for (var j = 0; j < count; j++) {
            divactive = Vnvn_wma_Image_26.findTheDivByID(ar[j]);
            s = Vnvn_wma_Image_26.findTheDivByID(img_id).attributes['lbl_Variable'].value

            if (divactive.className == "Css_LargImage" && divactive.id != img_id) {
                Vnvn_wma_Image_26.findTheDivByID("ImageCenter").src = s;
                Vnvn_wma_Image_26.findTheDivByID(img_id).className = "Css_LargImage";
                divactive.className = "Css_LargImageInvisible";
                break;
            }
        }
    },

    NextImages: function()//su dung cho nut Next o tab Gallery (cung la Large Image nhung o page khac) moi lan thuc thi se thay doi 7 image
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes['count'].value;
        var arr = Array(count);
        var Exar = Array(count);
        for (var i = 0; i < count; i++) {
            arr[i] = Vnvn_wma_Image_26.CutString(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes["Simg" + i].value);
            Exar[i] = Vnvn_wma_Image_26.CutString(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes["Eximg" + i].value);
        }

        var temp = Vnvn_wma_Image_26.ArImgNext(Vnvn_wma_Image_26.GetIndexEndImg());
        var arind = new Array();
        arind = temp.split('/');
        for (var i = 0; i < 7; i++) {
            Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_Image' + i).src = arr[arind[i]];
            Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_Image' + i).attributes['lbl_Variable'].value = Exar[arind[i]];
        }
        Vnvn_wma_Image_26.OnmouseImg('usc_ViewLargeImage_26_A4_004_Image0');
        Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_ImageCenter').src = Exar[arind[0]];
    },
    BackImages: function()//su dung cho nut Back o tab Gallery (cung la Large Image nhung o page khac) moi lan thuc thi se thay doi 7 image
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes['count'].value;
        var arr = Array(count);
        var Exar = Array(count);
        for (var i = 0; i < count; i++) {
            arr[i] = Vnvn_wma_Image_26.CutString(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes["Simg" + i].value);
            Exar[i] = Vnvn_wma_Image_26.CutString(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes["Eximg" + i].value);
        }

        var temp = Vnvn_wma_Image_26.ArImgBack(Vnvn_wma_Image_26.GetIndexStartImg());
        var arind = new Array();
        arind = temp.split('/');
        dem = 6;
        for (var i = 0; i < 7; i++) {
            Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_Image' + i).src = arr[arind[dem]];
            Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_Image' + i).attributes['lbl_Variable'].value = Exar[arind[dem]];
            dem--;
        }
        Vnvn_wma_Image_26.OnmouseImg('usc_ViewLargeImage_26_A4_004_Image6');
        Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_ImageCenter').src = Exar[arind[0]];

    },
    ArImgNext: function(ind)// phat sinh mot day so chua cac vi tri moi cho tam anh khi nhan nut Next 
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes['count'].value;
        var str = "";
        var t = 0;
        var dem = ind + 1;
        for (var i = 0; i < 7; i++) {
            if (dem < count) {
                str += dem + "/";
                dem++
            }
            else {
                if (i == 6) {
                    str += t;
                    t++;

                }
                else {
                    str += t + "/";
                    t++;
                }
            }
        }
        return str;
    },
    ArImgBack: function(ind) // phat sinh mot day so chua cac vi tri moi cho tam anh khi nhan nut Next 
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes['count'].value;
        var str = "";
        var t = count - 1;
        var dem = ind - 1;
        for (var i = 0; i < 7; i++) {
            if (dem >= 0) {
                str += dem + "/";
                dem--
            }
            else {
                if (i == 6) {
                    str += t;
                    t--;

                }
                else {
                    str += t + "/";
                    t--;
                }
            }
        }
        return str;
    },
    GetIndexEndImg: function()// lay vi tri cuoi cung trong mot day 7 tam anh
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes['count'].value;
        for (var i = 0; i < count; i++) {
            t1 = Vnvn_wma_Image_26.CutStringend(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes["Simg" + i].value);
            t2 = Vnvn_wma_Image_26.CutStringend(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_Image6').src);
            if (t1 == t2) {
                return i;
            }
        }
    },
    GetIndexStartImg: function() // lay vi tri dau tien trong mot day 7 tam anh
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes['count'].value;
        for (var i = 0; i < count; i++) {
            t1 = Vnvn_wma_Image_26.CutStringend(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes["Simg" + i].value);
            t2 = Vnvn_wma_Image_26.CutStringend(Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_Image0').src);
            if (t1 == t2) {
                return i;
            }
        }
    },

    CutStringend: function(str) //lay phan tu cuoi cung trong array (tuc la Phan tu chi chua ten file khong bao gom cac thu muc khac)
    {
        var path = "";
        var ar = new Array();
        ar = str.split('/');
        path = ar[ar.length - 1];
        return path;
    },
    OnmouseImg: function(img) //su kien on mouse tren tranf Gallery (view Large Image)
    {
        var count = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_arrayImg').attributes['count'].value;
        var leght = 7;
        if (count <= 7) {
            leght = count;
        }
        for (var j = 0; j < leght; j++) {
            divactive = Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_Image' + j);
            s = Vnvn_wma_Image_26.findTheDivByID(img).attributes['lbl_Variable'].value

            if (divactive.className == "Css_LargImage" && divactive.id != img) {
                Vnvn_wma_Image_26.findTheDivByID('usc_ViewLargeImage_26_A4_004_ImageCenter').src = s;
                Vnvn_wma_Image_26.findTheDivByID(img).className = "Css_LargImage";
                divactive.className = "Css_LargImageInvisible";
                break;
            }
        }
    },


    _KeepImg: null,
    ClickViewImgLarge: function(img_id, arrImg) // su dung cho su kien onmouse len cac samll image de thay doi mau va view  Extralargeimage len
    {
        if (this._KeepImg)
            this._KeepImg.style.border = "solid 1px #000";
        this._KeepImg = Vnvn_wma_Image_26.findTheDivByID(img_id);
        this._KeepImg.style.border = "solid 3px red";

        var s;
        var obj = Vnvn_wma_Image_26.findTheDivByID(img_id);
        s = (obj.lbl_Variable || obj.attributes.getNamedItem('lbl_Variable').value).replace('../', '');
        Vnvn_wma_Image_26.findTheDivByID("ibt_MediumImage_A5_005").src = s;
    },
    _Position: 0,
    GetImageFromArr: function(arrSmall, arrLarge, DefaultCount, Dvid) {
        var pnl = Vnvn_wma_Image_26.findTheDivByID(Dvid);
        pnl.innerHTML = "";
        var arrSimg = arrSmall.split(',');
        var arrLimg = arrLarge.split(',');
        var div = document.createElement("div");
        div.style.marginTop = "25px";
        for (var i = this._Position; i < this._Position + DefaultCount; i++) {
            var img = document.createElement("img");
            img.style.marginRight = "8px";
            img.style.border = "solid 1px #000";
            img.id = "Image" + i;
            img.lbl_Variable = arrLimg[i].replace('~/', '../');
            img.src = arrSimg[i].replace('~/', '');
            img.onclick = this.ClickViewImgLarge.bind(null, img.id, arrSimg.length);
            div.appendChild(img);

        }
        pnl.appendChild(div);


    },

    ClickNextImgSmall: function(arrSmall, arrLarge, DefaultCount, Dvid) {
        var arrSimg = arrSmall.split(',');
        if (this._Position >= arrSimg.length - DefaultCount - 1) return false;
        this._Position = this._Position + 1;
        this.GetImageFromArr(arrSmall, arrLarge, DefaultCount, Dvid);
        return false;
    },
    ClickBackImgSmall: function(arrSmall, arrLarge, DefaultCount, Dvid) {
        if (this._Position <= 0) return false;
        this._Position = this._Position - 1;
        this.GetImageFromArr(arrSmall, arrLarge, DefaultCount, Dvid, false);
        return false;
    },
    embedPlayer2: function(MP3URL, div2, i) {
        // Get Operating System sQry
        var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1;
        if (isWin) { // Use MIME type application/x-mplayer2
            visitorOS = "Windows";
        } else { // Use MIME type audio/mpeg, audio/x-wav, etc.
            visitorOS = "Other";
        }
        var ctr1 = Vnvn_wma_Image_26.findTheDivByID(div2);
        var sUrl = Vnvn_wma_Image_26.CutString(MP3URL); // + i ;
        sUrl = "/" + sUrl;
        ctr1.innerHTML = "<embed width=\"157px\" height='160px' bgcolor='#FF0' flashvars=\"AudioUrl=" + sUrl + "&page=../VNVN_Web/PlayFlash.aspx\" scale='noscale' quality='high'  name=\"MP\" id=\"MP\" src=\"../VNVN_Swf/SendData.swf\" type=\"application/x-shockwave-flash\"></embed>";

    }


}
Function.prototype.bind = function(){    
    
    var method = this;//this la function truyen vao
    
    if(arguments.length < 2 && arguments[0] === undefined)
        return this;
    //arguments nay chi read ,ko co cac phuong thuc nhu 1 mang binh thuong ma ta khai bao de su dung 
        
    var args = [];
    for(i=0;i<arguments.length; i++)
    {
        args.push(arguments[i]);
    }
    var object = args.shift();//shift lay ra fan tu dau tien cua mang.  
    return function(){
        return method.apply(object,args);//truyen args cho method
    };   

}

//////////////////////////////////////////////////////////////////////////////////
// 
// End Vnvn_wma_Image_26
// 
//////////////////////////////////////////////////////////////////////////////////

function getNewsList(event,pageid,object)
{
    pagingOptionsTop.onchange		= getNewsList_Add;
	pagingOptionsBottom.onchange	= getNewsList_Add;			
	
	getNewsList_Add(null,null,null,null,event,pageid);
	
	return false;
}
function getNewsList(event,pageid)
{
    pagingOptionsTop.onchange		= getNewsList_Add;
	pagingOptionsBottom.onchange	= getNewsList_Add;			
	
	getNewsList_Add(null,null,null,null,event,pageid);		
	        
	return false;
}
function getNewsList_Add(curPage, pSize, sort, asc,event,pageid)
{  
    if($("pnl_A5_L6_X2_Y3_005")!=null)
    {
  	    if (initPaging == false)
	    {
		    pagingOptionsTop.InitPaging();
		    pagingOptionsBottom.InitPaging();
		    initPaging = true;
	    }

	    if (!curPage)	curPage = 1;
	    if (!pSize)		pSize = 16;
	    if (!sort)		sort = '';
	    if (!asc)		asc = 1;
	    
        if(pageid==null || pageid =="")
            pageid = savePaging3[6];
                    
	    //Thay cho nay = tim kiem
        new Ajax.Request(s_Path + "VNVN_Web/VNVN_19_Server.aspx",
	    {
	        method: "post", // Setup Method            
	        parameters:
		    {
		        cmd: 3005,
		        curPage: curPage,
		        pSize: pSize,
		        sort: sort,
		        asc: asc,
		        PageID: pageid

		    },
	        onSuccess: function(transport) { // Event Success --> do...
	            var response = transport.responseText;
	            if (response != "") {
	                var pagingInfo = response.substring(0, 39).split(";");
	                response = response.substring(39);            

	                pagingOptionsTop.SetPaging(curPage, pSize, sort, asc, pagingInfo[0] * 1, pagingInfo[1] * 1);
	                pagingOptionsBottom.SetPaging(curPage, pSize, sort, asc, pagingInfo[0] * 1, pagingInfo[1] * 1);
	                savePaging3 = [curPage, pSize, sort, asc, pagingInfo[0] * 1, pagingInfo[1] * 1, pageid];

	                OffPleaseWait("AdminDvWait");

	                if (pagingInfo[1] * 1 <= 1) {
	                    $("pnl_A5_L6_X2_Y1_005").style.display = "none";
	                    $("pnl_A5_L6_X2_Y5_005").style.display = "none";
	                    if (pagingInfo[0] * 1 <= 1)
	                        window.open(Path100 + "1-212190_6-" + pagingInfo[2] * 1+"/", "_self");
	                    else {
	                            $("pnl_A5_L6_X2_Y3_005").innerHTML = response;
	                            var childs = $("pnl_A5_L6_X2_Y3_005").getElementsByTagName("a");
	                            if (childs.length > 0) {
	                                ToggleDisplayNewsDescription(childs[0]);
	                            
	                        }
	                        
	                    }
	                }
	                else {
	                    $("pnl_A5_L7_X2_Y1_117").style.display = "block";
	                    $("pnl_A5_L7_X2_Y5_113").style.display = "block";
	                    $("pnl_A5_L6_X2_Y3_005").innerHTML = response;
	                }
	            }
	            else {
	                $("pnl_A5_L6_X2_Y1_005").style.display = "none";
	                $("pnl_A5_L6_X2_Y5_005").style.display = "none";
	            }

	        },
	        onFailure: function() { alert(sError); OffPleaseWait("AdminDvWait"); } // Event Failure --> do...     
	    });
	}
	
}





function LoadArticleDetail(o, event)
{

    ID=o.id.split("_")[o.id.split("_").length-1];    
    if($("hdf_Product")!=null)
    {
        $("hdf_Product").value=ID;
        
        new Ajax.Request(s_Path+"VNVN_Web/VNVN_19_Server.aspx",
        {
            method: "post", // Setup Method            
            parameters: 
            {
                cmd: 3006,
                ArticleID: ID
            }, // Add Parameters
            onSuccess: function(transport)
            { // Event Success --> do...
                var response = transport.responseText;                        
               
                if($("lbl_TitleNews_A5_005")!=null)
                {
            	
                    $("lbl_TitleNews_A5_005").innerHTML =response.split("&#;")[0];                                        
                    $("lbl_Datetime1_A5_010").innerHTML = response.split("&#;")[1];                                        
                    $("lbl_Content_A5_005").innerHTML = response.split("&#;")[2];                                        
                    $("hdf_Product").value=response.split("&#;")[3];               
                    ID=$("hdf_Product").value;
                }      
            }           
        });      
    }
    else
    {
         window.open(Path100+ID+"_61065","_self");
    }

}
var keepid = null;
function ToggleDisplayNewsDescription(o)
{
    if(o!=null && o.id!=null)
        ID=o.id.split("_")[o.id.split("_").length-1];    
    else
        ID=o;
    var div = $('pnl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Content_0_' + ID);
    if(ID==18)
        div = $('pnl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Content_0_' + ID);
    
    if(keepid)
        if(keepid!=18)
        {  
            if( $('pnl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Content_0_' + keepid)!=null)             
                $('pnl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Content_0_' + keepid).style.display = 'none';   
            
        }
        else
        {
            if($('pnl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Content_0_' + keepid)!=null)
                $('pnl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Content_0_' + keepid).style.display = 'none';   
            
        }
    if(div)
        {   
            if(ID!=18)
            {
                if($('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Expand_0_'+ID).innerHTML.indexOf("up.jpg")>0)
                {
                    $('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Expand_0_'+ID).innerHTML="<img src='../App_Themes/Skin1/images/btn_down_9x9.jpg'/>";
                    div.style.display = 'none';
                }
                else
                {
                    $('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Expand_0_' + ID).innerHTML = "<img src='../App_Themes/Skin1/images/btn_up_9x9.jpg'/>";
                    div.style.display = 'block';
                }
                
            }
            else
            {
                if( $('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Expand_0_'+ID).innerHTML.indexOf("up.jpg")>0)
                {
                    $('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Expand_0_' + ID).innerHTML = "<img src='../App_Themes/Skin1/images/btn_down_9x9.jpg'/>";
                    div.style.display = 'none';
                }
                else
                {
                    $('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Expand_0_' + ID).innerHTML = "<img src='../App_Themes/Skin1/images/btn_up_9x9.jpg'/>";
                    div.style.display = 'block';
                    
                }                   
            }
            if(keepid==18 && keepid != ID)
            {
                if($('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Expand_0_'+keepid)!=null)
                    $('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_1_18_Expand_0_' + keepid).innerHTML = "<img src='../App_Themes/Skin1/images/btn_down_9x9.jpg'/>";
            }
            else
            {
                if($('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Expand_0_'+keepid)!=null && keepid != ID)
                    $('hpl_NewsPage_1Col_1Row_Col_ItemStructure_Format_18_Expand_0_' + keepid).innerHTML = "<img src='../App_Themes/Skin1/images/btn_down_9x9.jpg'/>";          
            }
            keepid = ID;            
        }
     //dhtmlHistory.add("NewsID"+ID,'ToggleDisplayNewsDescription('+ ID+',null)');		
        
}

function showToolTipNews (o,e)
{
 
    var ID=o.id.split("_")[o.id.split("_").length-1];   
    if (!e) e = window.event;
    var tooltip = document.getElementById('ToolTipContainer');
    if (tooltipIsShow)
    {
        document.onmousemove = saveDocMove;
        saveDocMove    = null;
        _hideToolTip();
    }
    if (tooltip && tooltipIsShow==false)
    {
        tooltip.onmouseover = function(){window.clearTimeout(tooltipTimer);}
        tooltip.onmouseout = hideToolTip;
        tooltipIsShow = true;
        new Ajax.Request(s_Path+"VNVN_Web/VNVN_19_Server.aspx",
                {
                    method: "post", // Setup Method            
                    parameters: 
                    {
                        cmd: 3006,
                        ArticleID: ID
                    }, // Add Parameters
                    onSuccess: function(transport)
                    { // Event Success --> do...
                        var response = transport.responseText || "";                        
                        if(response!="")
                        {
                            $("ToolTipContainer").innerHTML =response.split("&#;")[2];// "<div style='float:left;clear:both;'>"+response+"</div><div style='float:left;clear:both;width:100%;'><input id='ibt_ViewLarge_A5_005' type='image' style='border-width: 0px;' onclick='window.open(\"VNVN_Web/VNVN_26_ViewLargeImage.aspx?Pid=" + ID+"\",\"\",\"status=1,scrollbars=1,resizable=1,height=690,width=625\");return false;' src='App_themes/Skin1/images/Img_enlarge.jpg' name='ibt_ViewLarge_A5_005'/>&nbsp;<a id='lbt_ViewLarge_A5_005' class='TBF_A5_Color_Black' href='javascript:__doPostBack(\"lbt_ViewLarge_A5_005\",\"\")' onclick='window.open(\"VNVN_Web/VNVN_26_ViewLargeImage.aspx?Pid="+ID+"\",\"\",\"status=1,scrollbars=1,resizable=1,height=690,width=625\");return false;'>View Large Image</a></div>";                                                                                
                            $("ToolTipContainer").style.display="block";
                        }
                        else
                        {
                            $("ToolTipContainer").style.display="none";
                        }
                    }           
                }
            );  
        toolTipMove(e);
    }
}
var savePagingOr = null;
function GetAllOrderCustomer(event)
{
	pagingOptionsTop.onchange		= GetAllOrder;
	pagingOptionsBottom.onchange	= GetAllOrder;
	
	
    GetAllOrder(null,null,null,null,event);

	return false;
}
var curSortP = '';
var curPageorder = 1;
var curPSIZEorder = 16;
var curAscOrder = 1;
function GetAllOrder(curPage, pSize, sort, asc, event)
{   
    OnPleaseWait("AdminDvWait",event);
     if (initPaging == false)
     {
      pagingOptionsTop.InitPaging();
      pagingOptionsBottom.InitPaging();
      initPaging = true;
     }
     var filter = '';
     if (!curPage) curPage = 1;
     if (!pSize)  pSize = 15;
     sort = curSortP;
     asc = curAscOrder;
     curPageorder = curPage;
     curPSIZEorder = pSize;
     //curAscOrder =  sort;
     $("pnl_A5_L6_X2_Y3_005").innerHTML = '';
     var cbo = $('ddl_Shipping_A5_005');
     if(cbo.selectedIndex!=-1)
     {
         filter = cbo.options[cbo.selectedIndex].text;
         if ( filter == "--All Status--" )
             filter = "";
     }
     new Ajax.Request(s_Path+"VNVN_Web/VNVN_19_Server.aspx",
      {
       method   : "post", // Setup Method            
       parameters  : 
       {
        cmd   : 2014,    
        curPage  : curPage,
        pSize  : pSize,
        sort        : sort,
        asc         : asc,
        filter      : filter,
        stDate      : $('tbx_FromDate_A5_005').value,
        eDate  : $('tbx_ToDate_A5_005').value 
       },
       onSuccess  : function(transport)
       { // Event Success --> do...
          var response = transport.responseText;                                                   
          if ( response != "")
          {
            var pagingInfo = response.substring(0, 19).split(";");
            response  = response.substring(19);            
            $("pnl_A5_L6_X2_Y3_005").innerHTML = response;
            pagingOptionsTop.SetPaging(curPage, pSize, '', 1, pagingInfo[0] * 1, pagingInfo[1] * 1);
            pagingOptionsBottom.SetPaging(curPage, pSize, '', 1, pagingInfo[0] * 1, pagingInfo[1] * 1);         
            savePagingOr = [curPage, pSize, sort, asc, pagingInfo[0] * 1, pagingInfo[1] * 1];
            if(pagingInfo[0] * 1<=0)
            {
               $('pnl_A5_L7_X2_Y1_005').style.display = 'none';
               $('pnl_A5_L7_X2_Y1_009').style.display = 'none';
               $('pnl_A5_L6_X2_Y3_005').style.display = 'none';
            }
            else
            {
               $('pnl_A5_L7_X2_Y1_005').style.display = '';
               $('pnl_A5_L7_X2_Y1_009').style.display = '';
               $('pnl_A5_L6_X2_Y3_005').style.display = '';
            }
          }
          else
          {
               $('pnl_A5_L7_X2_Y1_005').style.display = 'none';
               $('pnl_A5_L7_X2_Y1_009').style.display = 'none';
               $('pnl_A5_L6_X2_Y3_005').style.display = 'none';
          }
          OffPleaseWait("AdminDvWait");
       },
       onFailure: function(){ alert(sError);OffPleaseWait("AdminDvWait"); } // Event Failure --> do...     
      });
}
function LoadOrderStatus(cbo)
{
    if($(cbo))
    {
         var Control = $(cbo);
         new Ajax.Request(s_Path+"VNVN_Web/VNVN_19_Server.aspx",
         {
              method   : "post", // Setup Method            
              parameters  : 
              {
                cmd   : 2022
              },
              onSuccess  : function(transport)
              {
                    var TextXml = transport.responseXML;
                    var Nodes = TextXml.getElementsByTagName('option');
                    if(Nodes != null)               
                    {      
                        Control.options[0]= new Option( '--All Status--', '0');                        
                        Control.options[0].setAttribute('prop','27');
                        
                        for(var i=0;i<Nodes.length;i++)
                        {
                            var itemNode = Nodes[i];
                            Control.options[i+1]= new Option(itemNode.getAttribute('text'),itemNode.getAttribute('value'));
                            Control.options[i+1].setAttribute('prop',itemNode.getAttribute('prop'));                         
                        }                            
                    }
                    Control.onchange = this.GetAllOrderCustomer.handle(this,null);
              },
              onFailure: function(){ alert(sError);OffPleaseWait("AdminDvWait"); } // Event Failure --> do...     
          });   
    }
}

