// JavaScript Document
//新版本编辑器，TOM copyright.
//-------------
//2008-1-21 Create By:HuangYitao
//
//=============




tom.Editor = function (editorID,value)
{
    
	//设置弹出窗口页的根路径
	this.base="/pagemaker_editor/";
	this.CONFIG = [];
	//允许使用的toolBar
	this.CONFIG["allow_cmd"] = ["paste","cut","copy","img","emotion","image_type","link","unlink","Undo","Redo","removeformat","fontname","fontsize","forecolor","hilitecolor","Bold","Italic","Underline","justifyleft","justifycenter","justifyright","outdent","indent","audio","flash","video","zoomIn","zoomOut"];
	//默认内容
	
	//代码模式id
	this.editor_code   = editorID+'CodeMode';
    //设计模式id
	this.editor_design = editorID+'DesignMode'; 
	this.editorID = (editorID == undefined) ? 'main' : editorID;
	//写道 main 这个层里
	this.main_embed = document.getElementById(this.editorID);
	if(this.main_embed == null){
		alert('编辑器要有一个叫 '+this.editorID+' 的层');
		return false;
	}
	
	var SELF=this;
	this.createUI();
	this.userCtrl();
	this.value=value;
    this.selected = '';

	//添加本实例按钮事件
	for(i=0;i<this.CONFIG["allow_cmd"].length;i++)
	{
		if(document.getElementById(editorID+this.CONFIG["allow_cmd"][i]))
		{
			document.getElementById(editorID+this.CONFIG["allow_cmd"][i]).onclick = SELF.docmd.call(SELF,SELF,SELF.CONFIG["allow_cmd"][i]);
		}
	}
	//editor window 
	this.editorWindow = document.getElementById(this.editor_design);
	//frame转变为设计模式(firefox要有个延时所以用setTimeout)
    this.setTimeout(this.init,1000,this.editorWindow,this.value);
	this.designWindow=document.getElementById(this.editor_design).contentWindow;
	if(this.is_ie())
	{
		this.editorWindow.contentWindow.document.designMode = 'on';
		this.editorWindow.contentWindow.document.contentEditable = true;
	}
	else
	{
		this.changemodeStep = this.setInterval(this.change2editMode,300,this.editorWindow);
	}
	//this.initStep = this.setInterval(this.init,200,this.editorWindow,value);
	
}
tom.Editor.prototype = {
	init : function (editorWindow,value) {
		//editorWindow.contentWindow.document.contentEditable=true;
		editorWindow.contentWindow.focus();

		editorWindow.contentWindow.document.body.innerHTML = value;
		if(!document.all)
		{
			editorWindow.contentWindow.document.execCommand('insertHTML', false, ' ');
		}
	
		//return document.getElementById(this.editor_code).value = this.value;
	},
  setValue : function (value)
  {
    this.editorWindow.contentWindow.document.body.innerHTML = value;
  },
	setTimeout : function (callback,timeout,param) {
		var args = Array.prototype.slice.call(arguments,2);
		var _cb = function()
		{
			callback.apply(null,args);
		}
		
		setTimeout(_cb,timeout);
	},
	setInterval : function (callback,timeout,param) {
        var designwin = this.editorWindow;
		var args = Array.prototype.slice.call(arguments,2);
		var _cb = function()
		{
			callback.apply(null,args);
            if(designwin.contentWindow.document.designMode == 'on')
                clearInterval(st);
		}
		
		st = setInterval(_cb,timeout);
	},
	docmd : function( self , cmd ) {
		return function () {
			self.execute_command(cmd);
		}
	},
	clear : function() {
		this.editorWindow.contentWindow.document.body.innerHTML = '';
		document.getElementById(this.editor_code).value = '';
	},
	reset_content : function(content) {
		this.editorWindow.contentWindow.document.body.innerHTML = content;
		document.getElementById(this.editor_code).value = content;
	},
	createUI : function() {
		this.assist = document.getElementById(this.editor_design+'Box'); 
		var assist = this.assist;
		if(!this.is_ie())
		{
			assist.onmouseout = function() {
				//motl you are so BT and unformaty.
				this.className = 'box';
			}
		}

		var SELF=this;
		document.getElementById(this.editor_design).onfocus=function(){document.getElementById(SELF.editor_design+'Box').className='box'};

		//document.getElementById('debuging').value += this.main_embed.innerHTML;
	},
	userCtrl : function()
	{
		var SELF = this;
		
		document.getElementById(this.editor_design+'tb1').onclick = function(){
			//tb1=table of view
			//tb2=table of code
			//tp1=iframe of designMode
			//tp2=textarea of codeMode

			SELF.is_design_mode = (document.getElementById(SELF.editor_design+'tb1').className == 'current');
			if(!SELF.is_design_mode){
				//enable the tools bar,first
				
				document.getElementById(SELF.editorID+'toolbar_enabled').style.display     = 'block';
				document.getElementById(SELF.editorID+'toolbar_disabled').style.display = 'none';
				document.getElementById(SELF.editor_design+"tp2").style.display="none";
				document.getElementById(SELF.editor_design+"tp1").style.display="block";
				document.getElementById(SELF.editor_design+"tb1").className="current";
				document.getElementById(SELF.editor_design+"tb2").className="";
				document.getElementById(SELF.editor_code).style.display="none";
				document.getElementById(SELF.editor_design).style.display="block";
				
				
				
				SELF.getFrameNode(SELF.editor_design).focus();
				
				//document.getElementById(SELF.editor_design).contentWindow.document.designMode = 'on';
				SELF.getFrameNode(SELF.editor_design).document.body.innerHTML = document.getElementById(SELF.editor_code).value;
			}
			return false
		};


		document.getElementById(this.editor_design+'tb2').onclick = function(){
			 //tb1=table of view
			//tb2=table of code
			//tp1=iframe of designMode
			//tp2=textarea of codeMode
			SELF.is_design_mode = (document.getElementById(SELF.editor_design+'tb1').className == 'current');
			if(SELF.is_design_mode){
				//disable the tools bar,first
				document.getElementById(SELF.editorID+'toolbar_enabled').style.display     = 'none';
				document.getElementById(SELF.editorID+'toolbar_disabled').style.display = 'block';
				document.getElementById(SELF.editor_design+"tp2").style.display="block";
				document.getElementById(SELF.editor_design+"tp1").style.display="none";
				document.getElementById(SELF.editor_design+"tb1").className="";
				document.getElementById(SELF.editor_design+"tb2").className="current";
				document.getElementById(SELF.editor_code).style.display="block";
				document.getElementById(SELF.editor_design).style.display="none";
				document.getElementById(SELF.editor_code).value = SELF.getFrameNode(SELF.editor_design).document.body.innerHTML;
				//document.getElementById(SELF.editor_design).contentWindow.document.designMode = 'off';
			}
			return false;
		}
	},
	getFrameNode : function(sNode) {
		return document.frames ? document.frames[sNode] : document.getElementById(sNode).contentWindow;
	},
	execute_command : function(cmd)
	{
		var self=this;
		this.wordChiCommand(cmd,this);
		if(window.event){
			event.cancelBubble=true;
		}else{
			return false;
		}
	},
	wordChiCommand : function (cmd,SELF)
	{
		//var SELF = this;
		switch(cmd){
			case "":
				break;
			case "link":
                if(document.all)
                {
            
                    var oRTE = this.designWindow;
                    var oRng = oRTE.document.selection.createRange();
                    //alert(oRng.htmlText);
                    this.editorWindow.selection = oRng.htmlText;
                }
				this.oPenWin("请输入网页地址", 300, 120, SELF.base+"InsertLink.html","insertHTML");
				break;
			case "emotion":
				this.oPenDiv("box1",this.base+"InsertEmotion.html","140");
				break;
			case "img":
               

                
				this.oPenWin("请输入图片地址", 360, 180, SELF.base+"InsertImg.html","insertIMAGE");
				break;
			case "flash":
				this.oPenWin("请输入Flash地址", 300, 160, SELF.base+"InsertFlash.html")
				break;
			case "video":
				this.oPenWin("请输入视频地址", 300, 160, SELF.base+"InsertVideo.html");
				break;
			case "forecolor":
				this.oPenDiv("box4", this.base+"ForeColor.html","140");
				break;
			case "hilitecolor":
				this.oPenDiv("box5", this.base+"BackColor.html", "140");
				break;
			case "flash":
				this.oPenWin("请输入Flash地址", 300, 160, SELF.base+"InsertFlash.html");
				break;
			case "audio":
				this.oPenWin("请输入音频地址", 300, 160,  SELF.base+"InsertAudio.html");
				break;
			//放大编辑器
			case "zoomIn":
				if(parseInt(document.getElementById(this.editor_design).style.height)<208){
					document.getElementById(this.editor_design).style.height = 258 ;
				}else{
					document.getElementById(this.editor_design).style.height=(parseInt(document.getElementById(this.editor_design).style.height)+50)+'px';
				}
				
				if(parseInt(document.getElementById(this.editor_code).style.height)<205){
					document.getElementById(this.editor_code).style.height = 255;
				}else{
					document.getElementById(this.editor_code).style.height=(parseInt(document.getElementById(this.editor_code).style.height)+50)+'px';
				}
				break;
			
			case "zoomOut":
				if(parseInt(document.getElementById(this.editor_design).style.height)<308){
					document.getElementById(this.editor_design).style.height = 258;
				}else{
					document.getElementById(this.editor_design).style.height=(parseInt(document.getElementById(this.editor_design).style.height)-50)+'px';
				}

				if(parseInt(document.getElementById(this.editor_code).style.height)<305){
					document.getElementById(this.editor_code).style.height = 255;
				}else{
					document.getElementById(this.editor_code).style.height=(parseInt(document.getElementById(this.editor_code).style.height)-50)+'px';
				}
				break;
			case "preview":
				this.window.open(this.base+"/preview.html","","");
				break;
			case "fontsize":
				this.oPenDiv("box3",this.base+"FontSize.html","40","fontsize") ;
				document.getElementById(this.editor_design+"box_iframe").height="134";
				break;
			case "fontname":
				this.oPenDiv("box2",this.base+"FontName.html","50");
				break;
			case "cut":
				if (document.all) {
					this.designWindow.focus();
					this.designWindow.document.execCommand("cut", false, null);
					this.designWindow.focus();
				} else {
					alert("您的浏览器安全设置不允许编辑器自动执行剪切操作\n请使用(Ctrl+X)来完成。");
				}
				break;
			case "copy":
				if (document.all) {
					this.designWindow.focus();
					this.designWindow.document.execCommand("copy", false, null);
					this.designWindow.focus();
				} else {
					alert("您的浏览器安全设置不允许编辑器自动执行复制操作\n请使用(Ctrl+C)来完成。");
				}
				break;
			case "paste":
				if (document.all) {
					this.designWindow.focus();
					this.designWindow.document.execCommand("paste", false, null);
					this.designWindow.focus();
				} else {
					alert("您的浏览器安全设置不允许编辑器自动执行粘贴操作\n请使用(Ctrl+V)来完成。");
				}
				break;
		
			case 'image_type':
				var currentElement= this.getCurrentElement(this.editorID);
				if((currentElement == false) || (currentElement == null)){
					alert('请选择一个图片');
					break;
				}
				if(currentElement.tagName.toLowerCase() == 'img'){
					this.oPenDiv("box7",this.base+"image_type.html","190");
				}else{
					alert('请选择一个图片');
				}
				break;

			default:
				this.designWindow.focus();
				this.designWindow.document.execCommand(cmd, false, null);
				this.designWindow.focus();
				break;
		}
	},
	getCurrentElement : function()
	{
		var element;
		var sel;
		var range;

		if(this.is_ie()) {
			selectional = this.getFrameNode(this.editor_design).document.selection;
			switch(selectional.type.toLowerCase()) {
				case "none": {
					element = null;
					break;
				}
				case "text": {
					range = selectional.createRange();
					element = range.parentElement();
					break;
				}
				case "control": {
					var ranges = selectional.createRange();
					element = ranges.item(0);
					break;
				}
			}
		}else{
			sel = this.getFrameNode(this.editor_design).getSelection();
			if(sel.rangeCount > 0){
				range = sel.getRangeAt(0);
				if(range.startContainer == range.endContainer)
				{
					if(range.startContainer.nodeType != 3)
						element = range.startContainer.childNodes[range.startOffset];
					else 
						element = range.startContainer;
				}else{
					element = range.commonAncestorContainer;
				}
			}
			if(element && element.nodeType == 3) element = element.parentNode;
		}
		return element;
	},
	oPenWin : function(_sTitle, _sWidth, _sHeight, _sUrl,cmd,vars)
	{
		
		document.getElementById(this.editor_design+'Box').className = 'box'; 
		_sUrl = _sUrl;
		var _bDialog = false;
		var _open    = false;
		var left = (window.screen.availWidth - _sWidth) / 2;
		var top = (window.screen.availHeight - _sHeight) / 2;
		//ie
		if(document.all)
		{
			
			if(this._open)
			{
				var returnValue = window.showModalDialog(_sUrl,this.editorWindow,'help:no;scroll:no;status:no' +
				';resizable:'  + (this.resizable ? 'yes' : 'no' ) +
				';dialogWidth:200px' +
				';dialogHeight:200px');
			}
			else
			{
				var returnValue = window.showModalDialog(_sUrl,this.editorWindow,'help:no;scroll:no;status:no' +
				';resizable:'  + (this.resizable ? 'yes' : 'no' ) +
				';dialogWidth:'+ _sWidth + 'px' +
				';dialogHeight:'+ _sHeight +'px');
			}
			if(returnValue!=null)
			{
				var oRTE = this.designWindow;
				switch(cmd)
				{
					
					case "insertIMAGE":
                        this.designWindow.focus();
                      
                        //var oRng = oRTE.document.selection.createRange();
                        this.designWindow.focus();
                        
                        //oRTE.document.execCommand(cmd, false, returnValue);
                        break;
                    case "insertHTML":
                        break;
					default :

						var oRng = oRTE.document.selection.createRange();
                        oRng.pasteHTML(returnValue);
						//oRng.collapse(false);
						//oRng.select();

						break;
				}
				
				oRTE.focus();
			}
		}
		//ff
		else
		{
			if (this._open)
			{
				var dialog = window.open('',"win","menubar=no,location=no,resizable=no,scrollbars=no,status=no,left=200,top=200,width="+_sWidth+",height="+_sHeight);
			}
			else
			{
				var dialog = window.open('',"win","menubar=no,location=no,resizable=no,scrollbars=no,status=no,width="+_sWidth+",height="+_sHeight+",left="+left+",top="+top);
			}
			dialog.location.href=_sUrl;
			dialog.dialogArguments=this.editorWindow;
		}
	},
	oPenDiv : function(_sClass,_sUrl,_sWidth,cmd)
	{
		window.currentEditor=this;
		
		document.getElementById(this.editor_design+'Box').className=_sClass;
		document.getElementById(this.editor_design+"box_iframe").src=_sUrl+'?flag='+this.editor_design;
		document.getElementById(this.editor_design+"box_iframe").width=_sWidth;
	},
	is_ie : function()
	{
		return navigator.appName == "Microsoft Internet Explorer";
	},
	innerHTML : function ()
	{
		var is_design_mode = (document.getElementById(this.editor_design+'tb1').className == 'current');
		var html;
		if(is_design_mode)
		{
            
			html = this.designWindow.document.body.innerHTML;
		}
		else
		{
			html = document.getElementById(this.editor_code).value;
		}
		html=html.replace(/\[media\swidth=\"(.+?)\"\sheight=\"(.+?)\"\ssrc=\"(.+?)\"\]/ig,this.tohtml("media",'$3','$1','$2'));
		html=html.replace(/\[audio\swidth=\"(.+?)\"\sheight=\"(.+?)\"\ssrc=\"(.+?)\"\]/ig,this.tohtml("audio",'$3','$1','$2'));
		html=html.replace(/\[flash\swidth=\"(.+?)\"\sheight=\"(.+?)\"\ssrc=\"(.+?)\"\]/ig,this.tohtml("flash",'$3','$1','$2'));
		return html;
	},
	save_no_prompt : function ()
	{
		return this.innerHTML();
	},
	change2editMode : function(designwin)
	{
   
        designwin.contentWindow.document.designMode = 'on';
        designwin.contentWindow.document.contentEditable = true;

		if(designwin.contentWindow.document.designMode == 'On')
		{
			this.designWindow.focus();
			window.clearInterval(this.changemodeStep);
		}
	},
	tohtml : function(type,src,w,h)
	{
		var html;
		switch (type)
		{
			
			case "media":
				html='<object id="MediaPlayer1" width="'+ w +'" height="'+ h +'" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '
				+'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"'
				+'align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..." '
				+'type="application/x-oleobject">'
				+'<param name="URL" value="'+ src +'">'
				+'<param name="autoStart" value="true">'
				+'<param name="invokeURLs" value="false">'
				+'<param name="playCount" value="10">'
				+'<param name="defaultFrame" value="datawindow">'
				+'<param name="uiMode" value="full">'
				+'<embed src="'+ src +'"'
				+'align="baseline" border="0" width="'+ w +'" height="'+ h +'"'
				+'type="application/x-mplayer2"'
				+'pluginspage=""'
				+'name="MediaPlayer1" showcontrols="1" showpositioncontrols="0"'
				+'showaudiocontrols="1" showtracker="1" showdisplay="0"'
				+'showstatusbar="1"'
				+'autosize="0"'
				+'showgotobar="0" showcaptioning="0" autostart="1" autorewind="0"'
				+'animationatstart="0" transparentatstart="0" allowscan="1"'
				+'enablecontextmenu="1" clicktoplay="0" '
				+'defaultframe="datawindow" invokeurls="0">'
				+'</embed>'
				+'</object>';
				break;
			case "audio":
				html='<object id="MediaPlayer1" width="'+ w +'" height="'+ h +'" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '
				+'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"'
				+'align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..." '
				+'type="application/x-oleobject">'
				+'<param name="URL" value="'+ src +'">'
				+'<param name="autoStart" value="true">'
				+'<param name="invokeURLs" value="false">'
				+'<param name="playCount" value="10">'
				+'<param name="defaultFrame" value="datawindow">'
				+'<param name="uiMode" value="full">'
				+'<embed src="'+ src +'"'
				+'align="baseline" border="0" width="'+ w +'" height="'+ h +'"'
				+'type="application/x-mplayer2"'
				+'pluginspage=""'
				+'name="MediaPlayer1" showcontrols="1" showpositioncontrols="0"'
				+'showaudiocontrols="1" showtracker="1" showdisplay="0"'
				+'showstatusbar="1"'
				+'autosize="0"'
				+'showgotobar="0" showcaptioning="0" autostart="1" autorewind="0"'
				+'animationatstart="0" transparentatstart="0" allowscan="1"'
				+'enablecontextmenu="1" clicktoplay="0" '
				+'defaultframe="datawindow" invokeurls="0">'
				+'</embed>'
				+'</object>';
				break;
			case "flash":
				html= '<object '
				+ '  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
				+ '  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"'
				+ '  width="' + w + '"'
				+ '  height="' + h + '">'
				+ '  <param name="movie" value="' + src + '">'
				+ '  <param name="quality" value="autohigh">'
				+ '  <param name="wmode" value="opaque">'
				+ '  <embed src="' + src + '" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>'
				+ '</object>';
			default:
				break;
		}
		return html;
	},
	//选中元素返回
	get_curr_element : function ()
	{
		var element = null;
		var sel;
		var range;
		
		if(this.is_ie()) {
			selectional = this.designWindow.document.selection;
			switch(selectional.type.toLowerCase()) {
				case "none":
					element = null;
					break;
				case "text": 
					range = selectional.createRange();
					element = range.parentElement();
					break;
				case "control":
					var ranges = selectional.createRange();

					element = ranges.item(0);
					break;
			}
		}
		else{
			sel = this.designWindow.getSelection();
			if(sel.rangeCount > 0){
				range = sel.getRangeAt(0);
				if(range.startContainer == range.endContainer)
				{
					if(range.startContainer.nodeType != 3)
						element = range.startContainer.childNodes[range.startOffset];
					else 
						element = range.startContainer;
				}else{
					element = range.commonAncestorContainer;
				}
			}
			if(element && element.nodeType == 3) element = element.parentNode;
		}
		return element;
	}

}


/*
//选中元素返回
get_curr_element = function(flag) {
        var element = null;
        var sel;
        var range;
        
        if(is_ie()) {
            selectional = getFrameNode(flag).document.selection;
            switch(selectional.type.toLowerCase()) {
                case "none": {
                    element = null;
                    break;
                }
                case "text": {
                    range = selectional.createRange();
                    element = range.parentElement();
                    break;
                }
                case "control": {
                    var ranges = selectional.createRange();

                    element = ranges.item(0);
                    break;
                }
            }
        }else{
            sel = getFrameNode(flag).getSelection();
            if(sel.rangeCount > 0){
                range = sel.getRangeAt(0);
                if(range.startContainer == range.endContainer)
                {
                    if(range.startContainer.nodeType != 3)
                        element = range.startContainer.childNodes[range.startOffset];
                    else 
                        element = range.startContainer;
                }else{
                    element = range.commonAncestorContainer;
                }
            }
            if(element && element.nodeType == 3) element = element.parentNode;
        }
        return element;
}

function getFrameNode(sNode){
    return document.frames ? document.frames[sNode] : document.getElementById(sNode).contentWindow;
}

//判断是否是IE
is_ie = function(){
	return navigator.appName == "Microsoft Internet Explorer";
} 
set_img_position = function(pos_flag , flag){
	curr_element = get_curr_element(flag);
	if(curr_element == null || curr_element.tagName.toLowerCase() != 'img'){
		alert("请您选中一张图片");
		return false;
	}
	
	if(pos_flag == "left") {
				curr_element.style.margin = "4px";
				curr_element.style.float = "left";
				curr_element.style.display = "block";
				curr_element.style.textAlign = "";
	}else if(pos_flag == "center") {
				curr_element.style.margin = "4px auto";
				curr_element.style.display = "block";
				curr_element.style.float = "";
				curr_element.style.textAlign = "center";
				curr_element.setAttribute("align", "");
			
	 }else if(pos_flag == "right") {
				curr_element.style.margin = "10px";
				curr_element.style.float = "right";
				curr_element.style.display = "block";
				curr_element.style.textAlign = "right";
	  }
	
	getFrameNode(flag).document.body.innerHTML = getFrameNode(flag).document.body.innerHTML;
	return false;
}
function setCmd(_sSort, _sFont , flag){
	var oRTE = document.getElementById(flag).contentWindow;
	oRTE.focus();
    if (_sSort == "FontName") {
		oRTE.document.execCommand(_sSort, '', _sFont);
	} else {
		formatFont(oRTE, _sFont);
	}
	oRTE.focus();
}
//hack fontsize command
function formatFont(ifra, v){
  //if IE
  if(document.all){
    ifra.document.execCommand("fontname", "", "TomRE_FN_TMP_XXX");
    var allfont = ifra.document.body.getElementsByTagName("font");
    for (var i = 0; i < allfont.length; i++){
      var font = allfont[i];
      if (font.getAttribute("face") == "TomRE_FN_TMP_XXX"){
        _delInFont(font, v);
        font.style.fontSize = v;
        font.removeAttribute("face");
      }
    }
  } else{
	var fsArr = ['', '10px', '14px', '16px', '18px', '24px', '32px'];
    ifra.document.execCommand("fontsize", "", v);
    var allfont = ifra.document.getElementsByTagName("font");
    for (var i = 0; i < allfont.length; i++){
      var font = allfont[i];
      if (font.getAttribute("size") == v){
        _delInFont(font, fsArr[v]);
        font.style.fontSize = fsArr[v];
      }
    }
  }
}
function _delInFont(elem, v){
  if (elem.tagName == "FONT" || elem.tagName == "SPAN") {
  	elem.style.fontSize = v;
  }
  var children = elem.childNodes;
  if (children) {
  	for (var i = 0; i < children.length; i++) {
      _delInFont(children[i], v);
  	}
  }
}
*/
