// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + (expires ? "; expires=" + expires : "") +
        (path ? "; path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "secure" : "");
    document.cookie = curCookie;
}

function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
    if (getCookie(name))
        document.cookie = name + "=" + ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function fixDate (date) {
    var base = new Date(0);
    var skew = base.getTime();
    if (skew > 0)
        date.setTime(date.getTime() - skew);
}

function rememberMe (f) {
    var now = new Date();
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    now = now.toGMTString();
    if (f.author != undefined)
       setCookie('mtcmtauth', f.author.value, now, '/', '', '');
    if (f.email != undefined)
       setCookie('mtcmtmail', f.email.value, now, '/', '', '');
    if (f.url != undefined)
       setCookie('mtcmthome', f.url.value, now, '/', '', '');
}

function forgetMe (f) {
    deleteCookie('mtcmtmail', '/', '');
    deleteCookie('mtcmthome', '/', '');
    deleteCookie('mtcmtauth', '/', '');
    f.email.value = '';
    f.author.value = '';
    f.url.value = '';
}

function hideDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'none';
}

function showDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'block';
}

var commenter_name;

function individualArchivesOnLoad(commenter_name) {


 // comments are allowed but not required
    if (commenter_name) {
        hideDocumentElement('name-email');
    } else {
        showDocumentElement('name-email');
    }



    if (document.comments_form) {
        if (document.comments_form.email != undefined &&
            (mtcmtmail = getCookie("mtcmtmail")))
            document.comments_form.email.value = mtcmtmail;
        if (document.comments_form.author != undefined &&
            (mtcmtauth = getCookie("mtcmtauth")))
            document.comments_form.author.value = mtcmtauth;
        if (document.comments_form.url != undefined && 
            (mtcmthome = getCookie("mtcmthome")))
            document.comments_form.url.value = mtcmthome;
        if (mtcmtauth || mtcmthome) {
            document.comments_form.bakecookie.checked = true;
        } else {
            document.comments_form.bakecookie.checked = false;
        }
    }
}

function writeTypeKeyGreeting(commenter_name, entry_id) {
    if (commenter_name) {
        document.write('<p>' + commenter_name +
          '님 sign in 하셨습니다. 코멘트를 남겨주세요. '+
          '(<a href="http://antimine.kr/mt-comments.cgi?__mode=handle_sign_in&amp;static=1&amp;logout=1&entry_id=' + entry_id + '">sign out</a>)</p>');
    } else {
        document.write('<div class="typekey-login"><!--img src="http://antimine.kr/img/typekey1.gif" -->'+
          '<a href="https://www.typekey.com/t/typekey/login?&amp;lang=ko&amp;t=ZC8PaGb79O7TEQGy36nJ&amp;v=1.1&amp;_return=http://antimine.kr/mt-comments.cgi%3f__mode=handle_sign_in%26static=1%26entry_id=' + entry_id + '"><img src="http://antimine.kr/img/typekey-sign2.gif"></a> '+
          '<!--img src="http://antimine.kr/img/typekey2.gif"--></div>');

    }

}

if ('antimine.kr' != 'antimine.kr') {
    document.write('<script src="http://antimine.kr/mt-comments.cgi?__mode=cmtr_name_js"></script>');
} else {
    commenter_name = getCookie('commenter_name');
}





// Random encryption key feature by Andrew Moulden, Site Engineering Ltd
// This code is freeware provided these four comment lines remain intact
// A wizard to generate this code is at http://www.jottings.com/obfuscator/

var __MTTBLINK__;
var __MTTBID__;
function obfuscator(coded, key, mode, path, hidden) {
	shift = coded.length;
	link = "";
	
	for(i=0;i<coded.length;i++) {
		if (key.indexOf(coded.charAt(i))==-1) {
			ltr = coded.charAt(i);link+=(ltr);
		} else {
			ltr = (key.indexOf(coded.charAt(i)) - shift + key.length) % key.length;
			link += (key.charAt(ltr));
		}
	}
	if(mode == 'hidden_input') {
		document.write('<input type="hidden" name="CCode" value="' + link + '" />');
	} else if(mode == '__MTTBLINK__') {
		__MTTBLINK__ = path + link;
		if(hidden) return;
		document.write(link);
	} else if(mode == '__MTTBID__') {
		__MTTBID__ = link;
		if(hidden) return;
		document.write(link);
	}
}


/*------------------------------------------------------------------
		Copyright (c) 2006, Lee, Joon (http://alogblog.com/)
		This code is released under a Creative Commons License.
		(http://creativecommons.org/licenses/by-nc-sa/2.5/)
------------------------------------------------------------------*/

WebSSearchy.CGIbaseURL = 'http://antimine.kr/plugins/alogblog/';      // must end with '/'
WebSSearchy.progressingImage = '<div style="margin-left:230px;"><img src="/img/webSSearchy.gif" width="70" heigth="12" alt="" /></div>';
WebSSearchy.results_DIV_ID_prefix = 'webSSearchyResult';
WebSSearchy.timeout = 15000;	// 1000 = 1 sec
WebSSearchy.timeoutMessage = 'Timeouted. Try again.';

/*----------------------------------------------------------------*/

addwebSSearchyEvent(window, 'load', webSSearchyInit);

function webSSearchyInit() {

	var i, link, id, target, first;
	first = true;
	for (i = 0; (link = document.links[i]); i++) {
		if (/webSSearchy/.exec(link.className)) {
			link.onclick = webSSearchyClick;
		}
	}
}
function webSSearchyClick(e) {

	var source;
	if(!e) e = window.event;
	if(e.target) source = e.target;
	else if (e.srcElement) source = e.srcElement;
	// *** Credit to http://www.quirksmode.org/js/events_properties.html
	if(source.nodeType==3) source = source.parentNode;

	var arr = source.className.split(' ');
	var service = arr[1];
	var target = arr[2];
	var eid = arr[3].substr(1);

	return new WebSSearchy(service, target, source.innerHTML, 1, eid).request();
}
function addwebSSearchyEvent(obj, evType, fn){

	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, true);
		return true;
	} else if (obj.attachEvent) {
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} else {
		return false;
	}
}

/*----------------------------------------------------------------*/

WebSSearchy.currentButtonID;
WebSSearchy.currentDIVid;
WebSSearchy.resultArray = new Array();
WebSSearchy.timeoutIDs = new Array();
WebSSearchy.timeoutT0s = new Array();


function WebSSearchy(service, target, targetquery, blogID, entryID) {

	this.service = service;
	this.target = target;
	this.targetquery = targetquery;
	this.blogID = blogID;
	this.entryID = entryID;
	this.outDivID = WebSSearchy.results_DIV_ID_prefix + entryID;

	WebSSearchy.currentButtonID = service + targetquery + entryID;  // to identify each links.
	WebSSearchy.currentDivID = this.outDivID;
};

WebSSearchy.prototype.request = function() {

	if(window.event) window.event.returnValue = false;

	var tmp = WebSSearchy.resultArray[WebSSearchy.currentButtonID];
	var elm = document.getElementById(this.outDivID);
	if(tmp && tmp != WebSSearchy.timeoutMessage) {
		elm.innerHTML = tmp;
		this.remove();
		return;
	}
	if(WebSSearchy.timeoutT0s[WebSSearchy.currentButtonID])	return;

 	elm.innerHTML = WebSSearchy.progressingImage;

	WebSSearchy.timeoutIDs[WebSSearchy.currentButtonID] = setTimeout("WebSSearchy.timer()", WebSSearchy.timeout);
	WebSSearchy.timeoutT0s[WebSSearchy.currentButtonID] = new Date().getTime();


	var tq = escape(this.targetquery);
	var re = /\+/g;
	tq = tq.replace(re, '%2B');
	var script = document.createElement("script");
	script.src = WebSSearchy.CGIbaseURL + 'webSSearchy-' + this.service + ".cgi?target=" + this.target + "&targetquery=" + tq + "&bid=1&eid=" + this.entryID;
	document.body.appendChild(script);

	// Firefox, Opera work, but in IE, if we removeChild scrpt, it didn't trigger JS src.
	// document.body.removeChild(script);

	return false;
};

WebSSearchy.prototype.remove = function() {

		delete this.service;
		delete this.targetquery;
		delete this.entryID;
		delete this.outDivID;
};

WebSSearchy.response = function(msg, service, targetquery, entryID) {

	var re = /&#39;/g;
	var receivedButtonID = service + targetquery.replace(re, "'") + entryID;
	var outDivID = WebSSearchy.results_DIV_ID_prefix + entryID;

	clearTimeout(WebSSearchy.timeoutIDs[receivedButtonID]);
	if(WebSSearchy.timeoutT0s[receivedButtonID] != null) {
		delete WebSSearchy.timeoutT0s[receivedButtonID];
	}

	if(receivedButtonID == WebSSearchy.currentButtonID) {
		document.getElementById(outDivID).innerHTML = msg;
	}
	WebSSearchy.resultArray[receivedButtonID] = msg;
};

WebSSearchy.timer = function() {

		var t = new Date().getTime();

		for(var btn in WebSSearchy.timeoutT0s) {
		  var tmp = WebSSearchy.timeoutT0s[btn];
			if(((t - tmp) >= WebSSearchy.timeout)) {
				if(btn == WebSSearchy.currentButtonID) {
					document.getElementById(WebSSearchy.currentDivID).innerHTML = WebSSearchy.timeoutMessage;
				}
				WebSSearchy.resultArray[btn] = WebSSearchy.timeoutMessage;
				delete WebSSearchy.timeoutT0s[btn];
			}
		}
};
/*------------- webSSearchy JS routione -------------*/


/***********************************************
* Cool DHTML tooltip script II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var offsetfromcursorX=12 //Customize x offset of tooltip
var offsetfromcursorY=12 //Customize y offset of tooltip

var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=8 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip" style="filter:alpha(opacity=80); opacity:0.8;"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" style="filter:alpha(opacity=80); opacity:0.8;" src="http://antimine.kr/img/arrow.gif">') //write out pointer image

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip




/* 사이드 메뉴 확장 */
<!--
// -------------------------------------------------------------------
// Switch Content Script- By Dynamic Drive, available at: http://www.dynamicdrive.com
// Created: Jan 5th, 2007
// Last updated: Jan 25th, 2007. Fixed defaultExpanded() feature not working when persistence is enabled (applicable only for 1st page load)
// -------------------------------------------------------------------

function switchcontent(className){
this.className=className
this.collapsePrev=false //Default: Collapse previous content each time
this.enablePersist=false //Default: Disable session only persistence
//Limit type of element to scan for on page for switch contents if 2nd function parameter is defined, for efficiency sake (ie: "div")
this.filter_content_tag=(arguments.length==2)? arguments[1].toLowerCase() : ""
}

switchcontent.prototype.setStatus=function(openHTML, closeHTML){ //PUBLIC: Set open/ closing HTML indicator. Optional
this.statusOpen=openHTML
this.statusClosed=closeHTML
}

switchcontent.prototype.setColor=function(openColor, closeColor){ //PUBLIC: Set open/ closing color of switch header. Optional
this.colorOpen=openColor
this.colorClosed=closeColor
}

switchcontent.prototype.setPersist=function(bool){ //PUBLIC: Enable/ disable persistence. Default is true.
this.enablePersist=bool
}

switchcontent.prototype.collapsePrevious=function(bool){ //PUBLIC: Enable/ disable collapse previous content. Default is false.
this.collapsePrev=bool
}


switchcontent.prototype.sweepToggle=function(setting){ //PUBLIC: Expand/ contract all contents method. (Values: "contract"|"expand")
if (typeof this.headers!="undefined" && this.headers.length>0){ //if there are switch contents defined on the page
for (var i=0; i<this.headers.length; i++){
if (setting=="expand")
this.expandcontent(this.headers[i]) //expand each content
else if (setting=="contract")
this.contractcontent(this.headers[i]) //contract each content
}
}
}


// -------------------------------------------------------------------
// PUBLIC: defaultExpanded(indices_of_contents)- Set contents that should be expanded by default when the page loads.
// Note that the persistence feature (if enabled) overrides this setting.
// Pass in the position of the contents relative to the rest of the contents ie: defaultExpanded(0,2,3) would expand the 1st, 3rd, and 4th contents by default
// -------------------------------------------------------------------

switchcontent.prototype.defaultExpanded=function(){
var expandedindices=[] //Array to hold indices (position) of content to be expanded by default
//Loop through function arguments, and store each one within array
//Two test conditions: 1) End of Arguments array, or 2) If "collapsePrev" is enabled, only the first entered index (as only 1 content can be expanded at any time)
for (var i=0; (!this.collapsePrev && i<arguments.length) || (this.collapsePrev && i==0); i++)
expandedindices[expandedindices.length]=arguments[i]
this.expandedindices=expandedindices.join(",") //convert array into a string of the format: "0,2,3" for later parsing by script
}


//PRIVATE: Sets color of switch header.

switchcontent.prototype.togglecolor=function(header, status){
if (typeof this.colorOpen!="undefined")
header.style.color=status
}


//PRIVATE: Sets status indicator HTML of switch header.

switchcontent.prototype.togglestatus=function(header, status){
if (typeof this.statusOpen!="undefined")
header.firstChild.innerHTML=status
}


//PRIVATE: Contracts a content based on its corresponding header entered

switchcontent.prototype.contractcontent=function(header){
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
innercontent.style.display="none"
this.togglestatus(header, this.statusClosed)
this.togglecolor(header, this.colorClosed)
}


//PRIVATE: Expands a content based on its corresponding header entered

switchcontent.prototype.expandcontent=function(header){
var innercontent=document.getElementById(header.id.replace("-title", ""))
innercontent.style.display="block"
this.togglestatus(header, this.statusOpen)
this.togglecolor(header, this.colorOpen)
}

// -------------------------------------------------------------------
// PRIVATE: toggledisplay(header)- Toggles between a content being expanded or contracted
// If "Collapse Previous" is enabled, contracts previous open content before expanding current
// -------------------------------------------------------------------

switchcontent.prototype.toggledisplay=function(header){
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
if (innercontent.style.display=="block")
this.contractcontent(header)
else{
this.expandcontent(header)
if (this.collapsePrev && typeof this.prevHeader!="undefined" && this.prevHeader.id!=header.id) // If "Collapse Previous" is enabled and there's a previous open content
this.contractcontent(this.prevHeader) //Contract that content first
}
if (this.collapsePrev)
this.prevHeader=header //Set current expanded content as the next "Previous Content"
}


// -------------------------------------------------------------------
// PRIVATE: collectElementbyClass()- Searches and stores all switch contents (based on shared class name) and their headers in two arrays
// Each content should carry an unique ID, and for its header, an ID equal to "CONTENTID-TITLE"
// -------------------------------------------------------------------

switchcontent.prototype.collectElementbyClass=function(classname){ //Returns an array containing DIVs with specified classname
var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
this.headers=[], this.innercontents=[]
if (this.filter_content_tag!="") //If user defined limit type of element to scan for to a certain element (ie: "div" only)
var allelements=document.getElementsByTagName(this.filter_content_tag)
else //else, scan all elements on the page!
var allelements=document.all? document.all : document.getElementsByTagName("*")
for (var i=0; i<allelements.length; i++){
if (typeof allelements[i].className=="string" && allelements[i].className.search(classnameRE)!=-1){
if (document.getElementById(allelements[i].id+"-title")!=null){ //if header exists for this inner content
this.headers[this.headers.length]=document.getElementById(allelements[i].id+"-title") //store reference to header intended for this inner content
this.innercontents[this.innercontents.length]=allelements[i] //store reference to this inner content
}
}
}
}


//PRIVATE: init()- Initializes Switch Content function (collapse contents by default unless exception is found)

switchcontent.prototype.init=function(){
var instanceOf=this
this.collectElementbyClass(this.className) //Get all headers and its corresponding content based on shared class name of contents
if (this.headers.length==0)
return //If no headers are present (no contents to switch), just exit
// Get ids of open contents below. Three possible scenerios:
// 1) Persistence is enabled AND corresponding cookie contains a non blank ("") string, indicating this isn't the first page load
// 2) Or, check to see if there are contents that should be enabled by default (even if persistence is enabled and this IS the first page load)
// 3) Or, default to no contents should be expanded on page load ("" value)
var opencontents_ids=(this.enablePersist && switchcontent.getCookie(this.className)!="")? ','+switchcontent.getCookie(this.className)+',' : (this.expandedindices)? ','+this.expandedindices+',' : ""
for (var i=0; i<this.headers.length; i++){ //BEGIN FOR LOOP (1)
if (typeof this.statusOpen!="undefined") //If open/ closing HTML indicator is enabled/ set
this.headers[i].innerHTML='<span class="status"></span>'+this.headers[i].innerHTML //Add a span element to original HTML to store indicator
if (opencontents_ids.indexOf(','+i+',')!=-1){ //(2) if index "i" exists within cookie string or default-enabled string (i=position of the content to expand)
this.expandcontent(this.headers[i]) //Expand each content per stored indices (if ""Collapse Previous" is set, only one content)
if (this.collapsePrev) //If "Collapse Previous" set
this.prevHeader=this.headers[i]  //Indicate the expanded content's corresponding header as the last clicked on header (for logic purpose)
}
else //else if no indices found in stored string
this.contractcontent(this.headers[i]) //Contract each content by default
this.headers[i].onclick=function(){instanceOf.toggledisplay(this)}
}
if (this.enablePersist)
switchcontent.dotask(window, function(){instanceOf.rememberpluscleanup()}, "unload") //Call persistence method onunload
}


// -------------------------------------------------------------------
// PRIVATE: rememberpluscleanup()- Stores the indices of content that are expanded inside session only cookie
// If "Collapse Previous" is enabled, only 1st expanded content index is stored
// -------------------------------------------------------------------

switchcontent.prototype.rememberpluscleanup=function(){ //store index of opened ULs relative to other ULs in Tree into cookie
// Define array to hold ids of open content that should be persisted
// Default to just "none" to account for the case where no contents are open when user leaves the page (and persist that):
var opencontents=new Array("none")
for (var i=0; i<this.innercontents.length; i++){
//If persistence enabled, content in question is expanded, and either "Collapse Previous" is disabled, or if enabled, this is the first expanded content
if (this.enablePersist && this.innercontents[i].style.display=="block" && (!this.collapsePrev || (this.collapsePrev && opencontents.length<2)))
opencontents[opencontents.length]=i //save the index of the opened UL (relative to the entire list of ULs) as an array element
this.headers[i].onclick=null //Cleanup code
}
if (opencontents.length>1) //If there exists open content to be persisted
opencontents.shift() //Boot the "none" value from the array, so all it contains are the ids of the open contents
if (typeof this.statusOpen!="undefined") //Cleanup code
this.statusOpen=this.statusClosed=null //Cleanup code
switchcontent.setCookie(this.className, opencontents.join(",")) //populate cookie with indices of open contents: classname=1,2,3,etc
}


// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------


switchcontent.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}

switchcontent.getCookie=function(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

switchcontent.setCookie=function(name, value){
document.cookie = name+"="+value
}
//-->

/* 코멘트 프리 뷰 */
<!--
// Dynamic Comment Preview - Kudos to Mike Industries for the inspiration!
// D.C.P. - Comment Text
function ReloadTextDiv() {
document.getElementById('TextDisplay').innerHTML = '<p>'+document.getElementById('text').value.replace(/(\r\n|\n)/g,'<br />').replace(/(<br \/>){2,}/gi,'<'+'/p><p>')+'<'+'/p>';
}
// D.C.P. - Comment Author
function ReloadNameDiv() {
document.getElementById('NameDisplay').innerHTML = document.getElementById('comments_form').author.value;
}
// End Dynamic Comment Preview


//-->




/* mt ajax search show hide */
<!--
//USED FOR ALL AJAX FUNCTIONS
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object

//-->


/* moofx_opacity */
<!--
function thumbnailfader(id) {
     	var fadeOut = new fx.Opacity(id, {duration: 1});
     	fadeOut.hide();
	 	var fadeIn = new fx.Opacity(id, {duration: 500});
		fadeIn.custom(.2,1);	
}
//-->

/* Inline Comments */
<!--
function ToggleContents(varA12){
    var1232 = ('varXYZ2' + (varA12));
    if( document.getElementById ) {
        if( document.getElementById(var1232).style.display ) {
            var current = document.getElementById(var1232).style.display;
            document.getElementById(var1232).style.display = ( "none" == current) ? "block" : "none";
        } else {
            return true;
        }
    } else {
        return true;
    }
} 
//-->


/* 트랙백 주소 클립보드 복사 */
<!--
function copy_clip(meintext){
if (window.clipboardData)
{ 

// the IE-manier
window.clipboardData.setData("Text", meintext);

// waarschijnlijk niet de beste manier om Moz/NS te detecteren;
// het is mij echter onbekend vanaf welke versie dit precies werkt:
}
else if (window.netscape)
{

// dit is belangrijk maar staat nergens duidelijk vermeld:
// you have to sign the code to enable this, or see notes below
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');

// maak een interface naar het clipboard
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
if (!clip) return;

// maak een transferable
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans) return;

// specificeer wat voor soort data we op willen halen; text in dit geval
trans.addDataFlavor('text/unicode');

// om de data uit de transferable te halen hebben we 2 nieuwe objecten nodig om het in op te slaan
var str = new Object();
var len = new Object();

var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);

var copytext=meintext;

str.data=copytext;

trans.setTransferData("text/unicode",str,copytext.length*2);

var clipid=Components.interfaces.nsIClipboard;

if (!clip) return false;

clip.setData(trans,null,clipid.kGlobalClipboard);

}
alert("트랙백 주소가 복사 됐습니다. \n\ \n\'지옥만세 bouquins'은 UTF-8로 인코딩 됐습니다. \n\ \n\ " + meintext);
return false;
}
//-->


/* 풋터 메뉴 */
<!--
//here you place the ids of every element you want.
var ids=new Array('w3c', 'copyleft', 'crefer', 'powered');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
// -->



/* window error */
<!--
function error() { 
    return true; 
} 
window.onerror=error; 
// -->


/* 웹서치 이미지 정렬*/
<!--
function setPos(img) {
	var diff = 120 - img.offsetHeight; // 110은 스타일에서 지정한 이미지 최대 높이
	if(diff > 0) {
		img.style.marginTop = Math.floor(diff/2) + 'px';
	}
}
// -->

