/**
 * A TOOL, WHICH HANDLES HTML TAGS & ELEMENTS
 * @author Timo 5.09.2005
 */
Log.domTool={
	BLOCK:"block",//eLement.style.display=CssProperty.NONE;Line 93 of linked script http://localhost/jeoneun/ftp/mutianpu/keeled/js/0filologue.js
	NONE:"none",
	s_unit:'px',
	_sUnicodeTransformerId:'toUnicode'
}
/**
 *
 */
Log.domTool.toPx=function(sValue,s_param,eVent){
	try{
		if(s_param=='fontWeight'){
			return sValue;
		}//if(s_param=
		if(!isNaN(parseInt(sValue))){
			sValue=sValue+Log.domTool.s_unit;
		}//if(!isNaN(parseInt(sValue
		return sValue;
	}catch(e_rror){Log.showExeption( e_rror, 'Log.domTool.addPx');}
	Log.eventTool.stopEvent(eVent);
}//toPx

/**
 *
 */
Log.domTool.switchValue=function(e_button, s_value1, s_value2, b_state,eVent){
	try{
		if(b_state){
			e_button.value=s_value1;
		}else{
			e_button.value=s_value2;
		}//if(b_state
	}catch(e_rror){Log.showExeption( e_rror, 'Log.domTool.switchValue');}
	Log.eventTool.stopEvent(eVent);
}//switchValue


/**
 * INSERT A HTML DOM ELEMENT BEFORE A TAG, FOUND BY ID
 * @param sInsertHTML - a HTML DOM ELEMENT to be inserted
 * @param eContainer - a container Element. We will insert sInsertHTML in it.
 * @param sContainerHTML - eContainer.innerHTML 
 * @param sId - id attribute of the first element following the insert point of sInsertHTML. May not occur more than once in sContainerHTML.
 * E.G. Log.domTool.insertHTML(divBlock, sBlock, sNodeDiv, sThirdId);
 */
Log.domTool.insertHTML=function(eContainer, sContainerHTML, sInsertHTML, sId)
{
	var iInsert=sContainerHTML.indexOf(sId);
	var sSubstring=sContainerHTML.substring(0, iInsert);
	iInsert=sSubstring.lastIndexOf("<");
	var sStart=sContainerHTML.substring(0,iInsert);
	var sEnd=sContainerHTML.substring(iInsert,sContainerHTML.length);
	eContainer.innerHTML=sStart+sInsertHTML+sEnd;
}//insertHTML

Log.domTool.setAttribute=function(a_id,s_attribute,sValue){
	var i_while=0;
	var i_wend=a_id.length;
	while(i_while<i_wend){
		eLement=document.getElementById(a_id[i_while]);
		eval("eLement."+s_attribute+"=sValue;");
		i_while=i_while+1;
	}//while
}//setAttribute

Log.domTool.redirect=function(a_id,f_unction){
	var i_while=0;
	var i_wend=a_id.length;
	while(i_while<i_wend){
		eLement=document.getElementById(a_id[i_while]);
		if(eLement!=null){
      f_unction(eLement);
    }
		i_while=i_while+1;
	}//while
}//redirect

/**
 * SET ATTRIBUTE VALUES OF CERTAIN HTML TAGS
 * @param sTagName - a HTML tag name E.G. 'table', 'img' etc.
 * @param s_attribute - a HTML attribute name E.G. 'href', 'title' etc.
 * @param sValue - the value of a HTML attribute, which will be updated
 * @param s_checkAttribute - a HTML attribute name, which will be checked before updates E.G. 'type'
 * @param s_checkValue - the value of a HTML attribute, which will be checked before updates E.G. 'text'
 * @param i_index - defines, which tag we'll start from
 * @param i_wend - defines, which tag we'll finish to
 * E.G. onclick="Log.domTool.setAttribute('input', 'value', '', 'type', 'text', null, null);
 * Log.domTool.setAttribute('input', 'checked', false, 'type', 'checkbox', null, null);"
 */
Log.domTool.setAttributes=function(sTagName, s_attribute, sValue, s_checkAttribute, s_checkValue, i_index, i_wend)
{
	/**
	 * GET A COLLECTION OF HTML ELEMENTS WITH CERTAIN TAG NAME
	 */
	var array_elements=document.getElementsByTagName(sTagName);
	/**
	 * If i_index isn't defined, we'll start from the beginning of the collection.
	 */
	if(i_index==null){
		i_index=0;
		/**
		 * If only i_index is defined & no i_wend, then  we'll update only one element of the collection.
		 */
	}else if(i_wend==null){
		i_wend=i_index+1;
	}//if(i_index==null
	/**
	 * If neither i_index nor i_wend is defined, we'll update all the elements of the collection.
	 */
	if(i_wend==null){i_wend=array_elements.length;}
	var b_checkAttribute=false;
	
	while(i_index<i_wend){
		var e_item=array_elements.item(i_index);
		if(s_checkAttribute==null||s_checkValue==null){
			b_checkAttribute=true;
		}else{
			var v_value=eval('e_item.'+s_checkAttribute+'.toLowerCase()');
			if(v_value==s_checkValue.toLowerCase()){b_checkAttribute=true;}
		}
		if(b_checkAttribute==true){eval("e_item."+s_attribute+"=sValue;");}
		b_checkAttribute=false;
		i_index=i_index+1;
	}//while(i_index<i_wend // (document._vForms[0].elements.item(0).tagName);// (document.getElementsByTagName('input').item(0).getType().toString());
}//setAttributes

/**
 * SET ATTRIBUTE VALUES OF CERTAIN HTML TAGS
 * @param sTagName - a HTML tag name E.G. 'table', 'img' etc.
 * @param s_attribute - a HTML attribute name E.G. 'href', 'title' etc.
 * @param sValue - the value of a HTML attribute, which will be updated
 * @param s_checkAttribute - an array of HTML attribute names, which will be checked before updates E.G. 'type'
 * @param s_checkValue - an array of values of HTML attributes, which will be checked before updates E.G. 'text'
 * @param i_index - defines, which tag we'll start from
 * @param i_wend - defines, which tag we'll finish to
 * E.G. onclick="Log.domTool.setAttribute('input', 'value', '', 'type', 'text', null, null);
 * Log.domTool.setAttribute('input', 'checked', false, 'type', 'checkbox', null, null);"
 */
Log.domTool.setAttributeByAttributes=function(sTagName, s_attribute, sValue, s_checkAttributes, s_checkValues, i_index, i_wend)
{
	/**
	 * GET A COLLECTION OF HTML ELEMENTS WITH CERTAIN TAG NAME
	 */
	var array_elements=document.getElementsByTagName(sTagName);
	/**
	 * If i_index isn't defined, we'll start from the beginning of the collection.
	 */
	if(i_index==null){
		i_index=0;
		/**
		 * If only i_index is defined & no i_wend, then  we'll update only one element of the collection.
		 */
	}else if(i_wend==null){
		i_wend=i_index+1;
	}//if(i_index==null
	/**
	 * If neither i_index nor i_wend is defined, we'll update all the elements of the collection.
	 */
	if(i_wend==null){i_wend=array_elements.length;}
	var b_checkAttribute,e_item, eLement;
	
	while(i_index<i_wend){
		e_item=array_elements.item(i_index);
		b_checkAttribute=true;
		if(s_checkAttributes!=null&&s_checkValues!=null){
			var i_length=s_checkAttributes.length;
			var i_array=0;
			while(i_array<i_length){
				var v_value=eval('e_item.'+s_checkAttributes[i_array]+'.toLowerCase()');
				if(v_value!=s_checkValues[i_array].toLowerCase()){b_checkAttribute=false;}
				i_array=i_array+1;
			}//while(i_array<i_length
		}//if(s_checkAttributes!=null&&s_checkValues!=null
		if(b_checkAttribute==true){eval("e_item."+s_attribute+"=sValue;");eLement=e_item;}
		i_index=i_index+1;
	}//while(i_index<i_wend // (document._vForms[0].elements.item(0).tagName);// (document.getElementsByTagName('input').item(0).getType().toString());
	return eLement;
}//setAttributes



/**
 * SET ATTRIBUTE VALUES OF CERTAIN TYPES OF HTML TAGS
 * @param sTagName - a HTML tag name E.G. 'table', 'img' etc.
 * @param s_attribute - a HTML attribute name E.G. 'href', 'title' etc.
 * @param sValue - the value of a HTML attribute, which will be updated
 * @param s_checkAttribute - a HTML attribute name, which will be checked before updates E.G. 'type'
 * @param s_checkValue - the value of a HTML attribute, which will be checked before updates E.G. 'text'
 * @param i_index - defines, which tag we'll start from
 * @param i_wend - defines, which tag we'll finish to
 */
Log.domTool.fSetTypeAttribute=function (sTagName, s_attribute, sValue, s_checkAttribute, s_checkValue, i_index, i_wend)
{
	/**
	 * GET A COLLECTION OF HTML ELEMENTS WITH CERTAIN TAG NAME
	 */
	var array_elements=document.getElementsByTagName(sTagName);
	array_elements=Log.domTool.fCleanTagArray(array_elements, s_checkAttribute, s_checkValue);
	/**
	 * If i_index isn't defined, we'll start from the beginning of the collection.
	 */
	if(i_index==null){
		i_index=0;
		/**
		 * If only i_index is defined & no i_wend, then  we'll update only one element of the collection.
		 */
	}else if(i_wend==null){
		i_wend=i_index+1;
	}//if(i_index==null
	/**
	 * If neither i_index nor i_wend is defined, we'll update all the elements of the collection.
	 */
	if(i_wend==null){i_wend=array_elements.length;}
	
	while(i_index<i_wend){
		var e_item=array_elements[i_index];
		eval("e_item."+s_attribute+"=sValue;");
		i_index=i_index+1;
	}//while(i_index<i_wend
}//fSetTypeAttribute

/**
 * SELECT HTML TAGS WITH CERTAIN ATTRIBUTE VALUES
 * @param array_elements - an array of tag elements to clean
 * @param s_checkAttribute - a HTML attribute name E.G. 'href', 'title' etc.
 * @param s_checkValue - the value of a HTML attribute, which must match
 */
Log.domTool.fCleanTagArray=function (array_elements, s_checkAttribute, s_checkValue)
{
	var array_return=new Array();
	var i_index=0;
	var i_wend=array_elements.length;
	
	while(i_index<i_wend){
		var e_item=array_elements.item(i_index);
		var v_value=eval('e_item.'+s_checkAttribute+'.toLowerCase()');
		if(v_value==s_checkValue.toLowerCase()){
			array_return[array_return.length]=e_item;
			//array_elements.item(array_return.length)=e_item;
		}//if(v_value==s_checkValue.toLowerCase()
		i_index=i_index+1;
	}//while(i_index<i_wend
	return array_return;
}//fCleanTagArray

/**
 * @param f_unction - a function to send the elements to
 * @param sTagName - a HTML tag name E.G. 'table', 'img' etc.
 */
Log.domTool.useByTag=function(e_parent, f_unction, sTagName, i_index, i_wend){
	if(e_parent==null){e_parent=document;}
	/**
	 * GET A COLLECTION OF HTML ELEMENTS WITH CERTAIN TAG NAME
	 */
	var array_elements=e_parent.getElementsByTagName(sTagName);
	/**
	 * If i_index isn't defined, we'll start from the beginning of the collection.
	 */
	if(i_index==null){
		i_index=0;
		/**
		 * If only i_index is defined & no i_wend, then  we'll search only one element of the collection.
		 */
	}else if(i_wend==null){
		i_wend=i_index+1;
	}//if(i_index==null
	/**
	 * If neither i_index nor i_wend is defined, we'll search all the elements of the collection.
	 */
	if(i_wend==null){i_wend=array_elements.length;}
	var b_checkAttribute=false;
	
	while(i_index<i_wend){
		var eLement=array_elements.item(i_index);
		f_unction(eLement);
		i_index=i_index+1;
	}//while(i_index<i_wend
}//getByTag   

/**
 * @param f_unction - a function to send the elements to
 */
Log.domTool.getAllTags=function (e_parent,f_unction){
	//Log.domTool.useByTag(e_parent,f_unction,'!--...--');// Defines a comment
	//Log.domTool.useByTag(e_parent,f_unction,'!DOCTYPE ');// Defines the document type
	Log.domTool.useByTag(e_parent,f_unction,'a');// Defines an anchor
	Log.domTool.useByTag(e_parent,f_unction,'abbr');// Defines an abbreviation
	Log.domTool.useByTag(e_parent,f_unction,'acronym');// Defines an acronym
	Log.domTool.useByTag(e_parent,f_unction,'address');// Defines an address element
	Log.domTool.useByTag(e_parent,f_unction,'applet');// Deprecated. Defines an applet
	Log.domTool.useByTag(e_parent,f_unction,'area');// Defines an area inside an image map
	Log.domTool.useByTag(e_parent,f_unction,'b');// Defines bold text
	Log.domTool.useByTag(e_parent,f_unction,'base');// Defines a base URL for all the links in a page
	Log.domTool.useByTag(e_parent,f_unction,'basefont');// Deprecated. Defines a base font
	Log.domTool.useByTag(e_parent,f_unction,'bdo');// Defines the direction of text display
	Log.domTool.useByTag(e_parent,f_unction,'big');// Defines big text
	Log.domTool.useByTag(e_parent,f_unction,'blockquote');// Defines a long quotation
	Log.domTool.useByTag(e_parent,f_unction,'body');// Defines the body element
	Log.domTool.useByTag(e_parent,f_unction,'br');// Inserts a single line break
	Log.domTool.useByTag(e_parent,f_unction,'button');// Defines a push button
	Log.domTool.useByTag(e_parent,f_unction,'caption');// Defines a table caption
	Log.domTool.useByTag(e_parent,f_unction,'center');// Deprecated. Defines centered text
	Log.domTool.useByTag(e_parent,f_unction,'cite');// Defines a citation
	Log.domTool.useByTag(e_parent,f_unction,'code');// Defines computer code text
	Log.domTool.useByTag(e_parent,f_unction,'col');// Defines attributes for table columns 
	Log.domTool.useByTag(e_parent,f_unction,'colgroup');// Defines groups of table columns
	Log.domTool.useByTag(e_parent,f_unction,'dd');// Defines a definition description
	Log.domTool.useByTag(e_parent,f_unction,'del');// Defines deleted text
	Log.domTool.useByTag(e_parent,f_unction,'dfn');// Defines a definition term
	Log.domTool.useByTag(e_parent,f_unction,'dir');// Deprecated. Defines a directory list
	Log.domTool.useByTag(e_parent,f_unction,'div');// Defines a section in a document
	Log.domTool.useByTag(e_parent,f_unction,'dl');// Defines a definition list
	Log.domTool.useByTag(e_parent,f_unction,'dt');// Defines a definition term
	Log.domTool.useByTag(e_parent,f_unction,'em');// Defines emphasized text 
	Log.domTool.useByTag(e_parent,f_unction,'fieldset');// Defines a fieldset
	Log.domTool.useByTag(e_parent,f_unction,'font');// Deprecated. Defines text font, size, and color
	Log.domTool.useByTag(e_parent,f_unction,'form');// Defines a form 
	Log.domTool.useByTag(e_parent,f_unction,'frame');// Defines a sub window (a frame)
	Log.domTool.useByTag(e_parent,f_unction,'frameset');// Defines a set of frames
	Log.domTool.useByTag(e_parent,f_unction,'h1');// Defines header 1 to header 6
	Log.domTool.useByTag(e_parent,f_unction,'h2');// Defines header 1 to header 6
	Log.domTool.useByTag(e_parent,f_unction,'h3');// Defines header 1 to header 6
	Log.domTool.useByTag(e_parent,f_unction,'h4');// Defines header 1 to header 6
	Log.domTool.useByTag(e_parent,f_unction,'h5');// Defines header 1 to header 6
	Log.domTool.useByTag(e_parent,f_unction,'h6');// Defines header 1 to header 6
	Log.domTool.useByTag(e_parent,f_unction,'head');// Defines information about the document
	Log.domTool.useByTag(e_parent,f_unction,'hr');// Defines a horizontal rule
	Log.domTool.useByTag(e_parent,f_unction,'html');// Defines an html document
	Log.domTool.useByTag(e_parent,f_unction,'i');// Defines italic text
	Log.domTool.useByTag(e_parent,f_unction,'iframe');// Defines an inline sub window (frame)
	Log.domTool.useByTag(e_parent,f_unction,'img');// Defines an image
	Log.domTool.useByTag(e_parent,f_unction,'input');// Defines an input field
	Log.domTool.useByTag(e_parent,f_unction,'ins');// Defines inserted text
	Log.domTool.useByTag(e_parent,f_unction,'isindex');// Deprecated. Defines a single-line input field
	Log.domTool.useByTag(e_parent,f_unction,'kbd');// Defines keyboard text
	Log.domTool.useByTag(e_parent,f_unction,'label');// Defines a label for a form control
	Log.domTool.useByTag(e_parent,f_unction,'legend');// Defines a title in a fieldset
	Log.domTool.useByTag(e_parent,f_unction,'li');// Defines a list item
	Log.domTool.useByTag(e_parent,f_unction,'link');// Defines a resource reference
	Log.domTool.useByTag(e_parent,f_unction,'map');// Defines an image map 
	Log.domTool.useByTag(e_parent,f_unction,'menu');// Deprecated. Defines a menu list
	Log.domTool.useByTag(e_parent,f_unction,'meta');// Defines meta information
	Log.domTool.useByTag(e_parent,f_unction,'noframes');// Defines a noframe section
	Log.domTool.useByTag(e_parent,f_unction,'noscript');// Defines a noscript section
	Log.domTool.useByTag(e_parent,f_unction,'object');// Defines an embedded object
	Log.domTool.useByTag(e_parent,f_unction,'ol');// Defines an ordered list
	Log.domTool.useByTag(e_parent,f_unction,'optgroup');// Defines an option group
	Log.domTool.useByTag(e_parent,f_unction,'option');// Defines an option in a drop-down list
	Log.domTool.useByTag(e_parent,f_unction,'p');// Defines a paragraph
	Log.domTool.useByTag(e_parent,f_unction,'param');// Defines a parameter for an object
	Log.domTool.useByTag(e_parent,f_unction,'pre');// Defines preformatted text
	Log.domTool.useByTag(e_parent,f_unction,'q');// Defines a short quotation
	Log.domTool.useByTag(e_parent,f_unction,'s');// Deprecated. Defines strikethrough text
	Log.domTool.useByTag(e_parent,f_unction,'samp');// Defines sample computer code
	Log.domTool.useByTag(e_parent,f_unction,'script');// Defines a script
	Log.domTool.useByTag(e_parent,f_unction,'select');// Defines a selectable list
	Log.domTool.useByTag(e_parent,f_unction,'small');// Defines small text
	Log.domTool.useByTag(e_parent,f_unction,'span');// Defines a section in a document
	Log.domTool.useByTag(e_parent,f_unction,'strike');// Deprecated. Defines strikethrough text
	Log.domTool.useByTag(e_parent,f_unction,'strong');// Defines strong text
	Log.domTool.useByTag(e_parent,f_unction,'style');// Defines a style definition
	Log.domTool.useByTag(e_parent,f_unction,'sub');// Defines subscripted text
	Log.domTool.useByTag(e_parent,f_unction,'sup');// Defines superscripted text
	Log.domTool.useByTag(e_parent,f_unction,'table');// Defines a table
	Log.domTool.useByTag(e_parent,f_unction,'tbody');// Defines a table body
	Log.domTool.useByTag(e_parent,f_unction,'td');// Defines a table cell
	Log.domTool.useByTag(e_parent,f_unction,'textarea');// Defines a text area
	Log.domTool.useByTag(e_parent,f_unction,'tfoot');// Defines a table footer
	Log.domTool.useByTag(e_parent,f_unction,'th');// Defines a table header
	Log.domTool.useByTag(e_parent,f_unction,'thead');// Defines a table header
	Log.domTool.useByTag(e_parent,f_unction,'title');// Defines the document title
	Log.domTool.useByTag(e_parent,f_unction,'tr');// Defines a table row
	Log.domTool.useByTag(e_parent,f_unction,'tt');// Defines teletype text
	Log.domTool.useByTag(e_parent,f_unction,'u');// Deprecated. Defines underlined text
	Log.domTool.useByTag(e_parent,f_unction,'ul');// Defines an unordered list
	Log.domTool.useByTag(e_parent,f_unction,'var');// Defines a variable
	Log.domTool.useByTag(e_parent,f_unction,'xmp');// Deprecated. Defines preformatted text
	/*    
	 Log.domTool.useByTag(e_parent,f_unction, 'div');
	 Log.domTool.useByTag(e_parent,f_unction, 'span');
	 Log.domTool.useByTag(e_parent,f_unction, 'p');
	 Log.domTool.useByTag(e_parent,f_unction, 'h1');
	 Log.domTool.useByTag(e_parent,f_unction, 'h2');
	 */
}//getByTag

/**
 * @param f_unction - a function to send the elements to
 * @param e_form - a form to search the elements from
 */
Log.domTool.getFormElements=function ( f_unction, e_form){
	if(e_form==null){e_form=document.forms[1];}//document.forms['FormMenu']
	try{
		for(var i=0;i<e_form.elements.length;i++){
			var eLement=e_form.elements[i];
			f_unction(eLement);
		}//for
	}catch(e_rror){Log.showExeption( e_rror, 'Log.domTool.getFormElements');}
}//getFormElements
/**
 *
 */
Log.domTool.getElementByNameOrId=function(s_id,s_formName,eVent){
	try{
		var eLement=document.getElementById(s_id);
		if(eLement==null){eval('eLement=document.forms[s_formName].'+s_id+';');}    
		return eLement;
	}catch(e_rror){Log.showExeption( e_rror, 'Log.domTool.getElementByNameOrId');}
	Log.eventTool.stopEvent(eVent);
}//getElementByNameOrId
/**
 *
 */
Log.domTool.hideInputById=function(s_id,e_container,eVent){
	try{
		var e_input=document.getElementById(s_id);
		if(e_input!=null){
			Log.domTool.hide(e_input);
			Log.domTool.shiftId(s_id,e_container,'');
			//if(e_input.type!=null){e_input.type='hidden';}fails in IE
		}//if(e_input!=null
	}catch(e_rror){Log.showExeption( e_rror, 'Log.domTool.hideInputById');}
	Log.eventTool.stopEvent(eVent);
}//hideInputById
/**
 *
Log.domTool.shiftId=function(s_id,e_container,s_newTags,eVent){
	try{
		var s_newId=s_id;
		var s_innerHTML=e_container.innerHTML;
		if(s_innerHTML!=''){
			var i_id=Log.domTool.getIndexOfAttributeValue(s_innerHTML,'id',s_id);
			if(i_id!=null){
				var s_start=s_innerHTML.substring(0,i_id);
				var s_end=s_innerHTML.substring(i_id,s_innerHTML.length);
				//s_newId=s_id+Log.timeTool.getTime();
				s_newId=s_id+(Log.domTool.idCounter++);
				s_end=s_end.replace(s_id,s_newId);
				s_innerHTML=s_start+s_end+s_newTags;
				e_container.innerHTML=s_innerHTML;
			}//if(i_id!=-1
		}//if(s_innerHTML!=''
		return s_newId;
	}catch(e_rror){Log.showExeption( e_rror, 'Log.domTool.shiftId');}
	Log.eventTool.stopEvent(eVent);
}//shiftId
 */
Log.domTool.shiftId=function(s_id,e_container,s_newTags){
	var s_newId=Log.domTool.removeId(s_id);
	e_container.innerHTML=e_container.innerHTML+s_newTags;
	return s_newId;
}//shiftId

Log.domTool.removeElement=function(removableId,containerId){
	var removableElement=document.getElementById(removableId);
	var container=document.getElementById(containerId);
  if(removableElement!=null&&container!=null){
    container.removeChild(removableElement);//container.appendChild(removableElement);
  }
}//removeElement

Log.domTool.removeId=function(s_id){
	var s_newId=s_id+(Log.domTool.idCounter++);
	var eLement=document.getElementById(s_id);
	eLement.id=s_newId;
	return s_newId;
}//removeId
Log.domTool.idCounter=0;
/**
 *
 */
Log.domTool.getIndexOfAttributeValue=function(s_innerHTML,s_attribute,s_id){
	if(s_innerHTML==null||s_innerHTML==''||s_id==null||s_id==''||s_attribute==null||s_attribute==''){return null;}
	var i_id=s_innerHTML.length-1;
	while(i_id!=-1){
		i_id=s_innerHTML.lastIndexOf(s_id,i_id);
		var s_start=s_innerHTML.substring(0,i_id);
		var i_space=s_start.lastIndexOf(' ');
		if(i_space!=-1){
			var i_attribute=s_start.toLowerCase().lastIndexOf(s_attribute);
			if(i_space==i_attribute-1){
				var s_start=s_innerHTML.substring(i_id-1,i_id);
				var i_close=i_id+s_id.length;
				var s_close=s_innerHTML.substring(i_close,i_close+1);
				var b_hasNoQuotations=s_start=='=';
				var b_quotationsAreFound=s_start==s_close&&(s_start=='"'||s_start=="'");
				if(b_hasNoQuotations||b_quotationsAreFound){
					return i_id;
				}//if(i_space==i_id-1
			}//if(i_space
		}//if(i_space!=-1
		i_id=i_id-1;
	}//while(i_id!=-1
	return null;
}//getIndexOfAttributeValue
/**
 * @eLement an HTML dom element to be changed
 * @sTring an HTML string to be inserted to the eLement
 */
Log.domTool.addInnerHtml=function (sTring, eLement){
	if(eLement==null){eLement=document.body;}
	eLement.innerHTML=eLement.innerHTML+sTring;
}//addInnerHtml  

Log.domTool.show=function(eLement,sValue){
	if(sValue==null){sValue=Log.domTool.BLOCK;}
	eLement.style.display=sValue;
}//show

Log.domTool.hide=function(eLement){
	eLement.style.display=Log.domTool.NONE;
}//hide

Log.domTool.isHidden=function(eLement){
	return eLement.style.display==Log.domTool.NONE;
}//isHidden

/* ADD A PROPERTY, IF IT HAS A VALUE
 * @param s_id
 * @param s_attribute
 * @param v_value
 */
Log.domTool.updateAttribute=function(s_id,s_attribute,v_value){
	var eLement=document.getElementById(s_id);
	if(eLement!=null&&/* IE */eLement.id!=""&&v_value!=null&&v_value!=''&&eval('eLement.'+s_attribute)!=null){
		eval('eLement.'+s_attribute+'=v_value;');
		Log.domTool.hasUpdatedAttribute=true;
		if(Log.domTool.updateAttributeOnce==true){
//alert('Log.domTool.updateAttribute eLement.id:'+eLement.id+' s_attribute:'+s_attribute+' v_value:'+v_value);
			eLement.id="";//null;
		}//if
	}//if
}//updateAttribute
Log.domTool.updateAttributeOnce=false;
Log.domTool.hasUpdatedAttribute=false;

/* ADD A PROPERTY, IF IT HAS A VALUE
 * @param s_id
 * @param s_attribute
 * @param v_value
 */
Log.domTool.evaluateAttribute=function(s_id,s_attribute,v_value){
	var eLement=document.getElementById(s_id);
	if(eLement!=null&&v_value!=null&&v_value!=''){
		eval('eLement.'+s_attribute+'=v_value;');
	}//if(v_value!=null  
}//evaluateAttribute
/**
 * 
 */
Log.domTool.writeln=function ( sTring){
	document.writeln(sTring);
}//writeln    
/**
 * 
 */
Log.domTool.write=function ( sTring){
	/*DEBUG.PRINT //if(s_id==229||s_id==240||s_id==250||s_id==291||...230){ onclick='f_0./*setVariable(this)* /'
	 if(sTring.indexOf(229)>0){
	 Log.domTool.write.s_test=Log.domTool.write.s_test+sTring
	 }*/
	document.write(sTring);
}//write

Log.domTool.getBrowserSpecificInnerHtml=function(s_input){
	var v_element=document.getElementById(Log.domTool._sUnicodeTransformerId);
	if(v_element!=null){
		v_element.innerHTML=s_input;
		s_input=v_element.innerHTML;
		v_element.innerHTML="";//remove the prototype to avoid double id's
	}//if(v_element!=null
	return s_input;
}//getBrowserSpecificInnerHtml

Log.domTool.getBrowserSpecificUtf=function(s_input){
	if(s_input!=null && s_input.length>3){
		s_input=Log.domTool.getBrowserSpecificInnerHtml(Log.charTool.toUtf(s_input));
	}//if
	return s_input;
}//getBrowserSpecificUtf

/**
 * CALLING EXAMPLE FROM "dtree.js"
 */
/*Log.domTool.reorder=function(id, bUp)
 {
 var vNode=vTree._aNodes[id];
 var sNode=this.nodeToString(vNode);
 var sNodeDivId=vTree._sNodeId + id;
 var sNodeDiv=vTree._sNodeTag + vTree._sTemporary + '">' +sNode+'</div>';
 
 var parentNode=vTree._aNodes[vNode._iParent];//var iSisters=vTree._aNodes.length;//in fact it counts all the nodes in this Tree
 var sParentId=vTree._sNodeId+parentNode._iArray;
 var divParent=document.getElementById(sParentId);
 
 var sBlockId=vTree._sChildrenId+parentNode._iArray;
 var divBlock=document.getElementById(sBlockId);
 var sBlock=f_Replace(divBlock.innerHTML,"", sNode);
 
 var sTagId=vTree._sNodeTag.toLowerCase();
 sTagId=f_Replace(sTagId,"", "'", '"');
 var sDivId=(vTree._sNodeTag + vNode._iArray).toLowerCase();
 sDivId=f_Replace(sDivId,"", "'", '"');
 var sParent=this.nodeToString(parentNode).toLowerCase();
 sParent=f_Replace(sParent,"", "'", '"');
 
 var iInsert;
 if(bUp){
 iInsert=Log.domTool.getPreviousInsertPoint(sParent, sDivId, sTagId);
 }else{
 iInsert=Log.domTool.getNextInsertPoint(sParent, sDivId, sTagId);
 }
 
 if(iInsert==null){
 return null;
 }else if(iInsert==-1){
 if(bUp){
 divBlock.innerHTML=sNodeDiv+sBlock;
 }else{
 divBlock.innerHTML=sBlock+sNodeDiv;
 }
 }else{
 var iArray=sParent.substring(iInsert+sTagId.length, sParent.indexOf(">", iInsert));
 var sThirdId=vTree._sNodeId+iArray;
 
 Log.domTool.insertHTML(divBlock, sBlock, sNodeDiv, sThirdId);
 }//if(iInsert==
 TreeBranchRemover.removeNode(id);
 document.getElementById(vTree._sNodeId+vTree._sTemporary).id=sNodeDivId;
 }//reorder*/
