= 0)'+nl+
' return "\\r\\n"'+nl+
' else'+nl+
' if (agent.indexOf("Mac") >= 0)'+nl+
' return "\\r"'+nl+nl+
' return "\\r"'+nl+nl+'}' +nl+nl
theLink='';
if(document.editor.linkOn.checked && document.editor.menu.selectedIndex != 0) {
theLink =nl+nl+document.editor.linktype.value
}
sc = '';
en='';
sc1 = '';
ahr = '';
ahr1 = '';
e = '>'
scriptStart = '';
scriptEnd = '';
funcInf = nl+"function "+document.editor.func.value+"{"+nl+nl
endFunc = nl+"}"+nl
if(document.editor.scriptTags.checked) { scriptStart = ''+nl+nl;scriptEnd = nl + nl +'';}
if(!document.editor.newline.checked) { nlinf = "";}
if(!document.editor.newline.checked) { nlinf = "";}
if(document.editor.actTyp.value=="dw") { typ="document.write("+q+");"; funcInf=""; endFunc="";}
if(document.editor.actTyp.value=="pw") { typ='i=window.open("","_blank","'+document.editor.winatr.value+'");'+nl+'i=i.document;'+nl+'i.write('+q+');'+nl+'i.close();'+nl}
p = scriptStart+nlinf + funcInf+ document.editor.temp.value+nl+nl+
typ+ endFunc + scriptEnd + theLink
document.editor.code.value = p
if(document.editor.demo.value=="on") {executeDemo()}
}
ah = 'a href'
ahe = 'a'
v = 'value'
function updateFuncName(){
oldF = document.editor.oldFunc.value;
newF = document.editor.func.value;
oldC = document.editor.linkmid.value.split(oldF);
newC = oldC.join(newF);
document.editor.linkmid.value = newC;
oldC = document.editor.linktype.value.split(oldF);
newC = oldC.join(newF);
document.editor.linktype.value = newC;
}
function radLink()
{
func = document.editor.func.value
document.editor.linkstart.value = ''
setLink()
}
function stanLink()
{
func = document.editor.func.value
val = prompt('Enter the page description',"Click Here")
val1 = prompt('Enter the status bar description',"Click here to visit...")
o = val1.split("'")
val1 = o.join("\\'")
o = val1.split('"')
val1 = o.join('\\"')
var prompt5 = " onMouseOver="+"\"window.status='"+val1+" ';return true"+"\""
document.editor.linkstart.value = ''
document.editor.linkmid.value = "<"+ah+"="+"\""+"javascript"+"\:" +func+'"'+prompt5+">"+val+""+ahe+">"
document.editor.linkend.value = '';
setLink()
}
function setLink(){
link = document.editor.linkstart.value + document.editor.linkmid.value + document.editor.linkend.value
document.editor.linktype.value = link
}
function takemethere()
{
doc = document.editor.menu.selectedIndex
if (document.editor.menu.selectedIndex == 0) "";
else if (doc== 1) radLink();
else if (doc== 2) checkboxLink();
else if (doc== 3) butLink();
else if (doc== 4) stanLink();
}
function do_JSW() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertToJSWa()",10);
}
function convertToJSWa()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t='");'+nl+'document.writeln("'
document.editor.temp.value = o.join(t)
document.editor.temp.value = 'document.writeln("'+document.editor.temp.value+'");'
setTimeout("convertToJSWd()",10);
}
function convertToJSWd()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToJSWe();} else
{document.editor.code.value = ' '+nl+cv1+nl+''}
}
function convertToJSWe()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToJSWd()
}
function do_ASP() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('""')
setTimeout("convertToASPa()",10);
}
function convertToASPa()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t='" & vbCrLf'+nl+'Response.Write "'
document.editor.temp.value = o.join(t)
document.editor.temp.value = 'Response.Write "'+document.editor.temp.value+'"'
setTimeout("convertToASPb()",10);
}
function convertToASPb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split('Response.Write "" & vbCrLf')
cv1 = secondLastC.join('')
document.editor.temp.value = cv1
setTimeout("convertToASPc()",10);
}
function convertToASPc()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split('Response.Write "" ')
cv1 = secondLastC.join('')
document.editor.temp.value = cv1
setTimeout("convertToASPd()",10);
}
function convertToASPd()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToASPe();} else
{document.editor.code.value = '<%'+nl+cv1+nl+'%>'}
}
function convertToASPe()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToASPd()
}
function do_PHP() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertToPHPa()",10);
}
function convertToPHPa()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t=' \\n".'+nl+' "'
document.editor.temp.value = o.join(t)
document.editor.temp.value = ' "'+document.editor.temp.value+'\\n";'
setTimeout("convertToPHPb()",10);
}
function convertToPHPb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToPHPc();} else
{document.editor.code.value = ''}
}
function convertToPHPc()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToPHPb()
}
function do_JSP() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertToJSPa()",10);
}
function convertToJSPa()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t='");'+nl+'out.println("'
document.editor.temp.value = o.join(t)
document.editor.temp.value = 'out.println("'+document.editor.temp.value+'");'
setTimeout("convertToJSPd()",10);
}
function convertToJSPd()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToJSPe();} else
{document.editor.code.value = '<%'+nl+cv1+nl+'%>'}
}
function convertToJSPe()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToJSPd()
}
function do_PERL() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertToPERLa()",10);
}
function convertToPERLa()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t=' \\n";'+nl+'print "'
document.editor.temp.value = o.join(t)
document.editor.temp.value = 'print "'+document.editor.temp.value+'\\n";'
setTimeout("convertToPERLb()",10);
}
function convertToPERLb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToPERLc();} else
{document.editor.code.value = cv1}
}
function convertToPERLc()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToPERLb()
}
function do_CPlus() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertToCplusa()",10);
}
function convertToCplusa()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t=' \\n");'+nl+' printf("'
document.editor.temp.value = o.join(t)
document.editor.temp.value = ' printf("'+document.editor.temp.value+'\\n");'
setTimeout("convertToCplusb()",10);
}
function convertToCplusb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToCplusc();} else
{document.editor.code.value = "#include "+nl+"int main()"+nl+"{"+nl+cv1+nl+" return 0;"+nl+"}";}
}
function convertToCplusc()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToCplusb()
}
function do_Ruby() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertToRubya()",10);
}
function convertToRubya()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t=' \\n"'+nl+'print "'
document.editor.temp.value = o.join(t)
document.editor.temp.value = 'print "'+document.editor.temp.value+'\\n"'
setTimeout("convertToRubyb()",10);
}
function convertToRubyb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToRubyc();} else
{document.editor.code.value = cv1}
}
function convertToRubyc()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToRubyb()
}
function do_Rebol() {
noIllegals = true;
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(noIllegals==false) {
alert("Rebol may not render script or style tags correctly \nand you may need to remove them first.")
}
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split(nl+nl)
document.editor.temp.value = m.join(nl)
setTimeout("convertToRebola()",10);
}
function convertToRebola()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t=' ]'+nl+'print ['
document.editor.temp.value = o.join(t)
document.editor.temp.value = 'print ['+document.editor.temp.value+']'
setTimeout("convertToRebolb()",10);
}
function convertToRebolb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToRebolc();} else
{
document.editor.code.value = '#!/home/youruserpath/rebol -cs'+nl+
'REBOL []'+nl+
'print "content-type: text/html^/"'+nl+cv1}
}
function convertToRebolc()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToRebolb()
}
function do_Lisp() {
noIllegals = true;
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(document.editor.code.value.indexOf("")>=0) {noIllegals=false;}
if(noIllegals==false) {
alert("Lisp will not render script or style tags \nand you will need to remove them.")
}
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertToLispa()",10);
}
function convertToLispa()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertToLispb();} else
{document.editor.code.value = '(html "'+cv1+'")'}
}
function convertToLispb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertToLispa()
}
function do_lotusScript() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('\\"')
setTimeout("convertTolotusScripta()",10);
}
function convertTolotusScripta()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t=' "'+nl+'Print "'
document.editor.temp.value = o.join(t)
document.editor.temp.value = 'Print "'+document.editor.temp.value+'"'
setTimeout("convertTolotusScriptb()",10);
}
function convertTolotusScriptb()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
if(document.editor.temp.value.indexOf(nl+nl,0)>=0) {convertTolotusScriptc();} else
{document.editor.code.value = cv1}
}
function convertTolotusScriptc()
{
var bulkval = document.editor.temp.value
secondLastC = bulkval.split(nl+nl)
cv1 = secondLastC.join(nl)
document.editor.temp.value = cv1
convertTolotusScriptb()
}
function do_VBS() {
document.editor.temp.value = document.editor.code.value
document.editor.temp1.value = document.editor.code.value
var bulk = document.editor.temp1.value
m = bulk.split('"')
document.editor.temp.value = m.join('""')
setTimeout("convertToVBSa()",10);
}
function convertToVBSa()
{
var bulkval = document.editor.temp.value
o = bulkval.split(nl)
t='" & vbCrLf &_'+nl+' "'
nxt = o.join(t)
nxt1 = nxt.split("