function textCounter(){
var maxlimit=150;
if (document.cbForm.S1.value.length > maxlimit){
document.cbForm.S1.value = document.cbForm.S1.value.substring(0, maxlimit);
}else{
document.cbForm.T3.value = document.cbForm.S1.value.length + "/" + maxlimit ;
}
}

function validateForm()
{
if (document.cbForm.T1.value=="" && document.cbForm.S1.value==""){
window.alert("hey, did i know u!? what do u say!?");
return;
}
if (document.cbForm.T1.value==""){
window.alert("hey, tell me ur name!");
return;
}
if (document.cbForm.S1.value==""){
window.alert("hey, say something!");
return;
}
textCounter();
document.cbForm.submit();
}

function popSmilies()
{
var strFeatures="toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,width=230,height=240,left = 200,top = 200";
	
newWin = window.open('popsmilies.php',"smiley",strFeatures);
newWin.opener = this;
}

function dashed(input,action)
{
var temp=document.getElementsByName(input);
if (action==1)
{
temp[0].style.borderStyle="dashed";
}else{
temp[0].style.borderStyle="solid";
}
}