
var LatticeWidth="100%";
var LatticeHeight="200";
var LicenseKeys="";
var DeveloperID="";
var FontSelection="";
var ImageSelection="";
var BaseURL="";
var TableClasses="";
var CellClasses="";
var LinkClasses="";
var StyleSheetURL="";
var BackgroundImage="";
var BackgroundColor="";
var InitialHTML="<P>&nbsp;</p>";
var SaveFunction="";
var ButtonHide="";
var RowHide="";
var TargetFrames="";

function sethtml(x){
	frames ['LatticeEditDocument'].document.body.innerHTML=x;
}

function int2htmlColor(bigdec){
	var decred=Math.floor(bigdec/65536);
	var decgreen=Math.floor((bigdec-(65536*decred))/256);
	var decblue=bigdec-(65536*decred)-(256*decgreen);
	var red=decred.toString(16);
	var green=decgreen.toString(16);
	var blue=decblue.toString(16);
	if(red.length==1)red="0"+red;
	if(green.length==1)green="0"+green;
	if(blue.length==1)blue="0"+blue;hexstring="#"+blue+green+red;return hexstring;
}

	var editorInitialContent="<b> MIKE WAS HERE!</b><BR>HELLO WORLD";
	var millisecondtimer=0;millisecondtimerflag=0;
	var initfinished=0;
	var original_formatselect="";
	var original_fontnameselect="";
	var original_fontsizeselect="";
	var about_status=0;
	var help_status=0;
	var find_status=0;
	var color_status=0;
	var specialchar_status=0;
	var insertbookmark_status=0;
	var hyperlink_status=0;
	var image_status=0;
	var html_status=0;
	var table_status=0;
	var color_value="";
	var state_numlist=0;
	var state_bltlist=0;
	var state_btn_cut=0;
	var state_btn_about=0;
	var state_btn_copy=0;
	var state_btn_paste=0;
	var state_btn_find=0;
	var state_btn_undo=0;
	var state_btn_redo=0;
	var state_btn_table=0;
	var state_btn_image=0;
	var state_btn_hyperlink=0;
	var state_btn_unlink=0;
	var state_btn_hr=0;
	var state_btn_wysiwyg=0;
	var state_btn_html=0;
	var state_btn_special=0;
	var state_btn_tools=0;
	var state_btn_help=0;
	var state_btn_bold=0;
	var state_btn_italics=0;
	var state_btn_underline=0;
	var state_btn_fontcolor=0;
	var state_btn_fonthilight=0;
	var state_btn_left=0;
	var state_btn_center=0;
	var state_btn_right=0;
	var state_btn_numlist=0;
	var state_btn_bltlist=0;
	var state_btn_outdent=0;
	var state_btn_indent=0;
	var state_btn_save=0;
	var tablerows="";
	var tablecolumns="";
	var tablewidthspecified="";
	var tablewidth="";
	var tablewidthtype="";
	var tablealign="";
	var tablebordersize="";
	var tablecellpadding="";
	var tablecellspacing="";
	var tablebordercolor="";
	var tablebackgroundcolor="";
	var tableiscancel="";
	var tableisinsert="";
	var tablemoondowneropen=0;
	var tablevalign="";
	var tableclass="";
	var tablecellclass="";
	var imageisinserted=1;
	var imagespecifysize="";
	var imageheight="";
	var imagewidth="";
	var imagebordersize="";
	var imagealigment="";
	var imagehspacing="";
	var imagevspacing="";
	var imagespecifyimageurl="";
	var imageurl="";
	var imageiscancel="";
	var imageisinsert="";
	var imagedialogopen="";
	var insertimagetext="";
	var hyperlinkiscancel="";
	var hyperlinkisinsert="";
	var hyperlinkmoondowneropen="";
	var hyperlinkurl="";
	var hyperlinkbookmark="";
	var hyperlinktarget="";
	var hyperlinkclass="";
	var hyperlinkbookmarklist="";
	var originalwysiwyg="";
	var htmliscancel="";
	var htmlisinsert="";
	var htmlmoondowneropen="";
	var locationhere="";
	var specialchariscancel="";
	var specialcharisinsert="";
	var chartoinsert="";
	var specialcharmoondowneropen="";
	var insertbookmarkiscancel="";
	var insertbookmarkisinsert="";
	var bookmarktoinsert="";
	var insertbookmarkmoondowneropen="";
	var contextcode="";
	var stylesheetloaded=0;
	var islattice="";
	var keynotchecked=true;
	var helpmoondowner;
	var ischeckedalready=false;

function gethtml(){
	document.frames("LatticeTemp").document.body.innerHTML=document.frames("LatticeEditDocument").document.body.innerHTML;
	var gettables=frames ['LatticeTemp'].document.all.tags("TABLE");
	if(gettables.length>0){
		var tablecount=1;
		while(tablecount<=gettables.length){
			if(gettables[tablecount-1].border>0){
			gettables[tablecount-1].border=parseInt(gettables[tablecount-1].border)-1;
			}
	tablecount++;
		}
	}
	if(BaseURL!=""){
	var getimages=frames ['LatticeTemp'].document.all.tags("IMG");
	if(getimages.length>0){
		var imagecount=1;
		var workingstring1="";
		var workingstring2="";
		var imagere=new RegExp(BaseURL,"gi");
		while(imagecount<=getimages.length){
			workingstring1=getimages[imagecount-1].src;
			workingstring2=workingstring1.replace(imagere,"");
			getimages[imagecount-1].src=workingstring2;
			imagecount++;
			}
		}
	}
	var getanchors=frames ['LatticeTemp'].document.all.tags("A");
	var gethere=""+parent.location.href;
	var subgethere=gethere.substring(0,(gethere.lastIndexOf("/")+1));
if(getanchors.length>0){
	var anchorcount=1;
	var workingstring1a="";
	var workingstring2a="";
	var workingstring3a="";
	var anchorre=new RegExp(gethere,"gi");
	while(anchorcount<=getanchors.length){
		workingstring1a=getanchors[anchorcount-1].href;workingstring2a=workingstring1a.replace(anchorre,"");
		var anchorre2=new RegExp(subgethere,"gi");
		workingstring3a=workingstring2a.replace(anchorre2,"");
			if(workingstring3a!=""){
				getanchors[anchorcount-1].href=workingstring3a;
			}
	anchorcount++;
	}
}
var gothtml=document.frames("LatticeTemp").document.body.innerHTML;
return gothtml;
}
