function GetDetailsCode() { var NewCode = ""; if (document.getElementById("hideTitle").checked) {NewCode = NewCode + ".mainTitle {display:none;}\r";} if (document.getElementById("hideOBorder").checked) {NewCode = NewCode + ".customDetailsTable {border:0px;}\r";} if (document.getElementById("hideIBorder").checked) {NewCode = NewCode + ".customDetailsTable td {border:0px;}\r";} if (document.getElementById("hideInterests").checked) {NewCode = NewCode + ".interestsAndDetails {display:none;}\r.customDetailsTable {margin-top:-20px;}\r";} if (document.getElementById("sceneTitles").checked) {NewCode = NewCode + ".customDetailsTable .lightbluetext8 {font-size:13pt !important; letter-spacing:-1.5pt; line-height:6px; background-color:6699cc; display:block; text-align:left; text-transform:lowercase; white-space:nowrap;}\r";} if (document.getElementById("tbc").value.length>0 && !document.getElementById("hideTitle").checked) {NewCode = NewCode + ".mainTitle {background-color:" + document.getElementById("tbc").value + ";}\r";} if (document.getElementById("ttc").value.length>0 && !document.getElementById("hideTitle").checked) {NewCode = NewCode + ".mainTitle .whitetext12 {color:" + document.getElementById("ttc").value + ";}\r";} if (document.getElementById("sttc").value.length>0) {NewCode = NewCode + ".leftSide .lightbluetext8 {color:" + document.getElementById("sttc").value + ";}\r";} if (document.getElementById("stc").value.length>0) {NewCode = NewCode + ".rightSide {color:" + document.getElementById("stc").value + ";}\r";} if (document.getElementById("lsbc").value.length>0) {NewCode = NewCode + ".leftSide {background-color:" + document.getElementById("lsbc").value + " !important;}\r";} if (document.getElementById("rsbc").value.length>0) {NewCode = NewCode + ".rightSide {background-color:" + document.getElementById("rsbc").value + " !important;}\r";} if (document.getElementById("ssbc").value.length>0) {NewCode = NewCode + ".customDetailsTable table {background-color:" + document.getElementById("ssbc").value + ";}\r";} if (document.getElementById("scbc").value.length>0 && document.getElementById("sceneTitles").checked) {NewCode = NewCode + ".customDetailsTable .lightbluetext8 {background-color:" + document.getElementById("scbc").value + ";}\r";} return NewCode; } function SetDetailsCode(sHeader) { var NewCode = GetDetailsCode(); SetCodeToStyleSheet(NewCode); } function addSubSection() { var tbl = document.getElementById('targetTable'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var iteration = lastRow + 1; var row = tbl.insertRow(lastRow); // left cell var cellLeft = row.insertCell(0); cellLeft.onclick = function() {selectedSubSection(iteration)}; cellLeft.style.backgroundColor = "#b1d0f0"; cellLeft.style.width= "100px"; cellLeft.className = "leftSide"; cellLeft.id = "leftCell" + iteration; var span1 = document.createElement("span"); span1.className = "lightbluetext8"; span1.id = "title" + iteration; var span1_content = document.createTextNode(iteration); span1.appendChild(span1_content); cellLeft.appendChild(span1); // right cell var cellRight = row.insertCell(1); var textNode2 = document.createTextNode(iteration); cellRight.onclick = function() {selectedSubSection(iteration)}; cellRight.style.backgroundColor = "#d5e8fb"; cellRight.style.width= "175px"; cellRight.className = "rightSide"; cellRight.id = "rightCell" + iteration; cellRight.appendChild(textNode2); selectedSubSection(iteration); } function addFullSection() { var tbl = document.getElementById('targetTable'); var lastRow = tbl.rows.length; var iteration = lastRow + 1; var row = tbl.insertRow(lastRow); // right cell var cellRight = row.insertCell(0); var textNode2 = document.createTextNode(iteration); cellRight.colSpan = "2"; cellRight.onclick = function() {selectedSubSection(iteration)}; cellRight.style.backgroundColor = "#d5e8fb"; cellRight.className = "rightSide"; cellRight.id = "rightCell" + iteration; cellRight.appendChild(textNode2); selectedSubSection(iteration); } function addSection(section) { var sTitle = ""; if (section == "status") {sTitle = "Status:";} if (section == "orientation"){sTitle = "Orientation:";} if (section == "hometown") {sTitle = "Hometown:";} if (section == "religion") {sTitle = "Religion:";} if (section == "zodiac") {sTitle = "Zodiac Sign:";} if (section == "smokedrink") {sTitle = "Smoke / Drink:";} if (section == "children") {sTitle = "Children:";} if (section == "education") {sTitle = "Education:";} if (section == "income") {sTitle = "Income:";} var tbl = document.getElementById('targetTable'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var iteration = lastRow + 1; var row = tbl.insertRow(lastRow); // left cell var cellLeft = row.insertCell(0); cellLeft.onclick = function() {selectedSubSection(iteration)}; cellLeft.style.backgroundColor = "#b1d0f0"; cellLeft.style.width= "100px"; cellLeft.className = "leftSide"; cellLeft.id = "leftCell" + iteration; var span1 = document.createElement("span"); span1.className = "lightbluetext8"; span1.id = "title" + iteration; var span1_content = document.createTextNode(sTitle); span1.appendChild(span1_content); cellLeft.appendChild(span1); // right cell var cellRight = row.insertCell(1); var textNode2 = document.createTextNode(iteration); cellRight.onclick = function() {selectedSubSection(iteration)}; cellRight.style.backgroundColor = "#d5e8fb"; cellRight.style.width= "175px"; cellRight.className = "rightSide"; cellRight.id = "rightCell" + iteration; cellRight.appendChild(textNode2); selectedSubSection(iteration); } function removeSubSection(divNum) { var tbl = document.getElementById('targetTable'); var lastRow = tbl.rows.length; if (lastRow > 0) tbl.deleteRow(lastRow - 1); selectedSubSection(lastRow - 1); } function selectedSubSection(selectedRow) { var ssContent = document.getElementById("ssContent"); if (selectedRow == "MainTitle") { var targetTitle = document.getElementById("MainTitleText"); var ssTitleContent = document.getElementById("ssTitle"); ssTitleContent.value = targetTitle.innerHTML; ssContent.style.visibility = "hidden"; document.getElementById("rightLabel").style.visibility = ssContent.style.visibility; var currentSection = document.getElementById("currentSection"); currentSection.innerHTML = "Section Title"; } else { ssContent.style.visibility = "visible"; document.getElementById("rightLabel").style.visibility = ssContent.style.visibility; var targetTd2 = document.getElementById("rightCell" + selectedRow); var ssTitleContent = document.getElementById("ssContent"); ssTitleContent.value = targetTd2.innerHTML; var currentSection = document.getElementById("currentSection"); currentSection.innerHTML = selectedRow; var targetTd = document.getElementById("title" + selectedRow); var ssTitle = document.getElementById("ssTitle"); if (targetTd) { ssTitle.value = targetTd.innerHTML; ssTitle.style.visibility = "visible"; } else { ssTitle.style.visibility = "hidden"; } document.getElementById("leftLabel").style.visibility = ssTitle.style.visibility; } } function saveCurrentRow() { var rowIndex = document.getElementById("currentSection").innerHTML; if (rowIndex == "Section Title") { tt = document.getElementById("MainTitleText"); newTitle = document.getElementById("ssTitle"); newTitle = newTitle.value; tt.innerHTML = newTitle; } var row; var newTitle = document.getElementById("ssContent").value; row = document.getElementById("rightCell" + rowIndex); row.innerHTML = newTitle; row2 = document.getElementById("title" + rowIndex); if (row2) { newTitle = document.getElementById("ssTitle"); newTitle = newTitle.value; row2.innerHTML = newTitle; } } function getResult() { var sCode = ""; sCode = sCode + "\r"; sCode = sCode + "
\r"; sCode = sCode + "
"; sCode = sCode + "    " + document.getElementById("MainTitleText").innerHTML + "\r" sCode = sCode + "
"; var tt = document.getElementById("targetTable"); var r=0; for (r=1; r<=tt.rows.length; r=r+1) { srow = tt.rows[r-1] if (srow.cells[1]) { sCode = sCode + ""; } else { sCode = sCode + ""; } } document.getElementById("result").value = sCode; } function showColorPrompt(source) { colorPrompt(source); refreshPage(); } function colorPrompt(defaultValue) { ae_prompt(processInfo, 'Enter a color hex code or color name:', document.getElementById(defaultValue).value, defaultValue); } function refreshPage() { SetDetailsCode(); } function processInfo(n) // post processing routine { var resultbox= document.getElementById(ae_source); resultbox.value = n; SetDetailsCode(); } // ae_prompt function sources var ae_cb = null; var ae_source = null; function ae$(a) { return document.getElementById(a); } function ae_prompt(cb, q, a, s) { ae_cb = cb; ae_source = s; ae$('aep_t').innerHTML = 'Katamari Prompt:'; ae$('aep_prompt').innerHTML = q; ae$('aep_text').value = a; ae$('aep_ovrl').style.display = ae$('aep_ww').style.display = ''; ae$('aep_text').focus(); ae$('aep_text').select(); } function ae_clk(m) { ae$('aep_ovrl').style.display = ae$('aep_ww').style.display = 'none'; if (!m) ae_cb(null); else ae_cb(ae$('aep_text').value); } // ae_prompt function sources function get_firstchild(n) {var x=n.firstChild;while (x.nodeType!=1){x=x.nextSibling;}return x;} function SetCodeToStyleSheet(NewCode) { var ss = document.createElement("style"); ss.setAttribute('type', 'text/css'); if(ss.styleSheet){ ss.styleSheet.cssText = NewCode; } else { var cssText = document.createTextNode(NewCode); ss.appendChild(cssText); } var headRef = document.getElementsByTagName('head')[0]; if (headRef) {headRef.replaceChild(ss, get_firstchild(headRef));} else {alert('no header?');} }
\r" + document.getElementById("title" + r).innerHTML + "" + document.getElementById("rightCell" + r).innerHTML + "
" + document.getElementById("rightCell" + r).innerHTML + "