// JavaScript Document/*** @author Cody Swann* @version 1.0 sept, 2004*/function DOMModel(){	this.m_strClass = "DOMModel";}DOMModel.inherits(Model);DOMModel.method('makeHolder', function( /*String*/ strId, /*Boolean*/ writeNow){	this.uber('makeHolder', strId);	this.m_sModelText = '<div id="'+strId+'">blank<\/div>';	if(writeNow)	{		document.write(this.m_sModelText);	}});DOMModel.method('getHolder', function(/*String*/ strHolderId){	return document.getElementById(strHolderId);});DOMModel.method('fillHolder',function(/*String*/ strHolderId, /*String*/ strHolderContent){		var DOMrng = document.createRange();	var DOMel = document.getElementById(strHolderId);	DOMrng.setStartBefore(DOMel);		var DOMhtmlFrag = DOMrng.createContextualFragment(strHolderContent);	while (DOMel.hasChildNodes())	{		DOMel.removeChild(DOMel.lastChild);	}	DOMel.appendChild(DOMhtmlFrag);		var index = this.findHolder(strHolderId);		this.m_arrHolders[index][this.m_iCurrTextColor] = document.getElementById(strHolderId).style.fontSize = "12px";	this.m_arrHolders[index][this.m_iOrigTextColor] =  document.getElementById(strHolderId).style.color = "#000000";	this.m_arrHolders[index][this.m_iCurrBgColor] = document.getElementById(strHolderId).style.fontSize = "12px";	this.m_arrHolders[index][this.m_iOrigBgColor] = document.getElementById(strHolderId).style.backgroundColor = "#FFFFFF";	this.m_arrHolders[index][this.m_iCurrWidth] = document.getElementById(strHolderId).style.fontSize = "12px";	this.m_arrHolders[index][this.m_iOrigWidth] = document.getElementById(strHolderId).style.width = "auto";	this.m_arrHolders[index][this.m_iCurrHeight] = document.getElementById(strHolderId).style.fontSize = "12px";	this.m_arrHolders[index][this.m_iOrigHeight] = document.getElementById(strHolderId).style.height = "auto";	this.m_arrHolders[index][this.m_iCurrContent] = document.getElementById(strHolderId).style.fontSize = "12px";	this.m_arrHolders[index][this.m_iOrigContent] = strHolderContent;	this.m_arrHolders[index][this.m_iCurrFontSize] = document.getElementById(strHolderId).style.fontSize = "12px";	this.m_arrHolders[index][this.m_iOrigFontSize] = document.getElementById(strHolderId).style.fontSize = "12px"; });DOMModel.method('hideHolder', function(/*String*/ strHolderId){	var nTarget = document.getElementById(strHolderId);	nTarget.style.display = "none";});DOMModel.method('showHolder', function(/*String*/ strHolderId){	var nTarget = document.getElementById(strHolderId);	nTarget.style.display = "block";});DOMModel.method('resizeHolder', function(/*String*/strHolderId, /*mixed*/mWidth, /*mixed*/mHeight){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrWidth] = nTarget.style.width = mWidth;	this.m_arrHolders[index][this.m_iCurrHeight] = nTarget.style.height = mHeight;});DOMModel.method('callParent', function(message){		//alert(message);	//alert(this.uber);	this.uber('callParent', message);});DOMModel.method('changeBgColor', function(/*String*/ strHolderId, /*Hex*/hColor){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrBgColor] = nTarget.style.backgroundColor = hColor;});DOMModel.method('changeFontColor', function(/*String*/ strHolderId, /*Hex*/hColor){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrTextColor] = nTarget.style.color = hColor;});DOMModel.method('changeFontSize', function(/*String*/ strHolderId, /*mixed*/mSize){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrFontSize] = nTarget.style.fontSize = mSize;});DOMModel.method('resetWidth', function(/*String*/ strHolderId){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrWidth] = nTarget.style.width = this.m_arrHolders[index][this.m_iOrigWidth];});DOMModel.method('resetHeight', function(/*String*/ strHolderId){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrHeight] = nTarget.style.height = this.m_arrHolders[index][this.m_iOrigHeight];});DOMModel.method('resetTextColor', function(/*String*/ strHolderId){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrTextColor] = nTarget.style.color = this.m_arrHolders[index][this.m_iOrigTextColor];});DOMModel.method('resetFontSize', function(/*String*/ strHolderId){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrFontSize] = nTarget.style.fontSize = this.m_arrHolders[index][this.m_iOrigFontSize];});DOMModel.method('resetBgColor', function(/*String*/ strHolderId){	var index = this.findHolder(strHolderId);	var nTarget = document.getElementById(strHolderId);	this.m_arrHolders[index][this.m_iCurrBgColor] = nTarget.style.backgroundColor = this.m_arrHolders[index][this.m_iOrigBgColor];});