/**
 * JspCeo (v2.0)  -  Class: jc.js   for all pages.
 * 
 * @author         : folier
 * @email          : jspceo@qq.com
 * @QQ             : 39886616
 * @Techno-support : RuiXing.CC

 * Copyright(C): JspCeo empolder group 2008 -
 *
 **/

var jc={
    root:"../",
    servlet:"zlt/",
    doDelete: function(table, id, signer){
        if(confirm("您真地要进行删除操作吗？\r\n警告:此操作无法撤消！")){
            this.Page.getUrl(this.root+this.servlet+"update.jc?JC_Action=delete&JC_Table="+table+"&JC_Id="+id+"&JC_Signer="+signer+"&JC_BackUrl="+escape(document.location.href));
        }
    },
    doDeleteFile: function(fileName, fileSigner, fileDivName){
        if(confirm("警告:此操作不可撤消!\r\n您真地要删除此文件吗?"))
            $.get(
        jc.root + jc.servlet + "get.jc?s=delUpfile&fp=" + escape(fileName) + "&JC_Signer=" + fileSigner,
        function(data){
            if(data=='success'){
                if(document.getElementById(fileDivName)==null) document.location.reload();
                else $('#'+fileDivName).hide();
            }else
                alert('删除失败! 原因:\r\n'+data);
        }
    );
    },
    noSelect: function(){
        if($.browser.msie){
            document.onselectstart=function(){
                var absTag=event.srcElement.tagName;
                if(absTag!="INPUT" && absTag!="TEXTAREA") return false;
            }
        }else{
            $("div,table,p").css("-moz-user-select","-moz-none");
        }
        return this;
    },
    noMenu: function(){
        document.oncontextmenu = function(e){
            tg = $.browser.msie ? event.srcElement.tagName.toUpperCase(): e.target.tagName.toUpperCase();
            if(tg!='INPUT' && tg!='TEXTAREA') return false;
        }
        return this;
    }
}

jc.Page={
    getUrl: function(url, target){
        try{
            parent.JC_loading(true);
        }catch(e){
        }
        if(target){
            target1=target.toLowerCase();
            if      (target1 == '_blank')  window.open(url);
            else if (target1 == '_top'  )  top.location.href=url;
            else if (target1 == '_parent') parent.location.href=url;
            else if (target1 == '_self')   document.location.href=url;
            else{
                try{
                    $("#"+target)[0].src=url;
                }catch(e){
                    try{
                        top.document.getElementById(target).src=url;//can't use $() here
                    }catch(e1){
                        document.location.href=url;
                    }
                }
            }
        }else{
            document.location.href=url;
        }
    },
    
    getUri: function(prmName, prmVal, target){
        this.getUrl(new jc.Url().set(prmName, prmVal), target);
    },

    queryString: function(name){
        return new jc.Url(document.location.search).get(name);
    },

    popup: function(url, name, vars){
        url  = url  ? url  : 'about:blank';
        name = name ? name : '';
        vars = vars ? vars : 'width=800,height=600,scrollbars=yes,resizable=yes';
        var win=window.open(url, name, vars);
        if(!win){
            alert('似乎某个弹出式窗口拦截器导致了无法打开该网页。\n\n如果您使用了窗口拦截器，请尝试关闭它，以便打开该窗口。');
            return null;
        }else{
            vars=vars.toLowerCase();
            var w=parseInt(vars.substring(vars.indexOf("width=")+6));
            var h=parseInt(vars.substring(vars.indexOf("height=")+7));
            win.moveTo((screen.width-w)/2,(screen.height-h)/2);
            win.focus();
            return win;
        }
    },

    dialog: function(url,name,vars){
        if($.browser.msie){
            var prm=[];
            vars=vars.toLowerCase();
            if(vars.indexOf("width=")!=-1) prm.push("dialogWidth:" + parseInt(vars.substring(vars.indexOf("width=") +6)) + "px");
            if(vars.indexOf("height=")!=-1)prm.push("dialogHeight:" + parseInt(vars.substring(vars.indexOf("height=")+7)) + "px");
            if(prm.length) prm=prm.join(";");
            else prm = "dialogWidth=800;dialogHeight:600px";
            prm+=";edge:Raised; center:Yes; resizable: Yes; status: No;";
            showModalDialog(url,window,prm);
        }else{
            this.popup(url,name,vars);
        }
        return false;
    },

    favorite: function(title,url){
        if(!title) title=window.title;
        if(!url)   url  =document.location.href;
        var desc='';
        if(typeof(window.sidebar)=='object' && typeof(window.sidebar.addPanel)=='function'){ 
            window.sidebar.addPanel(title,url,desc);
        }else{ 
            window.external.AddFavorite(url,title); 
        }
        return this;
    },
    
    png: function(img){
        var str=String(navigator.appVersion);
        if(str.indexOf("MSIE 6")==-1) return;
        if(jc.root==null){
            alert('对不起,未指定jc.Page.rootPath根路径！');
            return;
        }
        var SC_w = img.width ;
        var SC_h = img.height;
        var imgName = img.src.toUpperCase() 
        if (imgName.substring(imgName.length-3, imgName.length) == "PNG"){  
            img.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="
                + img.src + ", sizingmethod=scale);"  
            img.src=jc.root + "JC_Skins/pub/transparent.gif";
            img.width=SC_w; 
            img.height=SC_h;
        }
    },
    
    cancelBubble: function(evt) {  
        if (window.event){
            window.event.cancelBubble=true;  
        } else {
            //evt.preventDefault(); //取消事件的默认动作。例如submit按钮的submit事件
            evt.stopPropagation();  
        }
        return this;
    },
    
    printYzm:function(guid, isEn){
        if(guid==null) guid=0;
        var t1=isEn?"Input the number in the picture.":"请填写后面图片中的四位数字";
        var t2=isEn?"change":"换一张";
        var t3=isEn?"change another one":"验证码看不清？点击这儿换一个";
        document.writeln('<input name="JC_ValidateCode" type="text" id="JC_ValidateCode'+guid+'" style="width:60px;" maxlength="4" title="'+t1+'" />');
        document.writeln('<img src="'+jc.root+jc.servlet+'image.jc?s=yzm" style="cursor:pointer" onclick="this.src=jc.root+jc.servlet+\'image.jc?s=yzm&dt=\'+Math.random()" width="60" height="20" align="absmiddle" id="JC_Yzm'+guid+'" />　<a href="#" onclick="$(\'#JC_Yzm'+guid+'\').click();return false;" class="yzm" title="'+t3+'">'+t2+'</a>');
    },
    
    chkYzm: function(guid, isEn){
        var t1 = isEn ? "Sorry, the appointed validate code is not exists.":"对不起，chkYzm指定编号的验证码不存在！";
        var t2 = isEn ? "Input the validate code, please.":"请输入验证码";
        var t3 = isEn ? "Input the right validate code, please.":"请输入四位数字的验证码！";
        var t4 = isEn ? "Input the right validate code, please.":"对不起，验证码输入不正确！";

        var o = $("#JC_ValidateCode"+guid)[0];
        if(o.length==0){
            alert(t1);
            return false;
        }
        if(o.value==''){
            alert(t2);
            o.focus();
            return false;	
        }else if(o.value.length!=4){
            alert(t3);
            o.focus();
            return false;
        }
        yzmIsErr=true;
        $.ajax({
            type: "GET",
            async: false,
            error:function(xmlObj,err,eObj){
                alert('对不起,数据提交失败，服务器响应出错.');
                var ewin=window.open('');
                ewin.document.write('<strong><font size=4 color=red>服务器响应错误信息如下：</font><br /><strong>'+xmlObj.responseText+'<p style="font-size:10px">Copyright&copy; <strong style="color:#040"><i>JspCeo v2.0</i></strong></p>');
            },
            url: jc.root+jc.servlet+'get.jc?s=chkValidateCode&yzm='+$("#JC_ValidateCode"+guid).val(),
            dataType:'script'
        });
        if(yzmIsErr){
            alert(t4);
            $("#JC_Yzm"+guid).click();
        }
        return !yzmIsErr;
    },
    
    plug: function(paramObj){
        var o=paramObj;
        if(!o.src){
            alert('初始化jc.Page.plug()插件失败，未指定文件地址。');
            return;
        }
        if(jc.root==null){
            alert('初始化jc.Page.plug()插件失败，未指定jc.root根路径。');
            return;
        }
        var src      = o.src.toLowerCase().indexOf("http://")==0 ? o.src : jc.root+o.src;
        var width    = o.width;
        var height   = o.height;
        var id       = o.id      ? o.id      : 'JC_Plug';
        var noBuffer = paramObj.noBuffer;

        var ext    = src.substring(src.lastIndexOf(".")+1).toLowerCase();
        
        if(noBuffer){
            src += "?" + Math.random();
        }

        if(width==0 && height==0)
            initLink();
        else if(ext=='rm' || ext=='ram' || ext == 'rmvb')
            initRealPlayer();
        else if(ext=='swf')
            initFlashPlayer();
        else if(ext=='gif' || ext=='bmp' || ext=='png' || ext=='jpg' || ext=='jpe' || ext=='jpeg')
            initPicture();
        else
            initMediaPlayer();

        function initLink(){
            var p=jc.root+'JC_Skins/ext/';
            document.write('<img align="absmiddle" border="0" src="'+p+ext+'.gif" onerror="this.src=\''
                + p + 'unknow.gif\'" />\r\n <a href="' + src+'" noEvt="noEvt" target="_blank">点击查看</a>');
        }

        function initPicture(){
            document.write('<img border="0" src="'+src+'"'
                + ((width!=null && width!=0) ? ' width="'+width+'"' : '')
                + ((height!=null && height!=0) ? ' height="'+height+'"' : '')
                +' />');
        }
        function initRealPlayer(){
            var s=[];
            with(s){
                push('<object id="' + id + '" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"');
                push((width!=null && width!='')?' width="'+width+'"' : ' width="100%"');
                push((height!=null && height!='') ? ' height="'+height+'"' : ' height="100%"');
                push('><param name="_ExtentX" value="9313"> ');
                push('<param name="_ExtentY" value="7620"> ');
                push('<param name="AUTOSTART" value="1"> ');
                push('<param name="SHUFFLE" value="0"> ');
                push('<param name="PREFETCH" value="0"> ');
                push('<param name="NOLABELS" value="0"> ');
                push('<param name="src" value="'+src+'">');
                push('<param name="CONTROLS" value="ImageWindow"> ');
                push('<param name="CONSOLE" value="Clip1"> ');
                push('<param name="LOOP" value="0"> ');
                push('<param name="NUMLOOP" value="0">');
                push('<param name="CENTER" value="0"> ');
                push('<param name="MAINTAINASPECT" value="0"> ');
                push('<param name="BACKGROUNDCOLOR" value="#000000">');
                push('<embed src="' + src + '" type="audio/x-pn-realaudio-plugin" CONSOLE="Clip1" CONTROLS="ImageWindow"');
                push((width!=null && width!='')?' width="'+width+'"' : ' width="100%"');
                push((height!=null && height!='') ? ' height="'+height+'"' : ' height="100%"');
                push(' AUTOSTART="false"></object>');
            }
            document.writeln(s.join(''));
        }

        function initFlashPlayer(){
            var vars = o.vars ? o.vars : null;
            var wmode= o.wmode? o.wmode:"transparent"
            var s  = [];
            with(s){
                push('<object id="' + id + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
                push(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"');
                push((width!=null && width!='')?' width="'+width+'"' : ' width="100%"');
                push((height!=null && height!='') ? ' height="'+height+'"' : ' height="100%"');
                push(' align="middle">');
                push('<param name="allowScriptAccess" value="sameDomain" />\n');
                push('<param name="quality" value="high" />\n');
                push('<param name="menu" value="false" />\n');
                push('<param name="wmode" value="'+wmode+'" />\n');
                if(vars)  push('<param name="FlashVars" value="' + vars + '" /> ');
                push('<param name="movie" value="' + src + '" />');
                push("<embed src=\""+ src +"\" quality=\"high\" name=\"index\" align=\"middle\" allowScriptAccess=\"sameDomain\" ");
                push((width!=null && width!='')?' width="'+width+'"' : ' width="100%"');
                push((height!=null && height!='') ? ' height="'+height+'"' : ' height="100%"');
                push( vars ? "FlashVars=\"" + vars + "\"" : "");
                push(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go');
                push('/getflashplayer" wmode="'+wmode+'" menu="false" />');
                push('</object>');
            }
            document.writeln(s.join(""));
        }

        function initMediaPlayer(){
            /*
             *相关控制代码:
             ** 全屏代码:       对象id.displaySize= 3
             **
             **/
            var s = [];
            with(s){
                push('<object id="' + id + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"');
                push((width!=null && width!='')?' width="'+width+'"' : ' width="100%"');
                push((height!=null && height!='') ? ' height="'+height+'"' : ' height="100%"');
                push('><param id="furl" name="Filename" value="'+src+'">');
                push('<param name="AudioStream" value="-1">');
                push('<param name="AutoSize" value="0">');
                push('<param name="AutoStart" value="-1">');
                push('<param name="AnimationAtStart" value="-1">');
                push('<param name="AllowScan" value="-1">');
                push('<param name="AllowChangeDisplaySize" value="1">');
                push('<param name="AutoRewind" value="0">');
                push('<param name="Balance" value="0">');
                push('<param name="BaseURL" value>');
                push('<param name="BufferingTime" value="5">');
                push('<param name="CaptioningID" value>');
                push('<param name="ClickToPlay" value="-1">');
                push('<param name="CursorType" value="0">');
                push('<param name="CurrentPosition" value="-1">');
                push('<param name="CurrentMarker" value="0">');
                push('<param name="DefaultFrame" value>');
                push('<param name="DisplayBackColor" value="0">');
                push('<param name="DisplayForeColor" value="16777215">');
                push('<param name="DisplayMode" value="0">');
                push('<param name="DisplaySize" value="2">');
                push('<param name="Enabled" value="-1">');
                push('<param name="EnableContextMenu" value="-1">');
                push('<param name="EnablePositionControls" value="-1">');
                push('<param name="EnableFullScreenControls" value="0">');
                push('<param name="EnableTracker" value="-1">');
                push('<param name="InvokeURLs" value="-1">');
                push('<param name="Language" value="-1">');
                push('<param name="Mute" value="0">');
                push('<param name="PlayCount" value="100">');
                push('<param name="PreviewMode" value="0">');
                push('<param name="Rate" value="1">');
                push('<param name="SAMILang" value>');
                push('<param name="SAMIStyle" value>');
                push('<param name="SAMIFileName" value>');
                push('<param name="SelectionStart" value="-1">');
                push('<param name="SelectionEnd" value="-1">');
                push('<param name="SendOpenStateChangeEvents" value="-1">');
                push('<param name="SendWarningEvents" value="-1">');
                push('<param name="SendErrorEvents" value="-1">');
                push('<param name="SendKeyboardEvents" value="0">');
                push('<param name="SendMouseClickEvents" value="0">');
                push('<param name="SendMouseMoveEvents" value="0">');
                push('<param name="SendPlayStateChangeEvents" value="-1">');
                push('<param name="ShowCaptioning" value="0">');
                push('<param name="ShowControls" value="0">');
                push('<param name="ShowAudioControls" value="-1">');
                push('<param name="ShowDisplay" value="0">');
                push('<param name="ShowGotoBar" value="0">');
                push('<param name="ShowPositionControls" value="0">');
                push('<param name="ShowStatusBar" value="0">');
                push('<param name="ShowTracker" value="-1">');
                push('<param name="TransparentAtStart" value="0">');
                push('<param name="VideoBorderWidth" value="0">');
                push('<param name="VideoBorderColor" value="0">');
                push('<param name="VideoBorder3D" value="0">');
                push('<param name="Volume" value="-40">');
                push('<param name="WindowlessVideo" value="0">');
                push('</object>');
            }
            document.writeln(s.join(""));
        }
    }
}

jc.Url  = function(url){
    if(url==null || url=="") url = document.location.href;
    var bookmark="";
    if(url.indexOf("#")!=-1){
        bookmark = url.substring(url.indexOf("#"));
        url = url.substring(0,url.indexOf("#"));
    }
    var file=url;
    var search="";
    var searchA=[];
    var index={};
    if(url.indexOf("?")!=-1){
        file   = url.substring(0, url.indexOf("?"));
        search = url.substring(url.indexOf("?")+1);
        searchA=search.split("&");
        for(var i=0; i<searchA.length; i++)
            index[searchA[i].split("=")[0]]=i;
    }

    this.set = function(name, value){
        var s = name + "=";
        if(index[name]==null) searchA.push(s+value);
        else                  searchA[index[name]]=s+value;
        return this;
    }
    
    this.get = function(name){
        if(index[name]==null){
            return "";
        }else{
            var t=searchA[index[name]].split("=");
            if(t.length==2) return t[1].replace(/#.*/,"");
            else            return "";
        }
    }
    
    this.del = function(args){
        for(var i=0; i<arguments.length; i++){
            var name = arguments[i];
            if(index[name]!=null){
                searchA[index[name]] = null;
                index[name] = null;
            }
        }
        return this;
    }
    
    this.toString=function(){
        for(var i=searchA.length-1; i>=0; i--)
            if(searchA[i]==null) searchA.splice(i, 1);
        if(searchA.length)
            search=searchA.join("&");
        else
            search="";
        url = file + (search=="" ? "" : "?"+search);
        return url + bookmark;
    }
    
    this.go = function(target){
        jc.Page.getUrl(this.toString(), target);
    }
}

jc.Form = function(fm){
    this.fm=fm;
    function Alt(obj, msg){
        if(msg) alert("对不起, " + msg + "。");
        try{
            fm[obj].focus();
            fm[obj].select();
        }catch(e){}
        return false;
    }
    function Num(obj, msg, min, max, isFloat){
        var v=fm[obj].value;
        var n = isFloat ?  parseFloat(v) : parseInt(v);
        return (v!=n || (min!=null && n<min) || (max!=null && n>=max)) ? Alt(obj, msg) : true;
    }

    function getSplit(str, spStr, spExp){
        var s1 = str.replace(new RegExp(spExp,"ig"),spStr).split(spStr);
        var s2 = [];
        for(var i=0; i<s1.length; i++)
            if(s1[i]!=null && s1[i]!="") s2.push(s1[i]);
        return s2.join(spStr);
    }

    this.isNull = function(obj,msg){
        return (fm[obj].value=="" && !Alt(obj,msg));
    }

    this.isInt = function(obj, msg, min, max){
        return Num(obj, msg, min, max, false);
    }

    this.isFloat = function(obj, msg, min, max){
        return Num(obj, msg, min, max, true);
    }

    this.isLen = function(obj,msg, min, max){
        min=min ? min:0;
        max=max ? max:0;
        var len=fm[obj].value.length;
        var isok = len>=min && (max==0 ? true : len<max);
        if(isok) return true;
        else return Alt(obj, msg);
    }

    this.isChk = function(obj,msg){
        try{
            for(var i=0;i<fm[obj].length;i++)
                if(fm[obj][i].checked) return fm[obj][i].value;
            void Alt(obj, msg);
            fm[obj][0].focus();
        }catch(e){
            alert(e.description);
        }
        return null;
    }

    this.isDate = function(obj, msg){
        var d    = fm[obj].value;
        var dArr = d.split("-");
        if(dArr.length!=3) return Alt(obj, msg);
        try{
            var yy=parseInt(dArr[0]);
            var mm=parseInt(dArr[1])-1;
            var dd=parseInt(dArr[2]);
            var dt=new Date(yy, mm, dd);
            if(yy==dt.getFullYear() && mm==dt.getMonth() && dd==dt.getDate()) return true;
            else   return Alt(obj, msg);
        }catch(e){
            return Alt(obj, msg);
        }
    }

    this.isExt = function(obj, exts, msg){
        try{
            if(this.isNull(obj)) return true;
            exts=getSplit(exts, ",", "[\.。　 ;；|、｜]+").toLowerCase();
            var extsA = exts.split(",");
            var ext   = fm[obj].value.toLowerCase().substring(fm[obj].value.lastIndexOf(".")+1);
            var ok    = false;
            for(var i=0;i<extsA.length;i++){
                if(extsA[i]==ext){
                    ok= true;
                    break;
                }
            }
            if(ok) return true;
            else{
                return Alt(obj, msg);
            }
        }catch(e){
            alert(e.description);
            return false;
        }
    }
        
    this.setDef = function(obj,value){
        if(fm[obj].value=="") fm[obj].value=value;
        return this;
    }

    this.split = function(obj, spStr, spExp){
        fm[obj].value = getSplit(fm[obj].value, spStr, spExp);
        return this;
    }
    
    this.isRepeat = function(obj){
        var t0_old = obj.t0==null?"" : obj.t0;
        var by     = obj.by;
        var tid    = obj.rootId ? obj.rootId : fm.tid.value;
        
        if(!fm.t0){
            alert("jc客户端脚本异常：当前的表单中未找到t0字段！");
            return true;
        }
        var table = fm.JC_Table.value;
        var t0    = encodeURI(fm.t0.value);
        if(by==null || by=="" || by=="tid"){
            by="tid";
        }else if(by.toLowerCase()!="rootid" && by.toLowerCase()!="all"){
            alert("jc客户端脚本异常：isRepeat方法参数对象的by属性的值只能是下列值之一：\r\ntid, rootId, all");
            return true;
        }
        isNoRepeat=true;
        $.ajax({
            type: "GET",
            async: false,
            error:function(xmlObj,err,eObj){
                alert('对不起,数据提交失败，服务器响应出错.');
                var ewin=window.open('');
                ewin.document.write('<strong><font size=4 color=red>服务器响应错误信息如下：</font><br /><strong>'+xmlObj.responseText+'<p style="font-size:10px">Copyright&copy; <strong style="color:#040"><i>JspCeo v2.0</i></strong></p>');
                isNoRepeat=false;
            },
            url: jc.root+jc.servlet+'get.jc?s=chkRepeat&tb='+table+'&tid='+tid+'&t0='+t0+'&t0_old='+encodeURI(t0_old)+"&by="+by,
            dataType:'script'
        });
        return !isNoRepeat;
    }
}
//*********************************** Form prototype define Demo
jc.Form.prototype={
    xxx:function(a){alert(typeof(this.fm));}
}

jc.Select={
    up: function(o){//, toObj){ 
        for(i=0; i<o.options.length; i++)
            if(o.options[i].selected){
                if (i == 0 || o.options[i-1].selected) continue;
                var v                    =  o.options[i].value;
                var t                    =  o.options[i].text;
                o.options[i].value       =  o.options[i-1].value;
                o.options[i].text        =  o.options[i-1].text;
                o.options[i-1].value     =  v;
                o.options[i-1].text      =  t;
                o.options[i-1].selected  =  true;
                o.options[i].selected    =  false;
            }
        //if(toObj)fieldSetValue(o,toObj);
    },
    
    down: function(o){//,toObj){
        for(i=o.options.length-1; i>=0; i--)
            if(o.options[i].selected){
                if(i == o.options.length-1 || o.options[i+1].selected) continue;
                var v                   =  o.options[i].value;
                var t                   =  o.options[i].text;
                o.options[i].value      =  o.options[i+1].value;
                o.options[i].text       =  o.options[i+1].text;
                o.options[i+1].value    =  v;
                o.options[i+1].text     =  t;
                o.options[i+1].selected =  true;
                o.options[i].selected   =  false;
            }
        //if(toObj) fieldSetValue(o, toObj);
    },
    
    remove: function(o){
        var j=0;
        for(i=o.options.length-1; i>=0; i--)
            if(o.options[i].selected){
                o.options[i]=null;
                j=i;
            }
        if(o.options.length>j) o.selectedIndex=j;
        else if(o.options.length>0)o.selectedIndex=o.options.length-1;
    },

    move: function(fObj, tObj, vObj, isL2R){
        tObj.selectedIndex  =  -1;
        for(var i = 0; i  <  fObj.options.length;  i++)
            if(fObj.options[i].selected){
                tObj.options[tObj.options.length] = new Option(fObj.options[i].text, fObj.options[i].value);
                tObj.options[tObj.options.length-1].selected    =  true;
                tObj.options[tObj.options.length-1].style.color =  fObj.options[i].style.color;
                fObj.options[i] =  null;
                i--;
            }
        if(vObj){
            var s=[];
            var t= isL2R ? fObj : tObj;
            for(var i=0; i < t.options.length;i++){
                s.push(t.options[i].value);
            }
            vObj.value=s.join(",");
        }
    }
}
