/*
* ig_htmleditor_ie.js
* Version 11.1.20111.2064
* Copyright(c) 2001-2011 Infragistics, Inc. All Rights Reserved.
*/
//vs 090111
function iged_init(ids,p1,p2,p3,p4,p5)
{
ids=ids.split("|");
var id=ids[0];
var elem=iged_el(ids[1]),ta=iged_el(id+"_t_a"),tb=iged_el(ids[3]);
if(!ta)return;
var o=new iged_new(id,ta,tb,p1,p2,p3,p4,p5);
o._ids=[ids[4]+"_d",ids[4]+"_h"];
o._elem=elem;
o._ie=function()
{
if(this._wSet||!this._elem0)return;
var e=this._elem.parentNode;
var w=this._elem0.style.width;
if(!w)w='100%';
if(w.indexOf('px')>0)
{
w=e?e.offsetWidth:0;
if(w<10)return;
e.style.width=(w+='px');
}
this._wSet=w;
}
o._doc=function(){return this._elem.document;}
o._sel=function(){return this._doc().selection;}
o._range=function(){return this._sel().createRange();}
o.getText=function(){return this._html?this._elem.innerText:this._elem.innerHTML;}
o._onLink=function()
{
var img=this._getSelImg();
if(img)img.border=0;
this._format("CreateLink");
}
o.print=function()
{
var s=this._elem.outerHTML;
var i=s.indexOf(" style=");
if(i>3)
{
var s0=s.substring(i+7,i+8);
s=s.substring(i+8);
s=s.substring(0,s.indexOf(s0));
}
var win=window.open("","","width=10,height=10");
win.document.write("
"+this._elem.innerHTML+"");
win.document.close();
win.print();
win.close();
}
o._inTbl=function()
{
var cr=iged_all._curRange=this._range();
if(!cr||this._sel().type=="Control"||!cr.parentElement)return false;
return this._getTag(cr.parentElement(),'TD','TH');
}
o._insBook=function(n){iged_insText("",false,true,true);}
o._insRule=function(align,w,clr,size,noShad)
{
var t="
";
iged_insText(t,false,true,true);
}
o._onApplyStyle=function(e)
{
var str=e.id,cr=iged_all._curRange;
if(!cr||!cr.select)return;
var txt=cr.htmlText;
if(!txt||txt.indexOf("hidden")>0)txt="";
if(txt=="")
{
cr.expand("word");
txt=cr.htmlText;
}
if(txt.indexOf("hidden")>-1)txt="";
if(str.indexOf(":")>1)str=""+txt+"";
else if(str.length>1)str=""+txt+""
cr.select();
this._doc().execCommand("removeFormat");
if(str.length>1)iged_insText(str,false,true);
this._afterSel(e);
}
o._popWin=function(cap,x,img,evt)
{
x=this._fixDlgS(x);
var id=x[0],h=x[14],w=x[15],flag=x[16];
if(id.length<1)return;
if(flag=="t")if((iged_all._curTable=this._getCurTable())==null)return;
if(flag=="c")if((iged_all._curCell=this._getCurCell())==null)return;
if(this._isKnown(id))iged_all._curRange=this._range();
iged_closePop();
var elem=iged_el(id,1),pan=this._pan();
if(!elem||!pan)return;
this._choiceAct=this._itemStyle=null;
if(!elem._igf){elem._igf=true;this._fixPop(elem);}
if(x[1])pan.className=x[1];
var s=pan.style;
if(x[2])s.backgroundColor=x[2];if(x[3])s.borderColor=x[3];
if(x[4])s.borderStyle=x[4];if(x[5])s.borderWidth=x[5];
if(x[6])s.fontFamily=x[6];if(x[7])s.fontSize=x[7];if(x[8])s.color=x[8];
if(h)s.height=h;if(w)s.width=w;
var tbl=document.createElement("TABLE");
tbl.border=tbl.cellPadding=tbl.cellSpacing=0;
tbl.insertRow();tbl.insertRow();
if(w)tbl.style.width=w;
var r0=tbl.rows[0];
r0.insertCell();
tbl.rows[1].insertCell();
var c0=r0.cells[0];var s0=c0.style;
s0.width="100%";s0.cursor="pointer";
c0.id="titleBar";
if(x[10])s0.backgroundColor=x[10];
var txt="";
if(img!="")txt+="";
txt+=" "+cap+" | ";
if(x[9])txt+="";
txt+=" |
";
c0.innerHTML=txt;
tbl.rows[1].cells[0].innerHTML=elem.innerHTML;
pan.innerHTML=tbl.outerHTML;
iged_all._pop=pan;
iged_all._popID=this.ID;
this._pos(evt,pan,9);
this._delay();
if(flag=="c")iged_loadCell();
if(flag=="t")iged_loadTable();
if(!pan._mde){this._addLsnr(pan,"mousedown",iged_dragEvt);pan._mde=true;}
}
o._decode=function(t){return t.replace(//gi, ">");}
o._encode=function(txt)
{
var exp=/