imagesDir=addContextPath("/WYSIWYG/icons/");cssDir=addContextPath("/WYSIWYG/styles/");popupsDir=addContextPath("/WYSIWYG/popups/");wysiwygWidth=840;wysiwygHeight=250;document.write('<link rel="stylesheet" type="text/css" href="'+cssDir+'styles.css">\n');var Fonts=new Array();Fonts[0]="Arial";Fonts[1]="Trebuchet MS";Fonts[2]="Tahoma";Fonts[3]="Verdana";Fonts[4]="Courier New";Fonts[5]="Georgia";Fonts[6]="Times New Roman";Fonts[7]="Impact";Fonts[8]="Comic Sans MS";var BlockFormats=new Array();BlockFormats[0]="Address";BlockFormats[1]="Bulleted List";BlockFormats[2]="Definition";BlockFormats[3]="Definition Term";BlockFormats[4]="Directory List";BlockFormats[5]="Formatted";BlockFormats[6]="Heading 1";BlockFormats[7]="Heading 2";BlockFormats[8]="Heading 3";BlockFormats[9]="Heading 4";BlockFormats[10]="Heading 5";BlockFormats[11]="Heading 6";BlockFormats[12]="Menu List";BlockFormats[13]="Normal";BlockFormats[14]="Numbered List";var FontSizes=new Array();FontSizes[0]="1";FontSizes[1]="2";FontSizes[2]="3";FontSizes[3]="4";FontSizes[4]="5";FontSizes[5]="6";FontSizes[6]="7";var buttonName=new Array();buttonName[0]="bold";buttonName[1]="italic";buttonName[2]="underline";buttonName[5]="subscript";buttonName[6]="superscript";buttonName[7]="seperator";buttonName[8]="justifyleft";buttonName[9]="justifycenter";buttonName[10]="justifyright";buttonName[11]="seperator";buttonName[12]="unorderedlist";buttonName[13]="orderedlist";buttonName[14]="outdent";buttonName[15]="indent";var buttonName2=new Array();buttonName2[0]="forecolor";buttonName2[1]="backcolor";buttonName2[2]="seperator";buttonName2[3]="cut";buttonName2[4]="copy";buttonName2[5]="paste";buttonName2[6]="seperator";buttonName2[7]="undo";buttonName2[8]="redo";buttonName2[9]="seperator";buttonName2[10]="inserttable";buttonName2[11]="createlink";buttonName2[12]="seperator";buttonName2[13]="viewSource";buttonName2[14]="seperator";buttonName2[15]="indic";var ToolbarList={bold:["Bold","Bold",imagesDir+"bold.gif",imagesDir+"bold_on.gif"],italic:["Italic","Italic",imagesDir+"italics.gif",imagesDir+"italics_on.gif"],underline:["Underline","Underline",imagesDir+"underline.gif",imagesDir+"underline_on.gif"],strikethrough:["Strikethrough","Strikethrough",imagesDir+"strikethrough.gif",imagesDir+"strikethrough_on.gif"],seperator:["","",imagesDir+"seperator.gif",imagesDir+"seperator.gif"],subscript:["Subscript","Subscript",imagesDir+"subscript.gif",imagesDir+"subscript_on.gif"],superscript:["Superscript","Superscript",imagesDir+"superscript.gif",imagesDir+"superscript_on.gif"],justifyleft:["Justifyleft","Justifyleft",imagesDir+"justify_left.gif",imagesDir+"justify_left_on.gif"],justifycenter:["Justifycenter","Justifycenter",imagesDir+"justify_center.gif",imagesDir+"justify_center_on.gif"],justifyright:["Justifyright","Justifyright",imagesDir+"justify_right.gif",imagesDir+"justify_right_on.gif"],unorderedlist:["InsertUnorderedList","InsertUnorderedList",imagesDir+"list_unordered.gif",imagesDir+"list_unordered_on.gif"],orderedlist:["InsertOrderedList","InsertOrderedList",imagesDir+"list_ordered.gif",imagesDir+"list_ordered_on.gif"],outdent:["Outdent","Outdent",imagesDir+"indent_left.gif",imagesDir+"indent_left_on.gif"],indent:["Indent","Indent",imagesDir+"indent_right.gif",imagesDir+"indent_right_on.gif"],cut:["Cut","Cut",imagesDir+"cut.gif",imagesDir+"cut_on.gif"],copy:["Copy","Copy",imagesDir+"copy.gif",imagesDir+"copy_on.gif"],paste:["Paste","Paste",imagesDir+"paste.gif",imagesDir+"paste_on.gif"],forecolor:["ForeColor","ForeColor",imagesDir+"forecolor.gif",imagesDir+"forecolor_on.gif"],backcolor:["BackColor","BackColor",imagesDir+"backcolor.gif",imagesDir+"backcolor_on.gif"],undo:["Undo","Undo",imagesDir+"undo.gif",imagesDir+"undo_on.gif"],redo:["Redo","Redo",imagesDir+"redo.gif",imagesDir+"redo_on.gif"],inserttable:["InsertTable","InsertTable",imagesDir+"insert_table.gif",imagesDir+"insert_table_on.gif"],createlink:["CreateLink","CreateLink",imagesDir+"insert_hyperlink.gif",imagesDir+"insert_hyperlink_on.gif"],viewSource:["ViewSource","ViewSource",imagesDir+"view_source.gif",imagesDir+"view_source_on.gif"],viewText:["ViewText","ViewText",imagesDir+"view_text.gif",imagesDir+"view_text_on.gif"],selectfont:["SelectFont","SelectFont",imagesDir+"select_font.gif",imagesDir+"select_font_on.gif"],selectsize:["SelectSize","SelectSize",imagesDir+"select_size.gif",imagesDir+"select_size_on.gif"],indic:["Indic","Type in your Regional language",imagesDir+"indic.gif",imagesDir+"indic_on.gif"]};if(typeof HTMLElement!="undefined"&&!HTMLElement.prototype.insertAdjacentElement){HTMLElement.prototype.insertAdjacentElement=function(A,B){switch(A){case"beforeBegin":this.parentNode.insertBefore(B,this);break;case"afterBegin":this.insertBefore(B,this.firstChild);break;case"beforeEnd":this.appendChild(B);break;case"afterEnd":if(this.nextSibling){this.parentNode.insertBefore(B,this.nextSibling)}else{this.parentNode.appendChild(B)}break}};HTMLElement.prototype.insertAdjacentHTML=function(B,D){var C=this.ownerDocument.createRange();C.setStartBefore(this);var A=C.createContextualFragment(D);this.insertAdjacentElement(B,A)};HTMLElement.prototype.insertAdjacentText=function(B,C){var A=document.createTextNode(C);this.insertAdjacentElement(B,A)}}viewTextMode=0;function generate_wysiwygResize(C,B,A){wysiwygWidth=B;wysiwygHeight=A;return generate_wysiwyg(C,null,null)}function generate_wysiwyg(D,J,M){document.getElementById(D).style.display="none";var S=D;if(J||M){toolbarWidth=parseFloat(wysiwygWidth)-10}else{toolbarWidth=parseFloat(wysiwygWidth)+2}var L;L='<table cellpadding="0" cellspacing="0" border="0" class="toolbar1" style="width:'+toolbarWidth+'px;"><tr><td style="width: 6px;"><img src="'+imagesDir+'seperator2.gif" alt="" hspace="3"></td>';L+='<td style="width: 90px;"><span id="FontSelect'+S+'"></span></td>';L+='<td style="width: 60px;"><span id="FontSizes'+S+'"></span></td>';for(var W=0;W<=buttonName.length;){if(buttonName[W]){var Z=ToolbarList[buttonName[W]];var b=Z[0];var B=Z[1];var R=Z[2];var C=Z[3];if(buttonName[W]=="seperator"){L+='<td style="width: 12px;" align="center"><img src="'+R+'" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"></td>'}else{L+='<td style="width: 22px;"><img src="'+R+'" border=0 unselectable="on" title="'+B+'" id="'+b+'" class="button" onClick="formatText(this.id,\''+S+"');\" onmouseover=\"if(className=='button'){className='buttonOver'}; this.src='"+C+"';\" onmouseout=\"if(className=='buttonOver'){className='button'}; this.src='"+R+'\';" unselectable="on" width="20" height="20"></td>'}}W++}L+="<td>&nbsp;</td></tr></table>";var A;A='<table cellpadding="0" cellspacing="0" border="0" class="toolbar2" style="width:'+toolbarWidth+'px;"><tr><td style="width: 6px;"><img src="'+imagesDir+'seperator2.gif" alt="" hspace="3"></td>';for(var V=0;V<=buttonName2.length;){if(buttonName2[V]){var Z=ToolbarList[buttonName2[V]];var b=Z[0];var B=Z[1];var R=Z[2];var C=Z[3];if(buttonName2[V]=="seperator"){A+='<td style="width: 12px;" align="center"><img src="'+R+'" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"></td>'}else{if(buttonName2[V]=="viewSource"){A+='<td style="width: 22px;">';A+='<span id="HTMLMode'+S+'"><img src="'+R+'" border=0 unselectable="on" title="'+B+'" id="'+b+'" class="button" onClick="formatText(this.id,\''+S+"');\" onmouseover=\"if(className=='button'){className='buttonOver'}; this.src='"+C+"';\" onmouseout=\"if(className=='buttonOver'){className='button'}; this.src='"+R+'\';" unselectable="on"  width="20" height="20"></span>';A+='<span id="textMode'+S+'"><img src="'+imagesDir+'view_text.gif" border=0 unselectable="on" title="viewText"          id="ViewText"       class="button" onClick="formatText(this.id,\''+S+"');\" onmouseover=\"if(className=='button'){className='buttonOver'}; this.src='"+imagesDir+"view_text_on.gif';\"    onmouseout=\"if(className=='buttonOver'){className='button'}; this.src='"+imagesDir+'view_text.gif\';" unselectable="on"  width="20" height="20"></span>';A+="</td>"}else{if(buttonName2[V]=="indic"){A+=J?'<td style="width:369px"><img src="'+R+'" border=0 unselectable="on" title="'+B+'" id="'+b+'" class="button" onClick="openWindow(event,\''+S+"')\" onmouseover=\"if(className=='button'){className='buttonOver'}; this.src='"+C+"';\" onmouseout=\"if(className=='buttonOver'){className='button'}; this.src='"+R+'\';" unselectable="on" style="width:369px;height:21px;"></td>':""}else{A+='<td style="width: 22px;"><img src="'+R+'" border=0 unselectable="on" title="'+B+'" id="'+b+'" class="button" onClick="formatText(this.id,\''+S+"');\" onmouseover=\"if(className=='button'){className='buttonOver'}; this.src='"+C+"';\" onmouseout=\"if(className=='buttonOver'){className='button'}; this.src='"+R+'\';" unselectable="on" width="20" height="20"></td>'}}}}V++}A+="<td>&nbsp;</td></tr></table>";var I='<table id="wysiwygtable'+S+'" cellpadding="0" cellspacing="0" border="0" style="width:'+wysiwygWidth+"px; height:"+wysiwygHeight+'px;border: 0px inset #CCCCCC;border-left:1px solid #CCCCCC;border-right:1px solid #CCCCCC;padding:0px;margin:0px;">\n<tr><td valign="top"><iframe frameborder="0" id="wysiwyg'+S+'"></iframe></td></tr><tr><td id="B" align="center" class="gripper"><img src="'+imagesDir+'gripper.gif" ondragstart="return false;"/></td></tr></table>\n';var Q=L+A;var Y;if(J||M){var G='<div id="tabberdiv'+S+'"><div class="tabber"><div class="tabbertab"><h2>Text</h2>'+Q+"</div>";var F=J?'<div class="tabbertab" onclick="showImageTab(\''+S+"', '"+J+'\')"><h2>Insert Photo</h2><table cellpadding="0" border="0" cellspacing="0"><tr><td class="imgLPanel"><div><div class="spacer"><!-- --></div><div id="imgLib'+S+'" class="selected" onClick="showImagePanel(\''+S+"', this, '"+J+'\')" ><a><b>My photos</b></a></div><div class="spacer"><!-- --></div><div id="imgUp'+S+'" class="beit" onClick="showImagePanel(\''+S+"', this, '"+J+'\')"><a><b>Upload</b></a></div><div class="spacer"><!-- --></div><div id="imgUrl'+S+'" class="beit" onClick="showImagePanel(\''+S+"', this, '"+J+'\')"><a><b>Link / Url</b></a></div><div class="spacer"><!-- --></div></div></td><td class="imgRPanel"><div id="imgRPanel'+S+'"></div><div class="mystyle"><!-- --></div></td></tr></table></div>':"";var P=M?'<div class="tabbertab" onclick="showVideoTab(\''+S+"', '"+M+'\')"><h2>Insert Video</h2><table cellpadding="0" border="0" cellspacing="0"><tr><td class="imgLPanel"><div><div class="spacer videoSpacer"><!-- --></div><div id="videoLib'+S+'" class="selected" onClick="showVideoPanel(\''+S+"', this, '"+M+'\')" ><a><b>My videos</b></a></div><div class="spacer"><!-- --></div><div id="videoUrl'+S+'" class="beit" onClick="showVideoPanel(\''+S+"', this, '"+M+'\')"><a><b>Youtube Url</b></a></div><div class="spacer videoSpacer"><!-- --></div></div></td><td class="imgRPanel"><div id="videoRPanel'+S+'" ></div><div class="mystyle"><!-- --></div></td></tr></table></div>':"";var K="</div></div>";Y=G+F+P+K}else{Y=Q}Y+=I+(J?getQuillPad(S):"");document.getElementById(S).insertAdjacentHTML("afterEnd",Y);outputFontSelect(S);outputFontSizes(S);hideFonts(S);hideFontSizes(S);document.getElementById("textMode"+S).style.display="none";document.getElementById("wysiwyg"+S).style.height=wysiwygHeight+"px";document.getElementById("wysiwyg"+S).style.width=wysiwygWidth+"px";var U=document.getElementById(S).value;var a=document.getElementById("wysiwyg"+S).contentWindow.document;a.open();a.write(U);a.close();a.body.contentEditable=true;a.body.style.fontSize="12px";a.body.style.fontFamily="Trebuchet MS";a.designMode="on";var X=navigator.appName;if(X=="Microsoft Internet Explorer"){for(var N=0;N<document.forms.length;N++){document.forms[N].attachEvent("onsubmit",function(){updateTextArea(S)})}}else{for(var N=0;N<document.forms.length;N++){document.forms[N].addEventListener("submit",function H(){updateTextArea(S)},true)}}if(Minglebox&&Minglebox.TextArea){new Minglebox.TextArea("wysiwyg"+S,"B")}var O,T,W;var E={};O=new tabberObj(E);T=document.getElementById("tabberdiv"+S)?document.getElementById("tabberdiv"+S).getElementsByTagName("div"):null;if(T){for(W=0;W<T.length;W++){if(T[W].className&&T[W].className.match(O.REclassMain)){E.div=T[W];ttabs=T[W].getElementsByTagName("div");E.cb={};tt=0;for(t=0;t<ttabs.length;t++){if(ttabs[t].className&&ttabs[t].className.match(O.REclassTab)){if(ttabs[t].onclick){E.cb[tt]=ttabs[t].onclick}tt++}}T[W].tabber=new tabberObj(E)}}}}function formatText(A,C,F){document.getElementById("wysiwyg"+C).contentWindow.focus();var M=new Array("FontSize","FontName","Bold","Italic","Underline","Subscript","Superscript","Strikethrough","Justifyleft","Justifyright","Justifycenter","InsertUnorderedList","InsertOrderedList","Indent","Outdent","ForeColor","BackColor","InsertImage","InsertTable","CreateLink");for(var G=0;G<=M.length;){if(M[G]==A){var J=1}G++}if(viewTextMode==1&&J==1){alert("You are in HTML Mode. This feature has been disabled.")}else{if(A=="FontSize"){document.getElementById("wysiwyg"+C).contentWindow.document.execCommand("FontSize",false,F)}else{if(A=="FontName"){document.getElementById("wysiwyg"+C).contentWindow.document.execCommand("FontName",false,F)}else{if(A=="ForeColor"||A=="BackColor"){var L=screen.availWidth;var I=screen.availHeight;var B=210,K=165;var D=(L-B)/2,H=(I-K)/2;var E=dec_to_rgb(document.getElementById("wysiwyg"+C).contentWindow.document.queryCommandValue(A));window.open(popupsDir+"select_color.html?color="+E+"&command="+A+"&wysiwyg="+C,"popup","location=0,status=0,scrollbars=0,width="+B+",height="+K+",top="+H+",left="+D)}else{if(A=="InsertTable"){window.open(popupsDir+"create_table.html?wysiwyg="+C,"popup","location=0,status=0,scrollbars=0,resizable=0,width=400,height=360")}else{if(A=="CreateLink"){window.open(popupsDir+"insert_hyperlink.html?wysiwyg="+C,"popup","location=0,status=0,scrollbars=0,resizable=0,width=300,height=110")}else{if(A=="ViewSource"){viewSource(C)}else{if(A=="ViewText"){viewText(C)}else{if(A=="Help"){window.open(popupsDir+"about.html","popup","location=0,status=0,scrollbars=0,resizable=0,width=400,height=330")}else{document.getElementById("wysiwyg"+C).contentWindow.document.execCommand(A,false,null)}}}}}}}}}}function insertHTML(A,E){var C=navigator.appName;if(C=="Microsoft Internet Explorer"){document.getElementById("wysiwyg"+E).contentWindow.document.selection.createRange().pasteHTML(A)}else{var D=document.getElementById("wysiwyg"+E).contentWindow.document.createElement("div");D.innerHTML=A;var B=insertNodeAtSelection(D,E)}}function insertNodeAtSelection(F,C){var B=document.getElementById("wysiwyg"+C).contentWindow.getSelection();var G=B.getRangeAt(0);B.removeAllRanges();G.deleteContents();var A=G.startContainer;var K=G.startOffset;G=document.createRange();if(A.nodeType==3&&F.nodeType==3){A.insertData(K,F.nodeValue);G.setEnd(A,K+F.length);G.setStart(A,K+F.length)}else{var D;if(A.nodeType==3){var E=A;A=E.parentNode;var L=E.nodeValue;var I=L.substr(0,K);var H=L.substr(K);var J=document.createTextNode(I);D=document.createTextNode(H);A.insertBefore(D,E);A.insertBefore(F,D);A.insertBefore(J,F);A.removeChild(E)}else{D=A.childNodes[K];A.insertBefore(F,D)}G.setEnd(D,0);G.setStart(D,0)}B.addRange(G)}function dec_to_rgb(D){var B="";for(var A=0;A<3;A++){var C=D&255;D>>=8;var E=C&15;var F=(C>>4)&15;B+=F.toString(16);B+=E.toString(16)}return B.toUpperCase()}function outputFontSelect(F){var A=ToolbarList.selectfont;var B=A[2];var D=A[3];Fonts.sort();var E=new Array;E[F]='<table border="0" cellpadding="0" cellspacing="0"><tr><td onMouseOver="document.getElementById(\'selectFont'+F+"').src='"+D+"';\" onMouseOut=\"document.getElementById('selectFont"+F+"').src='"+B+'\';"><img src="'+B+'" id="selectFont'+F+'" width="85" height="20" onClick="showFonts(\''+F+'\');" unselectable="on"><br>';E[F]+='<span id="Fonts'+F+'" class="dropdown" style="width: 145px;">';for(var C=0;C<=Fonts.length;){if(Fonts[C]){E[F]+="<button type=\"button\" onClick=\"formatText('FontName','"+F+"','"+Fonts[C]+"'); hideFonts('"+F+'\');" onMouseOver="this.className=\'mouseOver\'" onMouseOut="this.className=\'mouseOut\'" class="mouseOut" style="width: 120px;"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="left" style="font-family:'+Fonts[C]+'; font-size: 12px;">'+Fonts[C]+"</td></tr></table></button><br>"}C++}E[F]+="</span></td></tr></table>";document.getElementById("FontSelect"+F).insertAdjacentHTML("afterBegin",E[F])}function outputFontSizes(F){var E=ToolbarList.selectsize;var D=E[2];var C=E[3];FontSizes.sort();var A=new Array;A[F]='<table border="0" cellpadding="0" cellspacing="0"><tr><td onMouseOver="document.getElementById(\'selectSize'+F+"').src='"+C+"';\" onMouseOut=\"document.getElementById('selectSize"+F+"').src='"+D+'\';"><img src="'+D+'" id="selectSize'+F+'" width="49" height="20" onClick="showFontSizes(\''+F+'\');" unselectable="on"><br>';A[F]+='<span id="Sizes'+F+'" class="dropdown" style="width: 170px;">';for(var B=0;B<=FontSizes.length;){if(FontSizes[B]){A[F]+="<button type=\"button\" onClick=\"formatText('FontSize','"+F+"','"+FontSizes[B]+"');hideFontSizes('"+F+'\');" onMouseOver="this.className=\'mouseOver\'" onMouseOut="this.className=\'mouseOut\'" class="mouseOut" style="width: 145px;"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="left" style="font-family: arial, verdana, helvetica;"><font size="'+FontSizes[B]+'">size '+FontSizes[B]+"</font></td></tr></table></button><br>"}B++}A[F]+="</span></td></tr></table>";document.getElementById("FontSizes"+F).insertAdjacentHTML("afterBegin",A[F])}function hideFonts(A){document.getElementById("Fonts"+A).style.display="none"}function hideFontSizes(A){document.getElementById("Sizes"+A).style.display="none"}function showFonts(A){if(document.getElementById("Fonts"+A).style.display=="block"){document.getElementById("Fonts"+A).style.display="none"}else{document.getElementById("Fonts"+A).style.display="block";document.getElementById("Fonts"+A).style.position="absolute"}}function showFontSizes(A){if(document.getElementById("Sizes"+A).style.display=="block"){document.getElementById("Sizes"+A).style.display="none"}else{document.getElementById("Sizes"+A).style.display="block";document.getElementById("Sizes"+A).style.position="absolute"}}function viewSource(E){var C=document.getElementById("wysiwyg"+E).contentWindow.document;var D=navigator.appName;if(D=="Microsoft Internet Explorer"){var A=C.body.innerHTML;C.body.innerText=A}else{var B=document.createTextNode(C.body.innerHTML);C.body.innerHTML="";C.body.appendChild(B)}document.getElementById("HTMLMode"+E).style.display="none";document.getElementById("textMode"+E).style.display="block";C.body.style.fontSize="12px";C.body.style.fontFamily="Courier New";viewTextMode=1}function viewText(E){var B=document.getElementById("wysiwyg"+E).contentWindow.document;var D=navigator.appName;if(D=="Microsoft Internet Explorer"){var C=B.body.innerText;B.body.innerHTML=C}else{var A=B.body.ownerDocument.createRange();A.selectNodeContents(B.body);B.body.innerHTML=A.toString()}document.getElementById("textMode"+E).style.display="none";document.getElementById("HTMLMode"+E).style.display="block";B.body.style.fontSize="12px";B.body.style.fontFamily="Trebuchet MS";viewTextMode=0}function updateTextArea(A){document.getElementById(A).value=document.getElementById("wysiwyg"+A).contentWindow.document.body.innerHTML}function showImagePanel(C,A,B){document.getElementById("imgUp"+C).className=A.id=="imgUp"+C?"selected":"beit";document.getElementById(B).style.display=A.id=="imgUp"+C?"block":"none";document.getElementById("imgLib"+C).className=A.id=="imgLib"+C?"selected":"beit";document.getElementById("photoChooseDiv"+C).style.display=A.id=="imgLib"+C?"block":"none";document.getElementById("imgUrl"+C).className=A.id=="imgUrl"+C?"selected":"beit";document.getElementById("photoUrlDiv"+C).style.display=A.id=="imgUrl"+C?"block":"none"}function showVideoPanel(C,A,B){document.getElementById("videoUrl"+C).className=A.id=="videoUrl"+C?"selected":"beit";document.getElementById(B).style.display=A.id=="videoUrl"+C?"block":"none";document.getElementById("videoLib"+C).className=A.id=="videoLib"+C?"selected":"beit";document.getElementById("videoChooseDiv"+C).style.display=A.id=="videoLib"+C?"block":"none"}function getSource(B){var A=document.getElementById("wysiwyg"+B).contentWindow.document;return A.body.innerHTML}function setSource(A,C){var B=document.getElementById("wysiwyg"+C).contentWindow.document;B.body.innerHTML=A}function addPhotoLink(D,B){var A=getSource(D);A+='<img src="'+B+'" />';setSource(A,D);if(document.getElementById("pUpPb")){var C=document.getElementById("pUpPb");C.style.display="none"}}function addPhotoWebLink(D){var B=document.getElementById("pLoc"+D).value;if(B==null||B.replace(/^\s*/,"").replace(/\s*$/,"").length==0){alert("Please provide a link !!");return false}var A=getSource(D);var C='<img src="'+B+'" />';A+=C;setSource(A,D)}function addVideoLink(C,B){var A=getSource(C);A+='<div style="border: 1px solid black; height: 350px; width: 425px;"><object width="425" height="350"> <param name="movie" value="'+B+'"></param> <param name="wmode" value="transparent"></param><embed src="'+B+'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></div>';setSource(A,C)}function showImageTab(G,F){if(!document.getElementById("photoUrlDiv"+G)){var D=document.getElementById("imgRPanel"+G);var C=new MediaSlider(G,"/slideshow.do?ajax=true",imageClickHandler,560,true);var E='<div id="photoChooseDiv'+G+'" style="width:650px">'+C.getHtml()+"</div>";var B='<div id="photoUrlDiv'+G+'" class="upload bold" style="display:none;text-align:center;position:relative;top:-20px;"><label>Photo Location(URL)&nbsp;&nbsp;</label><input id="pLoc'+G+'" type="text" value="http://" class="pLoc"><input type="button" value="Submit" onclick="addPhotoWebLink(\''+G+"')\"></div>";D.innerHTML=E+B;if(F&&document.getElementById(F)){var A=document.createElement("div");A.appendChild(document.getElementById(F));D.appendChild(A)}C.fetch(10)}}function showVideoTab(F,B){if(!document.getElementById("videoChooseDiv"+F)){var D=document.getElementById("videoRPanel"+F);var C=new MediaSlider(F,"/videoshow.do?ajax=true",videoClickHandler,560,true);var E='<div id="videoChooseDiv'+F+'" style="width:550px">'+C.getHtml()+"</div>";D.innerHTML=E;if(B&&document.getElementById(B)){var A=document.createElement("div");A.appendChild(document.getElementById(B));D.appendChild(A)}C.fetch(10)}}function imageClickHandler(D,B){var C=B.thumb;var A=C.replace("m_data","l_data");addPhotoLink(B.self.opId,A);if(document.postFormEx&&document.postFormEx.photoId){document.postFormEx.photoId.value=B.mediaId}}function videoClickHandler(C,A){var B=getSource(A.self.opId);B+='<div style="border:1px solid #eaeaea; height:350px; width:425px;"  >'+A.embed+"</div>";setSource(B,A.self.opId);if(document.postFormEx&&document.postFormEx.videoId){document.postFormEx.videoId.value=A.mediaId}}function quillHandler(B,A){setSource(getSource(B)+A,B);setTimeout(function(){hideComponents("quillWindow"+B)},100)}var tl=false;function openWindow(C,D){var B=["blogContent"];var A="langMenu";if(!tl){initTransliterationApi(B,A,"checkboxId");tl=true}showComponent(C,"quillWindow"+D)}function hideComponents(A){hideComponent(A)}function getQuillPad(B){var A='<div id="quillWindow'+B+'" class="ajaxChatStyle" style="width:570px;z-index:0;" ><div class="chatTitleBar" onmousedown = "track(event);" onmouseup = "untrack();" ><div class="chatCloseDiv"><a href="javascript:hideComponents(\'quillWindow'+B+'\');"><img src="'+addContextPath("/images/website/ChitoChatCloseBtn.gif")+'" border="0" alt="Close" /></a></div><div class="divLeft"><b>Type in Indian Languages</b></div></div><div class="divCenter"><input type="checkbox" id="checkboxId" style="position:relative;top:2px;" /> Type in <span id=\'langMenu\'></span><span style="margin-left:5px;">(Press Ctrl + g to toggle)</span><textarea rows="14" cols="65" id="blogContent" name="blogContent"></textarea><div style="text-align:right;"><input type="button" style="width: 70px; margin-left: 80px" value="Done" onclick="quillHandler(\''+B+"', document.getElementById('blogContent').value);\"/></div></div></div>";return A};