function TogglePostDetails(element){
	
	var TabList = getElementsByName_iefix('ul', 'TabList');
	var commentTab = getElementsByName_iefix('li', 'CommentTab');
	var pingTab = getElementsByName_iefix('li', 'PingTab');
	var commentBlock = getElementsByClass('CommentBlock');
	var pingBlock = getElementsByClass('PingBlock');
	
	TabList[0].style.backgroundPosition = '0px -31px';
	
	commentTab[0].style.color = '#505050'; // Reset the text colors
	pingTab[0].style.color = '#505050';
	
	commentBlock[0].style.display = 'none'; // Reset both the display blocks
	pingBlock[0].style.display = 'none';

	if(element == 'Comments'){
		//commentTab[0].style.backgroundPositionY = '0px'; // Bring in the active color
		commentTab[0].style.color = '#FFFFFF'; // Bring in the active text color
		commentBlock[0].style.display = 'block'; // Display the element block
	}else if(element == 'Pings'){
		TabList[0].style.backgroundPosition = '0px 0px';
		pingTab[0].style.color = '#FFFFFF'; // Bring in the active text color
		pingBlock[0].style.display = 'block'; // Display the element block
	}else{
		// Not a relevant Parameter!!
		alert("Else");
	}
}

function getElementsByClass( searchClass, domNode, tagName) {
	if (domNode == null) domNode = document;
	if (tagName == null) tagName = '*';
	var el = new Array();
	var tags = domNode.getElementsByTagName(tagName);
	var tcl = " "+searchClass+" ";
	for(i=0,j=0; i<tags.length; i++) {
		var test = " " + tags[i].className + " ";
		if (test.indexOf(tcl) != -1)
			el[j++] = tags[i];
	}
	return el;
}

function getElementsByName_iefix(tag, name) {
     
     var elem = document.getElementsByTagName(tag);
     var arr = new Array();
     for(i = 0,iarr = 0; i < elem.length; i++) {
          att = elem[i].getAttribute("name");
          if(att == name) {
               arr[iarr] = elem[i];
               iarr++;
          }
     }
     return arr;
}

function ClearInput(value, id){ 
	var input = document.getElementById(id);
	if(value == input.value){
		input.value = '';
	}else{
		input.value = input.value;
	}
}