<!--
function hideCommentForm(){	
	/*hideSmilies();*/
	document.getElementById('commentForm').style.display = 'none';
}
function hideTextCounter(){
	hideSmilies();
	document.getElementById('resterend').innerHTML = '';
}
function hideSmilies(){
	document.getElementById('smilies').innerHTML = 'Even geduld...';
	document.getElementById('smilies').style.display = 'none';
}
function showCommentForm(){
	document.getElementById('commentForm').style.display = 'block';
	document.getElementById('commentForm').style.top = tempY + "px";
	document.getElementById('commentForm').style.left = tempX + "px";		
}
function positionCommentForm(){
	document.getElementById('commentForm').style.display = 'block';
	document.getElementById('commentForm').style.top = 100 + "px";
	document.getElementById('commentForm').style.left = 300 + "px";
}	
function textCounter() {
	var limit = 1000;
	if (document.getElementById('sCtext').value.length > limit) // if too long...trim it!
	document.getElementById('sCtext').value = document.getElementById('sCtext').value.substring(0, limit);
	// otherwise, update 'characters left' counter
	else 
	document.getElementById('resterend').innerHTML = '<br /><a href="javascript:showSmilies();">(smilies)</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Je kan nog '+(limit - document.getElementById('sCtext').value.length+' tekens invoeren');
}

function showSmilies(){
	document.getElementById('smilies').style.display = 'block';	
	document.getElementById('link').innerHTML = '<iframe src="http://www.tradupolis.be/siteIncludes/smilies.inc.php?action=showSmilies" style="height:0;width:0; border: 0" name="smilieFrame" id="smilieFrame" ></iframe>';
	
}
function addSmilie(myValue) {
	var myField = document.getElementById('sCtext');
	if (document.selection) {
	myField.focus();
	sel = document.selection.createRange();
	sel.text = myValue;
	}
	else if (myField.selectionStart || myField.selectionStart == '0') {
	var startPos = myField.selectionStart;
	var endPos = myField.selectionEnd;
	myField.value = myField.value.substring(0, startPos)
	+ myValue
	+ myField.value.substring(endPos, myField.value.length);
	} else {
	myField.value += ' '+myValue+' ';
	}
}
function printit(){  
	if (window.print) {
	    window.print() ;  
	} else {
	    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
	    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
	}
}
