window.onerror=errorSupress;function errorSupress(){return true;}function localSave(){contentVal=document.edit.content.value;frameNode=document.getElementById("localFrame");frameNodeChildNum=frameNode.childNodes.length;if(frameNodeChildNum == 1){disFrameNode=document.getElementById("disFrame");}disFrameNode = document.createElement("iframe");disFrameNode.setAttribute("id", "disFrame");disFrameNode.setAttribute("width","20px");disFrameNode.setAttribute("height","10px");disFrameNode.setAttribute("scrolling", "no");disFrameNode.setAttribute("frameBorder", "1");frameNode.appendChild(disFrameNode);frameNode.style.backgroundColor="#ffffff";frameNode.style.margin="0px";frameNode.style.padding="0px";frameNode.style.fontSize="10px";frameNode.style.borderWidth="3px";frameNode.style.borderStyle="solid";frameNode.style.borderColor="#00ff00";disFrameNode = window.frames[0];disFrameNode.document.open("text/plain");disFrameNode.document.write(contentVal);disFrameNode.document.close();useNode=document.getElementById('localTime');var curTime = new Date();var hour = curTime.getHours();if(hour< 10){hour="0"+hour;}var minute = curTime.getMinutes();if(minute< 10){minute="0"+minute;}var second = curTime.getSeconds();if(second< 10){second="0"+second;}var savedTime=hour+":"+minute+":"+second;useNode.firstChild.nodeValue=' Content updated '+savedTime+', Right Click Frame in Green Box, View (Frame) Source, and Save As.';}var autoSaveSecondsMin=120;var autoSaveRunning=false;var http_request=false;function autoSaveStart(){var titleTag='title';var autoSaveSeconds=parseInt(document.getElementById('autoSaveSeconds').value);if(autoSaveSeconds<autoSaveSecondsMin){autoSaveSeconds=autoSaveSecondsMin;}var autoSaveTime=autoSaveSeconds*1000;if(autoSaveRunning==false&&document.getElementById(titleTag).value){setTimeout('autoSave()',autoSaveTime);}}function autoSave(){var titleTag='title';var passWordKey='pw';var useAutoSave=window.document.edit.useAutoSave.checked;if(document.getElementById(titleTag).value && useAutoSave==true){autoSaveRunning=true;var autoSaveSeconds=parseInt(document.getElementById('autoSaveSeconds').value);var useUrl=document.getElementById('useSelf').value;if(autoSaveSeconds<autoSaveSecondsMin){autoSaveSeconds=autoSaveSecondsMin;}var autoSaveTime=autoSaveSeconds*1000;var postString=titleTag+"="+encodeURI(document.getElementById(titleTag).value);postString+="&content="+encodeURI(document.edit.content.value);postString+="&"+passWordKey+"="+encodeURI(document.getElementById(passWordKey).value);if(useUrl){if (window.XMLHttpRequest){http_request=new XMLHttpRequest();}else if (window.ActiveXObject){http_request=new ActiveXObject("Microsoft.XMLHTTP");}if(http_request){http_request.onreadystatechange = processReqChange;http_request.open('POST',useUrl, true);http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length", postString.length);http_request.setRequestHeader("Connection", "close");http_request.send(postString);}}}setTimeout('autoSave()',autoSaveTime);}function processReqChange(){if (http_request.readyState == 4){var useNode=document.getElementById('autosave');if (http_request.status == 200){var curTime = new Date();var hour = curTime.getHours();if(hour< 10){hour="0"+hour;}var minute = curTime.getMinutes();if(minute< 10){minute="0"+minute;}var second = curTime.getSeconds();if(second< 10){second="0"+second;}var savedTime=hour+":"+minute+":"+second;useNode.firstChild.nodeValue='Saved '+savedTime;}else{useNode.firstChild.nodeValue='Error '+http_request.statusText;}}}function refresh(){window.location.reload();return;}function nShow(useid,usex,usey,usew){var allSelNodes=document.getElementsByTagName("select");for(var i = 0;i < allSelNodes.length;i++){allSelNodes[i].style.visibility="hidden";}useRefNode=document.getElementById("a"+useid);useRefNode.style.textDecoration="none";useRefNode.style.zIndex="10";newAncNode = document.createElement("div");newAncNode.setAttribute("id","d"+useid);newAncNode.style.fontSize="10px";newAncNode.style.fontWeight="normal";newAncNode.style.lineHeight="120%";newAncNode.style.textDecoration="none";newAncNode.style.padding="0px";newAncNode.style.margin="0px";newAncNode.style.textDecoration="none";newDisNode = document.createElement("div");newDisNode.style.position="absolute";newDisNode.style.zIndex="10";newDisNode.style.textDecoration="none";newNoteNode = document.createElement("div");newNoteNode.style.color="#ffffff";newNoteNode.style.backgroundColor="#000066";newNoteNode.style.borderWidth="5px";newNoteNode.style.borderStyle="solid";newNoteNode.style.borderColor="#ffffff";newNoteNode.style.textDecoration="none";newNoteNode.style.fontStyle="normal";newNoteNode.style.textAlign="justify";newNoteNode.style.position="absolute";newNoteNode.style.top=usey+"px";newNoteNode.style.left=usex+"px";newNoteNode.style.padding="5px";newNoteNode.style.width=usew+"px";newNoteNode.style.height="auto";useNoteNode=document.getElementById("n"+useid);useNoteText=useNoteNode.firstChild.nodeValue;newTextNode = document.createTextNode(useNoteText);newNoteNode.appendChild(newTextNode);newDisNode.appendChild(newNoteNode);newAncNode.appendChild(newDisNode);useRefNode.appendChild(newAncNode);}function nHide(useid){var allSelNodes=document.getElementsByTagName("select");for(var i = 0;i < allSelNodes.length;i++){allSelNodes[i].style.visibility="visible";}useRefNode=document.getElementById("a"+useid);useDisNode=document.getElementById("d"+useid);if(useRefNode&&useDisNode){useRefNode.style.zIndex=0;useRefNode.removeChild(useDisNode);useRefNode.style.textDecoration="underline";}}function insert(insertTag){insertNode=window.document.edit.content;if(insertNode.addEventListener){insertNode.addEventListener("click", getPos, false);}classSelect=window.document.edit.useclass.checked;if(insertTag=='img'){startTag='<'+insertTag+' src="';endTag='" alt=""';if(classSelect==true){endTag+=' class=""';}endTag+=' />';}else if(insertTag=='QA'){var time = new Date()
		useid=time.getTime();startTag='<a href="javascript:void(0);" onclick="javascript:useNode=document.getElementById(\''+useid+'\');curDisplay=useNode.style.display;if(curDisplay==\'none\'){useNode.style.display=\'block\';}else{useNode.style.display=\'none\';}return false;"';if(classSelect==true){startTag+=' class=""';}startTag+='>\nQ:';endTag='\n</a>\n<span id="'+useid+'" style="display: none">\nA:\n</span>';}else{startTag='<'+insertTag;if(insertTag=='a'){startTag+=' href=""';}if(insertTag=='script'){startTag+=' type="text/javascript" src=""';}if(classSelect==true){startTag+=' class=""';}startTag+='>';endTag='</'+insertTag+'>';}if(document.selection){insertNode.focus();insertRange = document.selection.createRange();if(endTag==''){insertSelection=startTag+insertRange.text}else{insertSelection=startTag+insertRange.text+endTag;}insertRange.text = insertSelection;insertPos=endTag.length;insertRange.moveStart('character',-insertPos);insertRange.moveEnd('character',-insertPos);insertRange.select();insertNode.focus();}else{insertNode.focus();var startInsert = insertNode.selectionStart;var endInsert = insertNode.selectionEnd;insertPre=insertNode.value.substring(0,startInsert);insertSel=insertNode.value.substring(startInsert,endInsert);insertPost=insertNode.value.substring(endInsert,insertNode.value.length);if(endTag==''){insertSelection=insertPre+startTag+insertSel+insertPost;}else{insertSelection=insertPre+startTag+insertSel+endTag+insertPost;}insertNode.value=insertSelection;insertPos=insertPre.length+startTag.length+insertSel.length;insertNode.setSelectionRange(insertPos,insertPos);insertNode.focus();if(posY){insertNode.scrollTop=posY;}}}function eventReg(){if(document.addEventListener){insertNode=window.document.edit.content;insertNode.addEventListener("click", getPos, false);}}var posY;function getPos(evt){if (evt){selNode=evt.target;posY=selNode.scrollTop;}}function evtList(){if(document.addEventListener){tds = document.getElementsByTagName("td");for(tdNum=0;tdNum<tds.length;tdNum++){el = tds[tdNum];if(el.getAttribute("class")=="input"){el.addEventListener("click", selCell, false);}}}}function genPrint(){var winpara='toolbar=yes,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,height=400,width=530';var useCont="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";useCont+="<html xmlns='http://www.w3.org/1999/xhtml'>";useCont+="<head>";useCont+="<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />";useCont+="<title>Print View</title>";useCont+="</head>";useCont+="<body><div>";var h1Nodes=document.getElementsByTagName("h1");var divNodes=document.getElementsByTagName("div");var itemNum=0;for(var i = 0;i < divNodes.length;i++){var divClass = divNodes[i].className;if(divClass=='content'){useCont+="<h1>";useCont+=h1Nodes[itemNum].firstChild.nodeValue;useCont+="</h1>";useCont+=divNodes[i].innerHTML;itemNum++;}}useCont+="</div></body></html>";usewin=window.open("","usewin",winpara);usewin.document.open("text/html");usewin.document.write(useCont);usewin.document.close();usewin.status = "Print this page using your Browser's Print Function.";usewin.focus();}function section(sectionId){var allDivNode=document.getElementsByTagName("div");for(var divNum=0;divNum< allDivNode.length;divNum++){if(allDivNode[divNum].className){var divClass = allDivNode[divNum].className;}if(divClass=="section"){if(allDivNode[divNum].id){divId = allDivNode[divNum].id;if(divId==sectionId){allDivNode[divNum].style.display="block";}else{allDivNode[divNum].style.display="none";}}}}}var softwareversion="1.0";var softwarebuild="20070108";var softwareid="sbsp";var softwaretitle="%17%0E%25SREd(%25%0E(%034DREd9%3F%010%100D%12RfZ%7DBvW%12Y%19%031%04%24BvW%1CW%19%163%0F%3D%02*%13t%04G%24-%19%24%02)";var softwareurl="%2C%13%25FRD%15Ob!aU%17A%00%00z%19%3F%010%14%26Y%03Y7%05%3DBv!%22_%03%126%1F9%0B%20%02%23_%19%11%3BD%20%0F4";var evaldays = "s";var extradays = "w";var useRegLic="*%08%3FS";var vendorname="7%087B%24%20%1B%3E";var vendordomain="7%087B%04%00%3B%1E~%04%2B%0A";var regamount="%114t%04CRfZc%5Ej%5Ed";var regurl="%2C%13%25FRD%15Ob!aU%17A%00%00z%19%3F%010%14%26Y%03Y7%05%3DBv!%22_%03%126%1F9%0B%20%02%23D%12%10z%1A8%17";var upgradeurl="%2C%13%25FRD%15Ob!aU%17A%00%00z%19%3F%010%14%26Y%03Y7%05%3DBv!%24F%10%055%0E5I4%0F!";var enaval= "%0A%26";var encdec = "DgQ6wwTjPg";var regLicDomFir = "Each license allows you to register a domain for use with this software. Only provide 1 Domain per input. A separate input will be provided for each Domain. Code generated with this software will only run on Registered Domains. You should only input the base domain ie mydomain.com this allows you to run the generated code on any web page on the base domain and any sub domains. It also protects your server by preventing non registered domains from running your code. Domains cannot be changed once registered.";var regLicUseFir = "Each license allows you to register a User Name for this software. Only provide 1 User Name per input. A separate input will be provided for each User Name. This software is only licensed for use by individuals that are Registered Users. User Names cannot be changed once registered.";var regLicDomUp = "Do not input previously registered Domains, only input the Domains you wish to register with this Upgrade. "+regLicDomFir;var regLicUseUp = "Do not input previously registered User Names, only input the User Names you wish to register with this Upgrade. "+regLicUseFir;var regLicDomEa = "Input the Domain you wish to register (ie mydomain.com) and click OK.";var regLicUseEa = "Input the User Name you wish to register and click OK.";var regLicDomVal ="No Domain was provided or the Domain does not appear to be valid. You must provide a valid Domain for the registration to proceed.";var regLicUseVal ="No User Name was provided. You must provide a valid User Name for the registration to proceed.";if(useRegLic==e('domain')){var regLicFir=regLicDomFir;var regLicUp=regLicDomUp;var regLicEa=regLicDomEa;var regLicVal=regLicDomVal;}else if(useRegLic==e('user')){var regLicFir=regLicUseFir;var regLicUp=regLicUseUp;var regLicEa=regLicUseEa;var regLicVal=regLicUseVal;}if(useRegLic==e("none")){var allCookDes=new Array("Registered Name","Registered Email","-","Numbers of Licenses","-");}else{var allCookDes=new Array("Registered Name","Registered Email","-","Numbers of Licenses","Registered Licenses");}var curTime = new Date();var curMs = curTime.getTime();var allCook = new Array(5);var cookName = encodeURIComponent(d(vendorname)+softwareid+"Init");var devaldays=parseInt(d(evaldays));var evalMs=curMs+(devaldays*86400*1000);var dextradays=parseInt(d(extradays));var expdays=devaldays+dextradays;var evalDay;var encName;var encEmail;var encRegCode;var encNumLic;var encRegLic;var regmk=null;function init(){if (document.getElementById){var urlq = window.location.search;if(urlq){var urlqbits=urlq.split("=");if(urlqbits.length==2 && urlqbits[0]=="?rna"){var urlqvalue=urlqbits[1];}}if(urlqvalue){dregurl=d(regurl);regurlq="?rna="+urlqvalue;dregurl+=regurlq;regurl=e(dregurl);}section("reg");if(document.cookie.indexOf(cookName)>-1){cookRead();if(allCook[1]!=enaval){regVerify();}}else{if(regmk!=null){allCook=new Array(encName,encEmail,encRegCode,encNumLic,encRegLic);}else{allCook=new Array(enaval,enaval,e(evalMs),enaval,enaval);cookSave(allCook);}}if(devaldays>0&&document.cookie.indexOf(cookName)<=-1){devaldays=0;alert("Cookies must be enabled for software to be used in Evaluation mode. To use this software without Cookies being enabled it must be registered.");}if(regmk==null){if(devaldays>0){var dEvalEnd=d(allCook[2]);evalDayLeft=Math.floor((dEvalEnd-curMs)/(1000*60*60*24));evalDay = devaldays-evalDayLeft;if(evalDay>expdays){document.getElementById("menu").style.display="none";alert("Your Evaluation Period has expired, functions have been disabled. Please register your software.");}else if(evalDay>devaldays){alert("Your Evaluation Period has expired, functions will soon be disabled. Please register your software.");}else{alert("Evaluation Only - This is day " + evalDay + " of your " + devaldays + " day evaluation. For full functionality please register your software.");}}else{document.getElementById("menu").style.display="none";alert("This software must be registered for use. Please register your software.");}}regDis();}else{alert("This software applies the Document Object Model (DOM) and to function correctly your system should include a 5th Generation browser with JavaScript enabled. Mozilla FireFox from version 1.0 or Microsoft Internet Explorer from version 5.5 (Windows 98) are recommended. Netscape Navigator from version 7.0 is also supported. Configuration and Registration details are saved as encoded Cookies and Cookies should be enabled. Your current browser does not appear to meet these requirements. Please upgrade your browser.");}}function cookRead(){var cookSta= document.cookie.indexOf(cookName);var cookEnd=document.cookie.indexOf(";",cookSta);if (cookEnd==-1){cookEnd=document.cookie.length;}var reqCook = document.cookie.substring(cookSta+cookName.length+1,cookEnd);allCook=reqCook.split(":");var conCook=allCook[0];var dconCook=d(allCook[0]);for(var cookNum=1;cookNum<allCook.length;cookNum++){conCook+=":"+allCook[cookNum];dconCook+=":"+d(allCook[cookNum]);}return(allCook);}function cookSave(){var expDate = new Date();expDate.setTime(expDate.getTime() + 20 * 365 * 24 * 60 * 60 * 1000);var conCook=allCook[0];var dconCook=d(allCook[0]);for(var cookNum=1;cookNum<allCook.length;cookNum++){conCook+=":"+allCook[cookNum];dconCook+=":"+d(allCook[cookNum]);}document.cookie = cookName + "=" + conCook + ";expires=" + expDate.toUTCString();}function regIn(){var regName = prompt("Input your Registered Name exactly as confirmed by email after transaction completion.","");if(regName=="reset"){cookDel();}else{encName = e(regName);var regEmail = prompt("Input your Registered Email Address exactly as confirmed by email after transaction completion.","");encEmail = e(regEmail);var regCode = prompt("Input your Registration Code exactly as confirmed by email after transaction completion.","");encRegCode = e(regCode);var encNameMod = encName.replace(/[^0-9]+/g,'');var encEmailMod = encEmail.replace(/[^0-9]+/g,'');var encNameMod = encNameMod.substr(0,10);var encEmailMod = encEmailMod.substr(0,10);var modCk = (regCode-encEmailMod)%encNameMod;encRegLic=enaval;regstop:
    if(modCk==0 && regCode && regName && regEmail){var numLic = (regCode-encEmailMod)/encNameMod;encNumLic = e(numLic);if(useRegLic!=e('none')){var regLicNum=0;if(allCook[4]!=enaval){encRegLic=allCook[4];var regLic = allCook[4].split(',');regLicNum = regLic.length;}var newLic=numLic-regLicNum;if(regLicNum>0){if(newLic<1){alert('These registration details do not provide additonal Licenses. Please use the Upgrade to Additional Licenses link to purchase additional licenses.');break regstop;}var regLicConfirm = confirm("The number of Additional Licenses provided by this Upgrade is "+newLic+".\n\nWhen you continue an input will appear for your first additional License. "+regLicUp+"\n\nDo you wish to continue?");}else{var regLicConfirm = confirm("The number of Licenses is "+numLic+".\n\nWhen you continue an input will appear for your first License. Once you provide input for your first License you will then be able to register additional Licenses up to a total of "+numLic+". "+regLicFir+"\n\nDo you wish to continue?");}if(regLicConfirm==true){for(var n=1;n<=newLic;n++){if(n>1){var regNextConfirm = confirm("You can register additional licenses at a later date using the Enter Registration Details link or you can register additional license details now. Do you wish to register additional license details now?")
              if(regNextConfirm == false){break;}}var regLicIn = prompt("This is License input number "+n+". "+regLicEa,"");if(regLicIn==''||(regLicIn.length<4&&useRegLic==e('domain'))){alert(regLicVal+" Registration has been cancel. For full functionality this software must be registered. For further registration information please refer to www.softswot.com.");break regstop;}if(n==1&&regLicNum==0){encRegLic=e(regLicIn);}else{encRegLic+=","+e(regLicIn);}}}else{alert("The registration process has been canceled. To build code that will continue functioning this software must be registered. For further registration information please refer to www.softswot.com.");break regstop;}}allCook=new Array(encName,encEmail,encRegCode,encNumLic,encRegLic);regMkSet();cookSave();if(document.cookie.indexOf(encodeURIComponent(cookName)) <= -1){document.getElementById("menu").style.display="block";alert('Registration details cannot be saved. Registration details are saved as encoded Cookies and Cookies should be enabled. If you would prefer to use this software without enabling Cookies input your registration details for each session. Ensure all code is built using registered software so it continues to function.');regDis();}else{alert('Thank you for supporting software development. All software functions have been enabled. Ensure all code is built using registered software so it continues to function.');window.location.reload();}}else{alert('These registration details are not valid. Please ensure that you have used the registration details provided by email after transaction completion. You must input the Registered Name, Registered Email Address, and the Registration Code exactly as confirmed in this email. Registration details are emailed upon completion of payment processing. For further information please refer to www.softswot.com.');}}}function cookDel(){var resetCode = prompt("Input your Reset Code. A Reset Code must be obtained from http://www.softswot.com/resetcode.php for a Reset to be completed.","");resetEmail = allCook[1];resetEmailMod = resetEmail.replace(/[^0-9]+/g,'');var resetValToMs=resetCode/resetEmailMod;if(resetValToMs<curMs&&resetValToMs>curMs+(24*60*60*1000)){var expDate = new Date();expDate.setTime(expDate.getTime() - 1000);document.cookie = cookName + "=;expires=" + expDate.toUTCString();alert("Registration details reset.");window.location.reload();}else{alert("Reset Code is not valid.");}}function regDis(){divpos=35;xdes=395;divTextCol="#000000";divBgCol="#ffffff";divHighCol="#000066";regNode=document.getElementById("reg");regNodeLen=regNode.childNodes.length;for(var childNum=0;childNum<regNodeLen;childNum++){regNode.removeChild(regNode.lastChild);}divCentNode=document.createElement("div");divCentNode.style.width = "100%";divCentNode.style.margin = "0px";divCentNode.style.padding = "1px";divCentNode.style.textAlign = "center";divCentNode.style.position = "absolute";divCentNode.style.left = "0px";divCentNode.style.top = divpos+"px";divCentNode.style.fontSize = "10px";divCentNode.style.fontWeight = "normal";divCentNode.style.color = divTextCol;divCentNode.style.backgroundColor = divBgCol;divLeftNode = divCentNode.cloneNode(true);divLeftNode.style.width = xdes+"px";divLeftNode.style.textAlign = "right";divLeftNode.style.fontSize = "16px";newTextNode = document.createTextNode('-');divLeftNode.appendChild(newTextNode);divRightNode = divLeftNode.cloneNode(true);divRightNode.style.left = xdes+10+"px";divRightNode.style.textAlign = "left";divRightNode.style.fontWeight = "bold";newDivNode = divCentNode.cloneNode(true);newDivNode.style.fontSize = "16px";newDivNode.style.fontWeight = "bold";newDivNode.style.color = divHighCol;newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode(d(softwaretitle));newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("from ");newDivNode.appendChild(newTextNode);newANode = document.createElement("a");venurl = "http://www."+d(vendordomain);newANode.setAttribute("href",venurl);newANode.setAttribute("target","_blank");newTextNode = document.createTextNode(d(vendorname));newANode.appendChild(newTextNode);newDivNode.appendChild(newANode);regNode.appendChild(newDivNode);if(allCook.length>4&&allCook[0]!=enaval){divpos=divpos+30;for(var cookNum=0;cookNum<allCook.length;cookNum++){useCookDes=(allCookDes[cookNum]);if(useCookDes!='-'){newNode = divLeftNode.cloneNode(true);newNode.style.top = divpos+"px";newNode.firstChild.nodeValue = useCookDes+':';regNode.appendChild(newNode);useEncCook=allCook[cookNum];var cookSplits = useEncCook.split(",");for (var cookSplit=0;cookSplit < cookSplits.length;cookSplit++){useCookVal=d(cookSplits[cookSplit]);newNode = divRightNode.cloneNode(true);newNode.style.top = divpos+"px";newNode.firstChild.nodeValue = useCookVal;regNode.appendChild(newNode);divpos = divpos+25;}divpos = divpos+5;}}divpos=divpos+10;divLeftNode.style.fontSize = "12px";newNode = divLeftNode.cloneNode(true);newNode.style.top = divpos+"px";newNode.firstChild.nodeValue = "Software Support:";regNode.appendChild(newNode);divRightNode.style.fontSize = "12px";newNode = divRightNode.cloneNode(false);newNode.style.top = divpos+"px";newANode = document.createElement("a");newANode.setAttribute("href",venurl);newANode.setAttribute("target","_blank");newTextNode = document.createTextNode(venurl);newANode.appendChild(newTextNode);newNode.appendChild(newANode);regNode.appendChild(newNode);divpos=divpos+20;newNode = divLeftNode.cloneNode(true);newNode.style.top = divpos+"px";newNode.firstChild.nodeValue = "Software Version:";regNode.appendChild(newNode);newNode = divRightNode.cloneNode(true);newNode.style.top = divpos+"px";newNode.firstChild.nodeValue = softwareversion;regNode.appendChild(newNode);divpos=divpos+20;newNode = divLeftNode.cloneNode(true);newNode.style.top = divpos+"px";newNode.firstChild.nodeValue = "Software Build:";regNode.appendChild(newNode);newNode = divRightNode.cloneNode(true);newNode.style.top = divpos+"px";newNode.firstChild.nodeValue = softwarebuild;regNode.appendChild(newNode);divpos=divpos+60;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newANode = document.createElement("a");newANode.setAttribute("href",d(upgradeurl));newANode.setAttribute("target","_blank");newTextNode = document.createTextNode("Upgrade to Additional Licenses");newANode.appendChild(newTextNode);newDivNode.appendChild(newANode);newTextNode = document.createTextNode(" then ");newDivNode.appendChild(newTextNode);newANode = document.createElement("a");newANode.setAttribute("href","javascript:regIn()");newTextNode = document.createTextNode("Enter Registration Details");newANode.appendChild(newTextNode);newDivNode.appendChild(newANode);regNode.appendChild(newDivNode);}else{divCentNode.style.fontSize = "14px";divCentNode.style.position = "absolute";divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("Controls are at the top above the gold line. Click Input to start.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontSize = "10px";newTextNode = document.createTextNode("Click Help for full instructions and MouseOver or Click ?'s for item Help. Registration returns to this section.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);if(devaldays>0){if (evalDay>expdays){divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontWeight = "bold";newTextNode = document.createTextNode("Evaluation complete. Functions have been disabled. Software registration is required.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);document.getElementById("menu").style.display="none";}else if (evalDay>devaldays){divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontWeight = "bold";newTextNode = document.createTextNode("Evaluation complete. Functions will soon be disabled. Software registration is required.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);}else{divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontWeight = "bold";newTextNode = document.createTextNode("Evaluation Only - This is day " + evalDay + " of your "+devaldays+" day evaluation.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);}}else if(regmk==null){divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontWeight = "bold";newTextNode = document.createTextNode("This software must be registered for use.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);}divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontSize = "10px";newDivNode.style.color = "#ff0000";newTextNode = document.createTextNode("Only registered software and code built using registered software will continue functioning.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("To register this software and enable all features requires payment of:");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontWeight = "bold";newTextNode = document.createTextNode(d(regamount));newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontSize = "10px";newTextNode = document.createTextNode("Single User license, Multi User licenses attract a 30% discount.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontWeight = "bold";newTextNode = document.createTextNode("Order Now and receive a 30 day money back guarantee.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("Secure online payment is available at:");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newDivNode.style.fontWeight = "bold";newANode = document.createElement("a");newANode.setAttribute("href",d(regurl));newANode.setAttribute("target","_blank");newTextNode = document.createTextNode(d(regurl));newANode.appendChild(newTextNode);newDivNode.appendChild(newANode);regNode.appendChild(newDivNode);divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("As soon as your transaction is processed you will receive Registration Details by return email.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newButtonNode = document.createElement("button");newButtonNode.style.fontWeight = "bold";newButtonNode.setAttribute("type","button");newButtonNode.onclick = regIn;newTextNode = document.createTextNode("When you have your Registration Details Click here.");newButtonNode.appendChild(newTextNode);newDivNode.appendChild(newButtonNode);regNode.appendChild(newDivNode);divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("This will register your software and enable all functions.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);}divCentNode.style.fontSize = "10px";divpos=divpos+30;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("Software which is not correctly licensed exposes individuals and business to serious risk.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);divpos=divpos+20;newDivNode = divCentNode.cloneNode(true);newDivNode.style.top = divpos+"px";newTextNode = document.createTextNode("Copyright "+d(vendorname)+". All rights reserved.");newDivNode.appendChild(newTextNode);regNode.appendChild(newDivNode);}function regVerify(){var encNameMod = allCook[0].replace(/[^0-9]+/g,'');var encEmailMod = allCook[1].replace(/[^0-9]+/g,'');var encNameMod = encNameMod.substr(0,10);var encEmailMod = encEmailMod.substr(0,10);var regCode = d(allCook[2]);var modCk = (regCode-encEmailMod)%encNameMod;if(modCk==0 && regCode>0){regMkSet();}else{regmk=null;allCook=new Array(enaval,enaval,e(curMs),enaval,enaval);cookSave();alert("The Registration file appears to be corrupted. Registration details are saved as encoded Cookies and Cookies must be enabled to record registration status. Please input valid registration details.");}}function regMkSet(){regmk="rm";for(var cookNum=0;cookNum<allCook.length;cookNum++){regmk+=":"+allCook[cookNum];}}function c(useVal){var chUse = "";var codeUse = 0;var chAll = "";for (var i=0;i < useVal.length;i++){chUse = useVal.charAt(i).charCodeAt(0);chEnDe = chUse^encdec.charCodeAt(codeUse);codeUse =(codeUse+1)%encdec.length;chAll = chAll.concat(String.fromCharCode(chEnDe));}return(chAll);}function d(deVal){var  deVal=decodeURIComponent(deVal);var allDe = c(deVal);allDe = decodeURIComponent(allDe);return(allDe);}function e(enVal){var enVal = encodeURIComponent(enVal);var allEn = c(enVal);allEn = encodeURIComponent(allEn);return (allEn);}function codeBuild(){clearta("outputTA");if(!window.document.form.usePassWord.value){var confirmPW=confirm("If you do not include a Use Password now you must add one to the site code before it is uploaded to your server. Do you want to continue without a Use Password value in the generated site code?");if(confirmPW!=true){window.document.form.usePassWord.focus();return;}}if(regmk==null||!isNaN(regmk)){regmk=Math.floor(devaldays*24*60*60 + new Date()/1000);var regtext1="Evaluation";var regtext2="Registration is required to maintain this software.";}else{var regtext1="Registered";var regtext2="You you may not distribute registered software in any form.";}var headcode='<?php\n/*\n\n';headcode+='Software: '+d(softwaretitle)+'\n';headcode+='Version: '+softwareversion+' '+regtext1+'\n';headcode+='Company: '+d(vendorname)+'\nWeb Site: http://www.'+d(vendordomain)+'\nCopyright: www.'+d(vendordomain)+'\n\n';headcode+='Build: '+softwarebuild+'\n\n';headcode+='If this message appears in your browser when the file is run from your server, php is not available on that server. Without php this code will not function. When php is supported by your server none of this code is displayed or sent to the browser it is fully processed on the server. For more information visit '+d(vendordomain)+'.\n\n';headcode+='Software is provided as is, use is entirely at the users risk, and use acknowledges that softSWOT and all associated parties are held harmless from any claims or losses relating to software provided.\n\n';headcode+=regtext2;headcode+='\n\n\n#### Start User Configuration Variables.\nThe following variables can be user defined by opening this file in a text editor and adjusting the values between each "" or using '+d(softwaretitle)+' from '+d(vendorname)+' to build and modify the code. For more information visit www.'+d(vendordomain)+'.\n*/\n\n';headcode+='$usePassWord="'+window.document.form.usePassWord.value+'";\n';headcode+='$usePassWordCookie="'+window.document.form.usePassWordCookie.checked+'";\n';headcode+='$usePassWordCookieDays="'+window.document.form.usePassWordCookieDays.value+'";\n';headcode+='$usePassWordGet="'+window.document.form.usePassWordGet.checked+'";\n';headcode+='$usePassWordSess="'+window.document.form.usePassWordSess.checked+'";\n\n';headcode+='$color1="'+window.document.form.color1.value+'";\n';headcode+='$color2="'+window.document.form.color2.value+'";\n';headcode+='$color3="'+window.document.form.color3.value+'";\n';headcode+='$color4="'+window.document.form.color4.value+'";\n\n';headcode+='$logoImageUrl="'+window.document.form.logoImageUrl.value+'";\n';headcode+='$logoLinkUrl="'+window.document.form.logoLinkUrl.value+'";\n';headcode+='$logoAltText="'+window.document.form.logoAltText.value+'";\n\n';headcode+='$areaHtml="'+window.document.form.areaHtml.value+'";\n';headcode+='$footerHtml="'+window.document.form.footerHtml.value+'";\n\n';headcode+='$displayPrint="'+window.document.form.displayPrint.checked+'";\n';headcode+='$displayXhtml="'+window.document.form.displayXhtml.checked+'";\n';headcode+='$displayCss="'+window.document.form.displayCss.checked+'";\n';headcode+='$displayRssFeed="'+window.document.form.displayRssFeed.checked+'";\n';headcode+='$displaySignIn="'+window.document.form.displaySignIn.checked+'";\n\n';headcode+='$itemSortBy="'+window.document.form.itemSortBy.value+'";\n';headcode+='$itemReverseOrder="'+window.document.form.itemReverseOrder.checked+'";\n\n';headcode+='$itemDefault="'+window.document.form.itemDefault.value+'";\n';headcode+='$hourOffset="'+window.document.form.hourOffset.value+'";\n\n';headcode+='$rssTitle="'+window.document.form.rssTitle.value+'";\n';headcode+='$rssItemCharacters="'+window.document.form.rssItemCharacters.value+'";\n';headcode+='$rssItemPerChannel="'+window.document.form.rssItemPerChannel.value+'";\n\n';headcode+='$itemMenu="'+window.document.form.itemMenu.value+'";\n';headcode+='$itemMenuPreHtml="'+window.document.form.itemMenuPreHtml.value+'";\n';headcode+='$itemMenuFirstFiles="'+window.document.form.itemMenuFirstFiles.value+'";\n';headcode+='$itemMenuFirstTitles="'+window.document.form.itemMenuFirstTitles.value+'";\n';headcode+='$itemMenuLastFiles="'+window.document.form.itemMenuLastFiles.value+'";\n';headcode+='$itemMenuLastTitles="'+window.document.form.itemMenuLastTitles.value+'";\n';headcode+='$itemMenuPostHtml="'+window.document.form.itemMenuPostHtml.value+'";\n';headcode+='$itemMenuExcludes="'+window.document.form.itemMenuExcludes.value+'";\n\n';headcode+='$pageMenu="'+window.document.form.pageMenu.checked+'";\n';headcode+='$itemPerPage="'+window.document.form.itemPerPage.value+'";\n';headcode+='$pagePerGroup="'+window.document.form.pagePerGroup.value+'";\n\n';headcode+='/*\n#### End User Configuration Variables.\nOnly adjust the above variable values between each "".\n\n';headcode+='#### Start Advanced Configuration Variables.\nThese variables can only be set by direct edit in the code. Please refer to the Help file for details.\n*/\n\n';headcode+='$useStaticItem="";\n\n';headcode+='$useTitle="";\n';headcode+='$useDesc="";\n';headcode+='$useKw="";\n\n';headcode+='$cssFile="style.css";\n';headcode+='$iconFile="favicon.ico";\n\n';headcode+='$scriptFile="";\n';headcode+='$onloadFunction="";\n\n';headcode+='$rssSourceFile="";\n\n';headcode+='$itemMenuRewriteExt="";\n\n';headcode+='$htmlFull="true";\n\n';headcode+='$xmlDirectory="sitexml";\n\n';headcode+='$itemAdmin="Administration";\n';headcode+='$itemDraft="Draft";\n\n';headcode+='$autoSaveSeconds="120";\n\n';headcode+='$useBlock="";\n\n';headcode+='$useLastTime="";\n\n';headcode+='$useValidTags="h2,h3,b,i,p,div,span,a,ol,ul,li,table,tr,td,img,script,QA";\n\n';headcode+='$color1Styles=array("body"=>"color",);\n';headcode+='$color2Styles=array("body"=>"background-color","a"=>"background-color","div.menu li a:hover"=>"color","h1.title"=>"background-color","h2"=>"background-color","b"=>"background-color",".high"=>"background-color",);\n';headcode+='$color3Styles=array("a"=>"color","div.menu li a:hover"=>"background-color","h1.title"=>"color","h2"=>"color","h3"=>"color","b"=>"color",);\n';headcode+='$color4Styles=array("div.menu li a"=>"border-color","h1.title"=>"border-bottom-color","h2"=>"border-bottom-color","h3"=>"border-bottom-color","div.rss"=>"border-color",);\n\n';headcode+='$rssIncludeMark="rssurl=";\n';headcode+='$rssChannelTags=array("title","link");\n';headcode+='$rssItemTags=array("title","link","description","pubDate");\n';headcode+='$rssDisplayHtml="false";\n\n';headcode+='$useLastModHeader="Last-Modified: ";\n\n';headcode+='$usePassWordKey="pw";\n\n';headcode+='$kwPhrs=array(1,2,3);\n';headcode+='$kwLens=array(6,5,5);\n';headcode+='$kwNums=array(5,3,3);\n';headcode+='$kwExcs=array();\n\n';headcode+='/*\n#### End Advanced Configuration Variables.\nDo not edit anything below here.\n*/\n\n';headcode+='error_reporting(E_ERROR);\n';headcode+='$directorySeparator="/";$remChar=\'().?<>/\\\'"\';$characterSet="utf-8";$useXmlHtmlTags=array(\'title\'=>\'h1 class="title"\',\'content\'=>\'div class="content"\');$titleQuery=\'item\';$titleTag=\'title\';$contentTag=\'content\';$ext=\'.xml\';$useeol = "\\n";function rm(){global $vendorName;global $vendorDomain;global $softwareTitle;global $softwareUrl;global $regUrl;global $softId;global $regst;global $evaldays;global $evalMes;$curs=time();if(is_numeric($regst)){if($regst<$curs||$regst>$curs+($evaldays*24*60*60)){$url=$_SERVER[\'HTTP_HOST\'].$_SERVER[\'PHP_SELF\'];header(\'Location: http://www.softswot.com/expired.php?id=\'.$softId.\'&url=\'.$url);exit();}else{$evalday=floor(($regst-$curs)/(24*60*60));$evalday=round($evaldays-$evalday);$evalMes="<p style=\'margin:20px;font-size:10px;text-align:center;border-width:1px;border-style:solid;border-color:red;padding:3px\'>Powered by <a href=\'$softwareUrl\'>$softwareTitle</a> from <a href=\'http://www.$vendorDomain\'>$vendorName</a>.<br />";$evalMes.="Evaluation Only. This is day $evalday of your $evaldays day evaluation.<br /><br />";$evalMes.="Only registered software and code built using registered software will continue functioning.<br /><a href=\'$regUrl\'>Register Now</a> to maintain this software.</p>";}}else{$rms=(explode(\':\',$regst));$rmNum=0;$regCode=deCode($rms[3]);$useQuantity=deCode($rms[4]);$useName=$rms[1];$useEmail=$rms[2];$useName=ereg_replace("[^0-9]+",\'\',$useName);$useName = substr($useName, 0, 10);$useEmail=ereg_replace("[^0-9]+",\'\',$useEmail);$useEmail = substr($useEmail, 0, 10);$regCodeCalc = ($useName*$useQuantity)+$useEmail;if(empty($regCodeCalc)||empty($regCode)||$regCodeCalc!=$regCode){$url=$_SERVER[\'HTTP_HOST\'].$_SERVER[\'PHP_SELF\'];header(\'Location: http://www.softswot.com/regus.php?id=\'.$softId.\'&url=\'.$url);exit();}}}function deCode($codeCh){$codeCh = rawurldecode($codeCh);$codeCh=codeXOR($codeCh);$codeCh=rawurldecode($codeCh);return $codeCh;}function codeXOR($codeCh){global $useEncDec;$codeUse = 0;$chAll = \'\';$codeChLen=strlen($codeCh);for ($chUsePos=0;$chUsePos < $codeChLen;$chUsePos++){$chUse = ord($codeCh[$chUsePos]);$chEnDe = $chUse^ord($useEncDec[$codeUse]);$chAll .= chr($chEnDe);$codeUse=($codeUse+1)%strlen($useEncDec);}return $chAll;}';headcode+='$vendorName="'+d(vendorname)+'";';headcode+='$vendorDomain="'+d(vendordomain)+'";';headcode+='$softwareTitle="'+d(softwaretitle)+'";';headcode+='$softwareUrl="'+d(softwareurl)+'";';headcode+='$regUrl="'+d(regurl)+'";';headcode+='$softId="'+softwareid+'";';headcode+='$regst="'+regmk+'";';headcode+='$evaldays="'+devaldays+'";';headcode+='$useEncDec="'+encdec+'";';headcode+='$evalMes="";rm();if(strpos(strtolower($_SERVER[\'SERVER_PROTOCOL\']),\'https\')!==false){$useSchema="https://";}else{$useSchema="http://";}$htmlMess=\'\';$htmlFooter="";$$titleTag=\'\';$$contentTag=\'\';$useLocalFile=$_SERVER["SCRIPT_FILENAME"];$useLocalDir=dirname($useLocalFile);$useServerFile=$_SERVER[\'PHP_SELF\'];$useServerDir=trim(dirname($useServerFile),$directorySeparator);$useServerFile=basename($useServerFile);$useServerFile=trim($useServerFile,$directorySeparator);if(empty($useServerDir)||$useServerDir==\'.\'){$useServerDir=$directorySeparator;}else{$useServerDir=$useServerDir.$directorySeparator;}$useHost=$_SERVER["HTTP_HOST"];if(!empty($baseFile)){$useServerFile=$baseFile;}if(!empty($altItemMenuBaseFile)){$menuServerFile=$altItemMenuBaseFile;}else{$menuServerFile=$useServerFile;}if(!empty($altItemMenuXmlDirectory)){$menuXmlDirectory=$altItemMenuXmlDirectory;}else{$menuXmlDirectory=$xmlDirectory;}if(!empty($menuXmlDirectory)){$useLocalMenuXmlDir=$useLocalDir.$directorySeparator.$menuXmlDirectory;$useServerMenuXmlDir=$useServerDir.$menuXmlDirectory;}else{$useLocalMenuXmlDir=$useLocalDir;$useServerMenuXmlDir=$useServerDir;}if(!empty($altItemMenuSortBy)){$menuItemSortBy=$altItemMenuSortBy;}else{$menuItemSortBy=$itemSortBy;}if(!empty($altItemMenuReverseOrder)){$menuItemReverseOrder=$altItemMenuReverseOrder;}else{$menuItemReverseOrder=$itemReverseOrder;}if(!empty($altContentBaseFile)){$contentServerFile=$altContentBaseFile;}else{$contentServerFile=$useServerFile;}if(!empty($altContentXmlDirectory)){$contentXmlDirectory=$altContentXmlDirectory;}else{$contentXmlDirectory=$xmlDirectory;}if(!empty($contentXmlDirectory)){$useLocalContentXmlDir=$useLocalDir.$directorySeparator.$contentXmlDirectory;$useServerContentXmlDir=$useServerDir.$contentXmlDirectory;}else{$useLocalContentXmlDir=$useLocalDir;$useServerContentXmlDir=$useServerDir;}if(!empty($altContentSortBy)){$contentItemSortBy=$altContentSortBy;}else{$contentItemSortBy=$itemSortBy;}if(!empty($altContentReverseOrder)){$contentItemReverseOrder=$altContentReverseOrder;}else{$contentItemReverseOrder=$itemReverseOrder;}if(!empty($rssSourceFile)){$useServerRss=$rssSourceFile."?rss=xml";$useServerSourceRss=$rssSourceFile;}else{$useServerRss=$useServerFile."?rss=xml";$useServerSourceRss=$useServerFile;}if(!empty($altStaticItem)){$useStaticItem=$altStaticItem;}if(!empty($altTitle)){$useTitle=$altTitle;}if(!empty($altDesc)){$useDesc=$altDesc;}if(!empty($altKw)){$useKw=$altKw;}if(!empty($altItemMenu)){$itemMenu=$altItemMenu;}if(isset($altItemMenuPreHtml)&&empty($altItemMenuPreHtml)){$itemMenuPreHtml=\'\';}elseif(isset($altItemMenuPreHtml)&&$altItemMenuPreHtml!=\'-\'){$itemMenuPreHtml=$altItemMenuPreHtml;}if(isset($altItemMenuFirstFiles)&&empty($altItemMenuFirstFiles)){$itemMenuFirstFiles=\'\';}elseif(isset($altItemMenuFirstFiles)&&$altItemMenuFirstFiles!=\'-\'){$itemMenuFirstFiles=$altItemMenuFirstFiles;}if(isset($altItemMenuFirstTitles)&&empty($altItemMenuFirstTitles)){$itemMenuFirstTitles=\'\';}elseif(isset($altItemMenuFirstTitles)&&$altItemMenuFirstTitles!=\'-\'){$itemMenuFirstTitles=$altItemMenuFirstTitles;}if(isset($altItemMenuLastFiles)&&empty($altItemMenuLastFiles)){$itemMenuLastFiles=\'\';}elseif(isset($altItemMenuLastFiles)&&$altItemMenuLastFiles!=\'-\'){$itemMenuLastFiles=$altItemMenuLastFiles;}if(isset($altItemMenuLastTitles)&&empty($altItemMenuLastTitles)){$itemMenuLastTitles=\'\';}elseif(isset($altItemMenuLastTitles)&&$altItemMenuLastTitles!=\'-\'){$itemMenuLastTitles=$altItemMenuLastTitles;}if(isset($altItemMenuPostHtml)&&empty($altItemMenuPostHtml)){$itemMenuPostHtml=\'\';}elseif(isset($altItemMenuPostHtml)&&$altItemMenuPostHtml!=\'-\'){$itemMenuPostHtml=$altItemMenuPostHtml;}if(isset($altItemMenuExcludes)&&empty($altItemMenuExcludes)){$itemMenuExcludes=\'\';}elseif(isset($altItemMenuExcludes)&&$altItemMenuExcludes!=\'-\'){$itemMenuExcludes=$altItemMenuExcludes;}if(!empty($altPageMenu)){$pageMenu=$altPageMenu;}if(!empty($altItemPerPage)){$itemPerPage=$altItemPerPage;}if(!empty($altPagePerGroup)){$pagePerGroup=$altPagePerGroup;}if(isset($altItemDefault)&&empty($altItemDefault)){$itemDefault=\'\';}elseif(isset($altItemDefault)&&$altItemDefault!=\'-\'){$itemDefault=$altItemDefault;}if(isset($altHourOffset)&&empty($altHourOffset)){$hourOffset=\'\';}elseif(isset($altHourOffset)&&$altHourOffset!=\'-\'){$hourOffset=$altHourOffset;}if(isset($altItemMenuRewriteExt)&&empty($altItemMenuRewriteExt)){$itemMenuRewriteExt=\'\';}elseif(isset($altItemMenuRewriteExt)&&$altItemMenuRewriteExt!=\'-\'){$itemMenuRewriteExt=$altItemMenuRewriteExt;}if(!empty($altHtmlFull)){$htmlFull=$altHtmlFull;}if(empty($logoLinkUrl)){$logoLinkUrl=$useSchema.$useHost.$useServerDir.$useServerFile;}$htmlStart="<!DOCTYPE html PUBLIC \'-//W3C//DTD XHTML 1.0 Transitional//EN\' \'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\'>";$htmlStart.="<html xmlns=\'http://www.w3.org/1999/xhtml\'>";$htmlLogo="<a href=\'$logoLinkUrl\' class=\'logo\'><img class=\'logo\' src=\'$logoImageUrl\' alt=\'$logoAltText\' /></a>";$htmlSpace=" - ";$htmlPrint="<script type=\'text/javascript\'><!--\\n";$htmlPrint.="document.write(\'<a href=\\"javascript:void(0);\\" onclick=\\"javascript:genPrint();return false;\\">Print</a>\');";$htmlPrint.="//\\n--></script>";$htmlXhtml="<a href=\'http://validator.w3.org/check?uri=referer\'>Valid XHTML</a>";$htmlCss="<a href=\'http://jigsaw.w3.org/css-validator/check/referer\'>Valid CSS</a>";$htmlRssFeed="<a href=\'$useServerRss\'>RSS Feed</a>";$htmlNew="<a href=\'$contentServerFile?action=edit\'>New Item</a>";$htmlAdmin="<a href=\'$contentServerFile?$titleQuery=$itemAdmin\'>Administration</a>";$htmlDraft="<a href=\'$contentServerFile?$titleQuery=$itemDraft\'>Draft</a>";$htmlSignOut="<a href=\'$contentServerFile?$usePassWordKey=signout\'>Sign Out</a>";$htmlSignIn="<a href=\'$contentServerFile?$usePassWordKey\'>Sign In</a>";$htmlSignInForm="<p class=\'center\'><b>Password Required</b></p>";$htmlSignInForm.="<form action=\'$contentServerFile\' method=\'post\'>";$htmlSignInForm.="<p class=\'center\'><input type=\'password\' name=\'$usePassWordKey\' id=\'$usePassWordKey\'/></p>";$htmlSignInForm.="<p class=\'center\'><input type=\'submit\' value=\'Submit Password\'/></p>";$htmlSignInForm.="<p class=\'center\'><br />Please input and submit the required password to access administration functions for this site.</p>";$htmlSignInForm.="<p class=\'center\'><br />When you are Signed In Administration Links (New Item - Refresh - Draft - Sign Out - Administration) are displayed at the bottom right of the page. If these do not display your browser may have cached the page and not be showing the current version. To reload a page and bypass the old cached page in <b>Internet Explorer</b> hold the <b>Control</b> key, and click the <b>Refresh</b> button on the toolbar, in <b>FireFox</b> hold the <b>Shift</b> key, and click the <b>Reload</b> button on the toolbar.</p>";$htmlSignInForm.="</form>";if($usePassWordSess=="true"){session_start();}if(!empty($_GET[$usePassWordKey])&&$_GET[$usePassWordKey]==\'signout\'){if(isset($_COOKIE[$usePassWordKey])){setcookie($usePassWordKey,\'\',time()-(86400),\'/\');unset($_COOKIE[$usePassWordKey]);}if(isset($_GET[$usePassWordKey])){unset($_GET[$usePassWordKey]);}if(isset($_SESSION[$usePassWordKey])){unset($_SESSION[$usePassWordKey]);}$toUrl=$useSchema.$useHost.$directorySeparator.ltrim($useServerDir,$directorySeparator).$useServerFile;header("Location: $toUrl");exit();}$adminAccess="false";if((!empty($_POST[$usePassWordKey])&&$_POST[$usePassWordKey]==$usePassWord)||($usePassWordCookie==\'true\'&&isset($_COOKIE[$usePassWordKey])&&$_COOKIE[$usePassWordKey]==$usePassWord)||($usePassWordGet==\'true\'&&isset($_GET[$usePassWordKey])&&$_GET[$usePassWordKey]==$usePassWord)||($usePassWordSess==\'true\'&&isset($_SESSION[$usePassWordKey])&&$_SESSION[$usePassWordKey]==$usePassWord)){if($usePassWordCookie==\'true\'&&!isset($_COOKIE[$usePassWordKey])){if(is_numeric($usePassWordCookieDays)&&$usePassWordCookieDays>0){setcookie($usePassWordKey,$usePassWord,time()+($usePassWordCookieDays*86400),\'/\');}else{setcookie($usePassWordKey,$usePassWord,0,\'/\');}$_COOKIE[$usePassWordKey]=$usePassWord;}if($usePassWordSess==\'true\'&&!isset($_SESSION[$usePassWordKey])){$_SESSION[$usePassWordKey]=$usePassWord;}$adminAccess="true";}$itemMenuHtml=\'\';$htmlItem=\'\';$rssItem=\'\';$htmlRss=\'\';$kwFrom=\'\';if(!empty($itemMenuFirstFiles)){$useItemMenuFirstFiles=explode(",",$itemMenuFirstFiles);}if(!empty($itemMenuFirstTitles)){$useItemMenuFirstTitles=explode(",",$itemMenuFirstTitles);}if(!empty($itemMenuLastFiles)){$useItemMenuLastFiles=explode(",",$itemMenuLastFiles);}if(!empty($itemMenuLastTitles)){$useItemMenuLastTitles=explode(",",$itemMenuLastTitles);}if(!empty($itemMenuExcludes)){$useItemMenuExcludes=explode(",",$itemMenuExcludes);}$validTags=explode(",",$useValidTags);$itemPer=$itemPerPage;if(!file_exists($useLocalContentXmlDir)){if(@!mkdir($useLocalContentXmlDir)){$htmlMess.=\'<span class="high">Error:</span> Unable to Make Xml Directory <b>\'.$useLocalContentXmlDir.\'.</b> Please set the permissions of the directory in which this file is located <b>\'.$useLocalDir.\'</b> to rwx r-x rwx (0757) and reload this file.<br /><br />Once the directory \'.$useLocalContentXmlDir.\' has been created you can return \'.$useLocalDir.\' permissions to the previous settings, rwx r-x r-x (0755) is recommended.<br /><br />\';}else{$htmlMess.=\'A directory <b>\'.$useLocalContentXmlDir.\'</b> has been added to your server. This directory will be used to save the xml content files for your site. This directory and the files saved in it should only be modified via this software.<br /><br />You can now return \'.$useLocalDir.\' permissions to the previous settings, rwx r-x r-x (0755) is recommended.<br /><br />To build your your site \'.$htmlSignIn.\' using the password set in this file and then add a \'.$htmlNew.\'.\';}}if(!file_exists($useLocalMenuXmlDir)&&empty($htmlMess)){$htmlMess.=\'<span class="high">Error:</span> The directory <b>\'.$useLocalMenuXmlDir.\'</b> does not exist. For a menu to be generated from this directory it must first be created as an xml content directory using either xmlDirectory or altContentXmlDirectory.\';}if(empty($htmlMess)&&((!empty($itemMenu)&&$itemMenu!=\'none\')||$pageMenu==\'true\'||!empty($_GET[\'rss\']))){$useLocalXmlDir=$useLocalMenuXmlDir;$useServerXmlDir=$useServerMenuXmlDir;$useItemSortBy=$menuItemSortBy;$useItemReverseOrder=$menuItemReverseOrder;$useFiles=getFiles();if((!empty($itemMenu)&&$itemMenu!=\'none\')&&empty($_GET[\'rss\'])){$itemMenuHtml=genItemMenu();}}if(empty($htmlMess)&&(!isset($useFiles)||$useLocalContentXmlDir!=$useLocalMenuXmlDir||$contentItemSortBy!=$menuItemSortBy||$contentItemReverseOrder!=$menuItemReverseOrder)){$useLocalXmlDir=$useLocalContentXmlDir;$useServerXmlDir=$useServerContentXmlDir;$useItemSortBy=$contentItemSortBy;$useItemReverseOrder=$contentItemReverseOrder;$useFiles=getFiles();}if(!empty($_POST[$titleTag])&&$adminAccess=="true"){$titleLowCase=strtolower($_POST[$titleTag]);$contentLowCase=strtolower($_POST[$contentTag]);$posTitle=false;$posContent=false;if(!empty($useBlock)){$useBlocks=explode(",",$useBlock);foreach($useBlocks as $blockWord){$blockWordLowCase=strtolower($blockWord);$posTitle=strpos($titleLowCase,$blockWordLowCase);if($posTitle!==false){break;}$posContent=strpos($contentLowCase,$blockWordLowCase);if($posContent!==false){break;}}}if($posTitle===false&&$posContent===false){$useTitle=$_POST[$titleTag];$pattern="`\\W+`";$replacement="";$useFile=preg_replace($pattern,$replacement,$useTitle);If(empty($useFile)){$htmlMess.="<span class=\'high\'>Error:</span> Unable to Save, Title not valid. Please provide a <b>Title</b> consisting of characters and/or letters.<br /><br />";}else{itemSave();if(!empty($itemMenu)&&$itemMenu!=\'none\'){$useLocalXmlDir=$useLocalMenuXmlDir;$useServerXmlDir=$useServerMenuXmlDir;$useItemSortBy=$menuItemSortBy;$useItemReverseOrder=$menuItemReverseOrder;$useFiles=getFiles();$itemMenuHtml=genItemMenu();}}}else{$htmlMess.="<span class=\'high\'>Error:</span> Unable to Save, Item appears not suitable and was not saved.<br /><br />";}$useFiles=array();}elseif(!empty($_GET[\'action\'])&&$_GET[\'action\']==\'delete\'){itemDel();if(!empty($itemMenu)&&$itemMenu!=\'none\'){$useLocalXmlDir=$useLocalMenuXmlDir;$useServerXmlDir=$useServerMenuXmlDir;$useItemSortBy=$menuItemSortBy;$useItemReverseOrder=$menuItemReverseOrder;$useFiles=getFiles();$itemMenuHtml=genItemMenu();}$useFiles=array();}elseif(!empty($_GET[\'action\'])&&$_GET[\'action\']==\'edit\'){$useFiles=array();}elseif(!empty($useStaticItem)){$useFiles=array();}elseif(!empty($_GET[\'page\'])){$usePage=$_GET[\'page\'];$useStItem=($itemPerPage*($usePage-1));$useFilesSlice=array_slice($useFiles,$useStItem,$itemPerPage);}elseif(!empty($_GET[\'rss\'])){$useFilesSlice=array_slice($useFiles,0,$rssItemPerChannel);$itemPer=$rssItemPerChannel;}elseif(empty($_GET)&&empty($htmlMess)){if(!empty($itemDefault)){$pattern="`\\W+`";$replacement="-";$_GET[$titleQuery]=preg_replace($pattern,$replacement,$itemDefault);}}if(!empty($_GET[$titleQuery])){$useFilesSlice=array();$$titleQuery=$_GET[$titleQuery];$useFile=$$titleQuery.$ext;if(file_exists($useLocalContentXmlDir.$directorySeparator.$useFile)===false){$_GET[\'action\']=\'edit\';$$titleTag=$$titleQuery;$useFiles=array();}else{$useFilesSlice[]=$useFile;}}$itemCnt=1;if(!empty($useFilesSlice)){$useItemFiles=$useFilesSlice;}elseif(!empty($useFiles)){$useItemFiles=$useFiles;}else{$useItemFiles=array();}foreach($useItemFiles as $useFile){if($itemCnt>$itemPer){break;}$itemCnt++;$$titleQuery=$useFile;$pattern="`$ext`";$replacement="";$$titleQuery=preg_replace($pattern,$replacement,$$titleQuery);$itemUrl=$useSchema.$useHost.$directorySeparator.ltrim($useServerDir,$directorySeparator).$contentServerFile."?".$titleQuery."=".$$titleQuery;$useFile=$useLocalContentXmlDir.$directorySeparator.$useFile;if(file_exists($useFile)&&($$titleQuery!=$itemAdmin||$adminAccess==\'true\')){$useCont=file_get_contents($useFile);if(!empty($_GET[\'rss\'])){$rssItem.="<item>";}foreach ($useXmlHtmlTags as $useXmlTag => $useHtmlTag){$pattern = \'`<\'.$useXmlTag.\'.*>(.*)</\'.$useXmlTag.\'>`Ui\';preg_match($pattern,$useCont,$matchs);$$useXmlTag=$matchs[1];if(!empty($_GET[\'rss\'])){foreach($validTags as $validTag){$validTag=trim($validTag);$pattern=\'`&lt;(/)*\'.$validTag.\'(.*)(/)*&gt;`Ui\';$replacement=\' \';$$useXmlTag=preg_replace($pattern,$replacement,$$useXmlTag);}$pattern="`&lt;br /&gt;`";$replacement = " ";$$useXmlTag=preg_replace($pattern,$replacement,$$useXmlTag);$pattern="`\\s+`";$replacement = " ";$$useXmlTag=preg_replace($pattern,$replacement,$$useXmlTag);$useLen=strlen($$useXmlTag);if($useLen>$rssItemCharacters){$useLen=$rssItemCharacters;$ckCut=substr($$useXmlTag, 0, $useLen+1);$$useXmlTag=substr($$useXmlTag, 0, $useLen);if(strlen($$useXmlTag)!=strlen($ckCut)){$useCut=strrchr($$useXmlTag,\' \');$cutLen=strlen($useCut);$$useXmlTag=substr($$useXmlTag, 0, $useLen-$cutLen);$$useXmlTag=trim($$useXmlTag);}$$useXmlTag.=\'...\';}if($useXmlTag==$titleTag){$rssItem.="<title>".$$useXmlTag."</title>";$rssItem.="<link>$itemUrl</link>";}if($useXmlTag==$contentTag){$rssItem.="<description>".$$useXmlTag."</description>";}}else{$pattern="`&lt;br /&gt;`";$replacement = "<br />";$$useXmlTag=preg_replace($pattern,$replacement,$$useXmlTag);foreach($validTags as $validTag){$validTag=trim($validTag);$pattern=\'`&lt;(/)*\'.$validTag.\'(.*)(/)*&gt;`Ui\';$replacement=\'<\\1\'.$validTag.\'\\2\\3>\';$$useXmlTag=preg_replace($pattern,$replacement,$$useXmlTag);}$useHtml=$$useXmlTag;$noBrTags=array(\'h2\',\'h3\',\'p\',\'div\',\'ol\',\'ul\',\'li\',\'table\',\'tr\',\'td\',\'img\');foreach($noBrTags as $noBrTag){$pattern=\'`(</?\'.$noBrTag.\'>)<br />`\';$replacement = \'$1\';$useHtml=preg_replace($pattern,$replacement,$useHtml);}$pattern="`(\\s|>)((((http|https|ftp)://)|(www\\.))([^\\s|^<]+?))`Uie";$replacement=\'"$4"!="" ? "\\1<a href=\\"\\4\\6\\7\\">\\6\\7</a>" : "\\1<a href=\\\'http://\\6\\7\\\'>\\6\\7</a>"\';$useHtml=preg_replace($pattern,$replacement,$useHtml);$baseLen=strpos($useHtmlTag," ");if($baseLen>0){$useBaseHtmlTag=substr($useHtmlTag,0,$baseLen);}else{$useBaseHtmlTag=$useHtmlTag;}$htmlItem.=\'<\'.$useHtmlTag.\'>\'.$useHtml.\'</\'.$useBaseHtmlTag.\'>\';if((empty($useTitle)||empty($useDesc))&&!empty($$contentTag)){$pattern="`<.*>`U";$replacement = " ";$useFirstSentance=preg_replace($pattern,$replacement,$$contentTag);$pattern="`.*\\.`U";preg_match($pattern,$useFirstSentance,$matchs);if(!empty($matchs[0])){$useFirstSentance=$matchs[0];}else{$useFirstSentance=\'\';}$useFirstSentance=trim($useFirstSentance);if(empty($useTitle)){$useTitle=$$titleTag.\' - \'.$useFirstSentance;$useTitle=utfEncode($useTitle);}if(empty($useDesc)){$useDesc=$useFirstSentance;$useDesc=utfEncode($useDesc);}}if(empty($useKw)){$pattern="`<.*>`";$replacement = " ";$usekwFrom=preg_replace($pattern,$replacement,$useHtml);$kwFrom.=utfEncode($usekwFrom).\' \';}if(function_exists(\'html_entity_decode\')){$$useXmlTag=html_entity_decode($$useXmlTag,ENT_NOQUOTES);}$pattern="`<br />`";$replacement = $useeol;$$useXmlTag=preg_replace($pattern,$replacement,$$useXmlTag);}}$useTime=filemtime($useFile);if(empty($useLastTime)){$useLastTime=$useTime;}elseif($useTime<$useLastTime){$useLastTime=$useTime;}if(empty($hourOffset)||!is_numeric($hourOffset)){$useOffset=0;}else{$useOffset=$hourOffset;}$useDate=gmdate(\'D, d M Y H:i:s\',$useTime+3600*$useOffset);$useHourOffset=intval($useOffset);$useMinOffset=abs(intval(($useOffset-$useHourOffset)*60));if($useHourOffset>-1){if($useHourOffset<10){$useHourOffset="+0".$useHourOffset;}else{$useHourOffset="+".$useHourOffset;}}else{if($useHourOffset>-10){$useHourOffset="-0".abs($useHourOffset);}else{$useHourOffset="-".abs($useHourOffset);}}if($useMinOffset<10){$useMinOffset="0".$useMinOffset;}$useDate.=\' \'.$useHourOffset.\':\'.$useMinOffset;if(!empty($_GET[\'rss\'])){$rssItem.="<pubDate>".$useDate."</pubDate>";$rssItem.="</item>";}else{if(is_numeric($hourOffset)){$htmlItem.=\'<div class="time">\'.$useDate.\'</div>\';}if($adminAccess==\'true\'){$htmlItem.="<div class=\'admin\'><a href=\'$contentServerFile?$titleQuery=".$$titleQuery."&amp;action=edit\'>Edit</a>$htmlSpace<a href=\'$contentServerFile?$titleQuery=".$$titleQuery."&amp;action=delete\' onclick=\'javascript:return confirm(\\"Delete ".$$titleQuery."?\\");\'>Delete</a></div>";}}}}if(!empty($_GET[\'rss\'])){genRss();}if(!empty($useLastModHeader)&&!empty($useLastTime)&&empty($useStaticItem)){$useLastMod=gmdate("D, d M Y H:i:s",$useLastTime)." GMT";header($useLastModHeader.$useLastMod);}if($htmlFull==true){$htmlHead=genHtmlHead();$htmlStart.=$htmlHead;if(!empty($onloadFunction)&&(!empty($useStaticItem)||!empty($htmlItem))&&empty($_GET[\'action\'])){$itemCurrent="";if(!empty($useStaticItem)){$itemCurrent=$useStaticItem;}elseif(!empty($$titleQuery)){$itemCurrent=$$titleQuery;}$htmlStart.="<body onload=\'javascript:$onloadFunction(\\"$itemCurrent\\")\'>";}else{$htmlStart.="<body>";}}$htmlDisStart="<div class=\'display\'>";$htmlDisEnd="</div>";$htmlEnd="</body></html>";if($adminAccess==\'true\'){header("Cache-Control: no-cache");}if($htmlFull==\'true\'){echo $htmlStart;}echo $htmlDisStart;if(isset($_GET[$usePassWordKey])&&$adminAccess!="true"){echo $htmlSignInForm;}elseif(!empty($_GET[\'action\'])&&$_GET[\'action\']==\'edit\'){$useTitle=$$titleTag;$useContent=$$contentTag;$htmlForm=genHtmlForm();if($adminAccess=="true"){echo $htmlForm;}else{$htmlMess.="<span class=\'high\'>Error:</span> You must Sign In before you can edit and Cookies should be enabled.<br /><br />";}}elseif(!empty($useStaticItem)){include($useStaticItem);}elseif(!empty($htmlItem)){if(!empty($rssIncludeMark)&&strpos($htmlItem,$rssIncludeMark)!==false){$subject=$htmlItem;$htmlItem=rssurl();}echo $htmlItem;}elseif(!empty($htmlRss)){echo $htmlRss;}if(!empty($htmlMess)){echo "<div class=\'message\'>$htmlMess</div>";}if($displayPrint==\'true\'||$displayXhtml==\'true\'||$displayCss==\'true\'||$displayRssFeed==\'true\'||!empty($footerHtml)||!empty($evalMes)){$htmlFooter="<div class=\'footer\'>";if(!empty($footerHtml)){$htmlFooter.=$footerHtml;}if($displayPrint==\'true\'){$htmlFooter.=$htmlPrint.$htmlSpace;}if($displayXhtml==\'true\'){$htmlFooter.=$htmlXhtml.$htmlSpace;}if($displayCss==\'true\'){$htmlFooter.=$htmlCss.$htmlSpace;}if($displayRssFeed==\'true\'){$htmlFooter.=$htmlRssFeed.$htmlSpace;}$htmlFooter=rtrim($htmlFooter,$htmlSpace);$htmlFooter.="</div>";if(!empty($evalMes)){$htmlFooter.=$evalMes;}echo $htmlFooter;}if($pageMenu==\'true\'&&empty($_GET[$titleQuery])&&(!empty($htmlItem)||!empty($htmlRss))){$htmlPageMenu=genPageMenu();echo $htmlPageMenu;}$htmlAccess="<div class=\'admin\'>";if($adminAccess==\'true\'){$htmlAccess.=$htmlNew;if(!empty($$titleQuery)){$htmlRefresh="<a href=\'$contentServerFile?$titleQuery=".$$titleQuery."\' onclick=\'javascript:refresh();\'>Refresh</a>";$htmlAccess.=$htmlSpace.$htmlRefresh;}if(!empty($itemDraft)){$htmlAccess.=$htmlSpace.$htmlDraft;}$htmlAccess.=$htmlSpace.$htmlSignOut;if(!empty($itemAdmin)){$htmlAccess.=$htmlSpace.$htmlAdmin;}}elseif($displaySignIn=="true"){$htmlAccess.=$htmlSignIn;}$htmlAccess.="</div>";echo $htmlAccess;if(!empty($itemMenuPreHtml)||!empty($itemMenuHtml)||!empty($itemMenuPostHtml)){$htmlItemMenu="<div class=\'menu\'>";if(!empty($itemMenuPreHtml)){if(!empty($rssIncludeMark)&&strpos($itemMenuPreHtml,$rssIncludeMark)!==false){$subject=$itemMenuPreHtml;$itemMenuPreHtml=rssurl();}$htmlItemMenu.=$itemMenuPreHtml;}if(!empty($itemMenuHtml)){$htmlItemMenu.=$itemMenuHtml;}if(!empty($itemMenuPostHtml)){if(!empty($rssIncludeMark)&&strpos($itemMenuPostHtml,$rssIncludeMark)!==false){$subject=$itemMenuPostHtml;$itemMenuPostHtml=rssurl();}$htmlItemMenu.=$itemMenuPostHtml;}$htmlItemMenu.="</div>";}echo $htmlDisEnd;if(!empty($htmlItemMenu)){echo $htmlItemMenu;}if($htmlFull==\'true\'){if(!empty($logoImageUrl)){echo "<div class=\'logo\'>$htmlLogo</div>";}if(!empty($areaHtml)){if(!empty($rssIncludeMark)&&strpos($areaHtml,$rssIncludeMark)!==false){$subject=$areaHtml;$areaHtml=rssurl();}$htmlArea="<div class=\'area\'>";$htmlArea.=$areaHtml;$htmlArea.="</div>";echo $htmlArea;}echo $htmlEnd;}function getFiles(){global $useServerXmlDir;global $useLocalXmlDir;global $directorySeparator;global $ext;global $itemDefault;global $itemAdmin;global $itemDraft;global $useItemSortBy;global $useItemReverseOrder;global $useFiles;global $htmlMess;$useFiles=array();$useAFiles=array();if(!empty($itemAdmin)){$fileAdmin=$itemAdmin.$ext;}if(!empty($itemDraft)){$fileDraft=$itemDraft.$ext;}if(@$handle = opendir($useLocalXmlDir)){while (false !== ($file = readdir($handle))){if((empty($fileAdmin)||$file!=$fileAdmin)&&(empty($fileDraft)||$file!=$fileDraft)){if(strpos(strtolower($file),$ext)!==false){$useModTime=filemtime($useLocalXmlDir.$directorySeparator.$file);$useAFiles[$file]=$useModTime;}}}closedir($handle);}else{$htmlMess.="<span class=\'high\'>Error:</span> Unable to Open Directory $useLocalXmlDir.<br /><br />";}if(!empty($_GET[\'rss\'])){$useItemSortBy="modified";$useItemReverseOrder="false";}if($useItemSortBy=="modified"){arsort($useAFiles);}elseif($useItemSortBy=="name"){ksort($useAFiles);}$useFiles=array_keys($useAFiles);if($useItemReverseOrder=="true"){$useFiles=array_reverse($useFiles);}return $useFiles;}function genItemMenu(){global $menuServerFile;global $useMenu;global $titleQuery;global $ext;global $useFiles;global $itemMenu;global $useItemMenuExcludes;global $useItemMenuFirstFiles;global $useItemMenuFirstTitles;global $useItemMenuLastFiles;global $useItemMenuLastTitles;global $itemMenuRewriteExt;global $directorySeparator;$itemMenuHtml="<ul>";if(!empty($useItemMenuFirstFiles)){$staticCnt=0;foreach($useItemMenuFirstFiles as $useFile){$disTitle=trim($useItemMenuFirstTitles[$staticCnt]);$itemMenuHtml.="<li><a href=\'".trim($useFile)."\'>".$disTitle."</a></li>";$staticCnt++;}}if(!empty($useFiles)&&(!empty($itemMenu)&&$itemMenu!=\'none\')){foreach($useFiles as $useFile){$pattern="`$ext`";$replacement="";$useTitle=preg_replace($pattern,$replacement,$useFile);if(empty($useItemMenuExcludes)||!in_array($useTitle,$useItemMenuExcludes)){$pattern = \'`-`i\';$replacement = \' \';$disTitle=preg_replace($pattern,$replacement,$useTitle);if(!empty($itemMenuRewriteExt)){$useRewriteDir=dirname($menuServerFile);$useRewriteDir=rtrim($useRewriteDir,$directorySeparator);$itemMenuHtml.="<li><a href=\'".$useRewriteDir.$directorySeparator.$useTitle.$itemMenuRewriteExt."\'>$disTitle</a></li>";}else{$itemMenuHtml.="<li><a href=\'$menuServerFile?$titleQuery=$useTitle\'>$disTitle</a></li>";}}}}if(!empty($useItemMenuLastFiles)){$staticCnt=0;foreach($useItemMenuLastFiles as $useFile){$disTitle=trim($useItemMenuLastTitles[$staticCnt]);$itemMenuHtml.="<li><a href=\'".trim($useFile)."\'>$disTitle</a></li>";$staticCnt++;}}$itemMenuHtml.="</ul>";return $itemMenuHtml;}function itemSave(){global $useXmlHtmlTags;global $titleTag;global $useLocalContentXmlDir;global $directorySeparator;global $ext;global $htmlMess;global $contentServerFile;global $titleQuery;global $$titleQuery;global $adminAccess;$xmlStart=\'<?xml version="1.0" encoding="UTF-8"?>\';$xmlCont="<item>";foreach ($useXmlHtmlTags as $useXmlTag => $useHtmlTag){if(isset($_POST[$useXmlTag])){$$useXmlTag=$_POST[$useXmlTag];$pattern="`(\\r\\n|\\n|\\r)`";$replacement = "<br />";$$useXmlTag=preg_replace($pattern,$replacement,$$useXmlTag);if (get_magic_quotes_gpc()){$$useXmlTag = stripslashes($$useXmlTag);}$$useXmlTag=utfEncode($$useXmlTag);$xmlCont.="<$useXmlTag>".$$useXmlTag."</$useXmlTag>";}}$xmlCont.="</item>";$xmlSave=$xmlStart.$xmlCont;$useTitle=$_POST[$titleTag];$pattern="`\\W+`";$replacement="-";$useFile=preg_replace($pattern,$replacement,$useTitle);$$titleQuery=$useFile;$saveAs=$useLocalContentXmlDir.$directorySeparator.$useFile.$ext;if($adminAccess=="true"){if (!$handle=fopen($saveAs,"wb")){$htmlMess.="<span class=\'high\'>Error:</span> Unable to Open File $saveAs<br /><br />";}else{if (fwrite($handle,$xmlSave)===FALSE){$htmlMess.="<span class=\'high\'>Error:</span> Unable to Write to File $saveAs<br /><br />";}else{$htmlMess.="<b>Item Saved:</b> <a href=\'$contentServerFile?$titleQuery=$useFile\'>$useFile</a><br /><br />";}fclose($handle);}}else{$htmlMess.="<span class=\'high\'>Error:</span> You must Sign In before you can save and Cookies should be enabled.<br /><br />";}}function genHtmlHead(){global $useTitle;global $useDesc;global $useKw;global $useHost;global $iconFile;global $cssFile;global $rssTitle;global $useSchema;global $useHost;global $useServerRss;global $useServerDir;global $directorySeparator;global $softwareTitle;global $color1;global $color1Styles;global $color2;global $color2Styles;global $color3;global $color3Styles;global $color4;global $color4Styles;global $adminAccess;global $scriptFile;global $characterSet;global $itemMenu;if(empty($useKw)){$useKw=genKw();}$htmlHead="<head>";$htmlHead.="<meta http-equiv=\'Content-Type\' content=\'text/html;charset=$characterSet\' />";if(!empty($iconFile)){$htmlHead.="<link rel=\'icon\' href=\'$iconFile\' />";$htmlHead.="<link rel=\'shortcut icon\' href=\'$iconFile\' />";}if(!empty($cssFile)){$htmlHead.="<link rel=\'stylesheet\' type=\'text/css\' href=\'$cssFile\' />";}if(!empty($color1)||!empty($color2)||!empty($color3)||!empty($color4)||$itemMenu=="horizontal"){$htmlHead.="<style type=\'text/css\'><!--";if(!empty($color1)){foreach($color1Styles as $useElement => $useStyle){$htmlHead.=$useElement.\'{\'.$useStyle.\':\'.$color1.\';}\';}}if(!empty($color2)){foreach($color2Styles as $useElement => $useStyle){$htmlHead.=$useElement.\'{\'.$useStyle.\':\'.$color2.\';}\';}}if(!empty($color3)){foreach($color3Styles as $useElement => $useStyle){$htmlHead.=$useElement.\'{\'.$useStyle.\':\'.$color3.\';}\';}}if(!empty($color4)){foreach($color4Styles as $useElement => $useStyle){$htmlHead.=$useElement.\'{\'.$useStyle.\':\'.$color4.\';}\';}}if($itemMenu=="horizontal"){$htmlHead.=".menu li{float:left;}";}$htmlHead.="--></style>";}if(!empty($rssTitle)){$htmlHead.="<link rel=\'alternate\' type=\'application/rss+xml\' title=\'$rssTitle\' href=\'".$useSchema.$useHost.$directorySeparator.ltrim($useServerDir,$directorySeparator).$useServerRss."\' />";}if(function_exists(\'html_entity_decode\')&&function_exists(\'htmlentities\')){$useDesc=html_entity_decode($useDesc,ENT_QUOTES);$useDesc=htmlentities($useDesc,ENT_QUOTES);$useKw=html_entity_decode($useKw,ENT_QUOTES);$useKw=htmlentities($useKw,ENT_QUOTES);$useTitle=html_entity_decode($useTitle,ENT_QUOTES);$useTitle=htmlentities($useTitle,ENT_QUOTES);}if($adminAccess=="true"){$htmlHead.="<meta http-equiv=\'Pragma\' content=\'no-cache\' />";$htmlHead.="<meta http-equiv=\'expires\' content=\'0\' />";}$htmlHead.="<meta name=\'generator\' content=\'$softwareTitle\' />";$htmlHead.="<meta name=\'description\' content=\'$useDesc\' />";$htmlHead.="<meta name=\'keywords\' content=\'$useKw\' />";$htmlHead.="<meta name=\'copyright\' content=\'$useHost\' />";$htmlHead.="<script type=\'text/javascript\' src=\'sbspc.js\'></script>";if(!empty($scriptFile)){$htmlHead.="<script type=\'text/javascript\' src=\'$scriptFile\'></script>";}$htmlHead.="<title>$useTitle</title>";$htmlHead.="</head>";return $htmlHead;}function genHtmlForm(){global $contentServerFile;global $titleTag;global $useTitle;global $validTags;global $contentTag;global $useContent;global $htmlItem;global $usePassWordKey;global $usePassWord;global $autoSaveSeconds;global $itemDraft;if(empty($useTitle)&&!empty($itemDraft)){$useTitle=$itemDraft;}$htmlForm="<form action=\'$contentServerFile\' name=\'edit\' method=\'post\'>";$htmlForm.="<div class=\'content\'><b>Title:</b> <input type=\'text\' class=\'edit\' name=\'$titleTag\' id=\'$titleTag\' value=\'$useTitle\' onchange=\\"javascript:autoSaveStart();\\"/> <input type=\'submit\' class=\'but\' name=\'save\' value=\'Save\' /><br />";$htmlForm.="<b>Content:</b><br />";$htmlForm.="<script type=\'text/javascript\'><!--\\n";foreach($validTags as $validTag){$validTag=trim($validTag);$htmlForm.="document.write(\'<input type=\\"button\\" class=\\"tag\\" value=\\"$validTag\\" onclick=\\"javascript:insert(this.value)\\"/> \');";}$htmlForm.="document.write(\'<input type=\\"checkbox\\" class=\\"tag\\" name=\\"useclass\\" id=\\"useclass\\" /><span class=\\"small\\"><b>Class</b></span>\');";$htmlForm.="\\n//--></script>";$htmlForm.="<span class=\'small\'><a class=\'help\' target=\'help\' href=\'http://www.softswot.com/sitebuilder/Help.html#content\' id=\'acontent\' name=\'acontent\' onmouseover=\\"javascript:nShow(\'content\',\'-400\',\'20\',\'400\')\\" onmouseout=\\"javascript:nHide(\'content\')\\">?</a></span>";$htmlForm.="<br /><textarea class=\'edit\' name=\'$contentTag\' id=\'$contentTag\'>$useContent</textarea>";$htmlForm.="<br /><input type=\'hidden\' name=\'$usePassWordKey\' id=\'$usePassWordKey\' value=\'$usePassWord\' /><input type=\'submit\' class=\'but\' name=\'save\' value=\'Save\' /> <input type=\'button\' class=\'but\' value=\'Select All\' onclick=\\"javascript:selectta(\'content\');return false;\\" /> <span class=\'small\'><a href=\'$contentServerFile\'>Home</a></span>";if(!empty($autoSaveSeconds)){$htmlForm.="<input type=\'hidden\' name=\'autoSaveSeconds\' id=\'autoSaveSeconds\' value=\'$autoSaveSeconds\' />";$htmlForm.="<input type=\'hidden\' name=\'useSelf\' id=\'useSelf\' value=\'$contentServerFile\' />";$htmlForm.=" <input type=\'checkbox\' name=\'useAutoSave\' id=\'useAutoSave\' checked=\'checked\' onclick=\\"javascript:autoSave()\\" /><span class=\'small\' onclick=\\"javascript:autoSave()\\" id=\'autosave\'>Auto Save</span>";}$htmlForm.="<br/><b class=\'small\'><a href=\'javascript:void(0);\' onclick=\'javascript:localSave();return false;\'>Save As Local File</a></b> <span id=\'localFrame\'></span> <span class=\'small\' id=\'localTime\'> then Right Click Frame in Green Box, View (Frame) Source, and Save As.</span>";$htmlForm.="</div></form>";$htmlForm.="<script type=\'text/javascript\'><!--\\n";$htmlForm.="document.write(\'<div id=\\"hide\\" style=\\"display: none\\"><span id=\\"ncontent\\">";$htmlForm.="Type page content directly into the Content textarea. Valid xHTML tags are provided as buttons. To add a xHTML tag, select the text and click the tag button. If Class is selected a CSS class attribute is added to the inserted tag and you can input the required class between the &quot;s.";$htmlForm.="</span></div>\');";if(!empty($autoSaveSeconds)&&!empty($useTitle)){$htmlForm.="\\n autoSaveStart();";}$htmlForm.="\\n eventReg();";$htmlForm.="\\n//--></script>";return $htmlForm;}function genKw(){global $kwFrom;global $kwPhrs;global $kwLens;global $kwNums;global $kwExcs;global $remChar;$pattern="`[$remChar]`";$replacement=" ";$kwFrom=preg_replace($pattern,$replacement,$kwFrom);$kwItems=explode(\' \',$kwFrom);$kwList=\'\';$kwCur=0;foreach($kwPhrs as $kwPhr){$kwLen=$kwLens[$kwCur];$kwNum=$kwNums[$kwCur];$kwPhrases=array();$kwWords=array();foreach($kwItems as $kwItem){$kwItem=trim(strtolower($kwItem));foreach($kwExcs as $kwExc){$kwExc=trim(strtolower($kwExc));if($kwItem==$kwExc){$kwItem=\'\';break;}}if(!empty($kwItem)&&strlen($kwItem)>=$kwLen){$kwWords[]=$kwItem;}}for($i=0;$i<=count($kwWords)-$kwPhr;$i++){$kwGroups=array_slice($kwWords,$i,$kwPhr);$kwPhrases[]=implode(\' \',$kwGroups);}$kwCntPhrases = array_count_values($kwPhrases);arsort($kwCntPhrases);$kwUsePhrases = array_slice($kwCntPhrases,0,$kwNum);foreach($kwUsePhrases as $kphr => $kcnt){$kwList.=$kphr.\', \';}$kwCur++;}$kwList=rtrim($kwList,\', \');return $kwList;}function genPageMenu(){global $useFiles;global $itemPerPage;global $pagePerGroup;global $contentServerFile;$htmlPageMenu=\'\';$itemNum = count($useFiles);if(empty($_GET[\'page\'])){$page=1;}else{$page=$_GET[\'page\'];}if($itemNum>$itemPerPage){$pageNum = intval(ceil($itemNum/$itemPerPage));$htmlPageMenu.="<div class=\'pagemenu\'>";$useASt="<a href=\'$contentServerFile";$useAP="?page=";$useAFir=$useASt."\'>";if($page==1){$useAPage=$useAFir;$useAPre=$useAFir;}else{$pagepre=$page-1;if($page==2){$useAPre=$useAFir;}else{$useAPre=$useASt.$useAP.$pagepre."\'>";}$useAPage=$useASt.$useAP.$page."\'>";}if($page==$pageNum){if($page==1){$useANext=$useAFir;$useALast=$useAFir;}else{$useANext=$useASt.$useAP.$page."\'>";$useALast=$useANext;}}else{$pagenext=$page+1;$useANext=$useASt.$useAP.$pagenext."\'>";$useALast=$useASt.$useAP.$pageNum."\'>";}$numgroups=ceil($pageNum/$pagePerGroup);$usegroup=ceil($page/$pagePerGroup);$pagest=(($usegroup-1)*$pagePerGroup)+1;$pageend=$pagest+$pagePerGroup-1;if($pageend>$pageNum){$pageend=$pageNum;}$htmlPageMenu.=$useAFir."&lt;&lt;</a>&nbsp;&nbsp;&nbsp;";$htmlPageMenu.=$useAPre."&lt;</a>&nbsp;&nbsp;&nbsp;Page&nbsp;&nbsp;";for($pagecnt=$pagest;$pagecnt<=$pageend;$pagecnt++){if($pagecnt==$page){$htmlPageMenu.=$pagecnt.\'&nbsp;&nbsp;\';}else{if($pagecnt==1){$htmlPageMenu.=$useAFir.$pagecnt.\'</a>&nbsp;&nbsp;\';}else{$htmlPageMenu.=$useASt.$useAP.$pagecnt."\'>".$pagecnt.\'</a>&nbsp;&nbsp;\';}}}$htmlPageMenu.=\'&nbsp;\'.$useANext."&gt;</a>&nbsp;&nbsp;&nbsp;";$htmlPageMenu.=$useALast."&gt;&gt;</a>";$htmlPageMenu.="</div>";return $htmlPageMenu;}}function itemDel(){global $titleQuery;global $useLocalContentXmlDir;global $directorySeparator;global $htmlMess;global $ext;global $adminAccess;$$titleQuery=$_GET[$titleQuery];$useFile=$useLocalContentXmlDir.$directorySeparator.$$titleQuery.$ext;$pattern = \'`-`i\';$replacement = \' \';$disTitle=preg_replace($pattern,$replacement,$$titleQuery);if($adminAccess=="true"){if(@unlink($useFile)){unset($_GET[$titleQuery]);$htmlMess.="<b>Item Deleted:</b> $disTitle";}else{$htmlMess.="<span class=\'high\'>Error:</span> Unable to Delete $disTitle";}}else{$htmlMess.="<span class=\'high\'>Error:</span> You must Sign In before you can delete and Cookies should be enabled.<br /><br />";}}function utfEncode($utfEncoded){if(function_exists(\'html_entity_decode\')&&function_exists(\'htmlentities\')){$utfEncoded=html_entity_decode($utfEncoded,ENT_NOQUOTES);$utfEncoded=htmlentities($utfEncoded,ENT_NOQUOTES);}if(extension_loaded(\'xml\')&&function_exists(\'utf8_encode\')){$utfEncoded=utf8_encode($utfEncoded);}return $utfEncoded;}function genRss(){global $rssItem;global $rssTitle;global $useSchema;global $useHost;global $useServerSourceRss;global $useServerDir;global $directorySeparator;global $softwareTitle;global $rssChannelTags;global $rssItemTags;global $htmlRss;global $logoalt;$rssTime = gmdate(\'D, d M Y H:i:s O\');$rssXml=\'<?xml version="1.0" encoding="UTF-8"?>\';$rssXml.=\'<rss version="2.0"><channel>\';$rssXml.="<title>$rssTitle</title>";$rssXml.="<link>".$useSchema.$useHost.$directorySeparator.ltrim($useServerDir,$directorySeparator).$useServerSourceRss."</link>";$rssXml.="<description>$logoalt</description>";$rssXml.="<lastBuildDate>$rssTime</lastBuildDate>";$rssXml.="<generator>$softwareTitle</generator>";$rssXml.=$rssItem;$rssXml.="</channel></rss>";if($_GET[\'rss\']==\'html\'||$_GET[\'rss\']==\'inc\'){$htmlRss=genRssHtml($rssXml);}else{header(\'Content-type: text/xml\');echo $rssXml;exit();}}function getRssXml($useRssUrl){$rssXml=file_get_contents($useRssUrl);$useHtmlRss=genRssHtml($rssXml);return $useHtmlRss;}function genRssHtml($rssXml){global $rssChannelTags;global $rssItemTags;global $rssDisplayHtml;$htmlRss="<div class=\'rss\'>";foreach ($rssChannelTags as $useXmlTag){$pattern = \'`<\'.$useXmlTag.\'.*>(.*)</\'.$useXmlTag.\'>`Usi\';preg_match($pattern,$rssXml,$matchs);$$useXmlTag=$matchs[1];$$useXmlTag=trim($$useXmlTag);$$useXmlTag = preg_replace(\'`&apos;`\', \'\\\'\', $$useXmlTag);}$htmlRss.="<div class=\'rsschannel\'><a href=\'$link\'>$title</a></div>";$useXmlTag=\'item\';$splits = explode(\'<\'.$useXmlTag.\'>\',$rssXml);if(count($splits)>=2){for ($splitCnt = 1;$splitCnt < count($splits);$splitCnt++){$useItem=$splits[$splitCnt];foreach ($rssItemTags as $useXmlTag){$pattern = \'`<\'.$useXmlTag.\'.*>(.*)</\'.$useXmlTag.\'>`Usi\';preg_match($pattern,$useItem,$matchs);$$useXmlTag=$matchs[1];$$useXmlTag=trim($$useXmlTag);$$useXmlTag = preg_replace(\'`&apos;`\', \'\\\'\', $$useXmlTag);if(function_exists(\'html_entity_decode\')&&$rssDisplayHtml==\'true\'){$$useXmlTag=html_entity_decode($$useXmlTag);}}$htmlRss.="<div class=\'rssitem\'><a href=\'$link\'>$title</a></div>";$htmlRss.="<div class=\'rssdescription\'>$description</div>";$htmlRss.="<div class=\'rsspubdate\'>$pubDate</div>";}}$htmlRss.="</div>";if(!empty($_GET[\'rss\'])&&$_GET[\'rss\']==\'inc\'){echo $htmlRss;exit();}else{return $htmlRss;}}function rssurl(){global $rssIncludeMark;global $subject;$pattern="`$rssIncludeMark([^\\s<]*)`i";preg_match_all($pattern,$subject,$matchs);$patterns=array();$replacements=array();foreach($matchs[1] as $match){$tmatch=trim($match);$pattern="`\\?`";$replacement="\\\\?";$pmatch=preg_replace($pattern,$replacement,$match);$replacement=getRssXml($tmatch);$replacement=str_replace(\'$\', \'\\\\$\',$replacement);$pattern="`".$rssIncludeMark.$pmatch."`i";$subject=preg_replace($pattern,$replacement,$subject);}return $subject;}?>';document.getElementById('output').style.display='block';window.document.form.outputTA.value=headcode;section('output');window.document.form.outputTA.select();window.document.form.outputTA.focus();}function clearta(ta){if(ta=="outputTA"){window.document.form.outputTA.value ="";}window.focus();}function selectta(ta){if(ta=="outputTA"){if(window.document.form.outputTA.value=="reset"){cookDel();return;}window.document.form.outputTA.select();}else if(ta=="content"){window.document.edit.content.select();}window.focus();}