function flash_ki(hely,wi,he,align1,margin1,wmode1)
{
	if (align1)
	{
		align1 = ' align=' + align1;
	}

	if (margin1)
	{
		margin1 = ' style="margin:' + margin1 + '"';
	}
	document.write('<object type="application/x-shockwave-flash" data=' + hely + ' width=' + wi + ' height=' + he + align1 + margin1 +'>');
	document.write('<param name="movie" value=' + hely + '>');
	document.write('<param name="quality" value="high">'); 
	if ( wmode1 ) { document.write('<param name="wmode" value=' + wmode1 + '>'); }
	document.write('</object>');
}

function ccounter_func(msginputId,ccounter_inputId,max,addevent)
{
	var msginput = document.getElementById(msginputId);
	var ccounter_input = document.getElementById(ccounter_inputId);
	var msglen = msginput.value.length;
 
	ccounter_input.value = (msglen > 0) ? max - msglen : max;
 
	if(msglen > max) {
		msginput.value = msginput.value.substring(0,max);
		ccounter_input.value=0;
	}
	if (addevent)
	{
		msginput.onkeyup = function() { ccounter_func(msginputId,ccounter_inputId,max); }
	}
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("balmenu").getElementsByTagName("DIV");
		if(el.style.display == "none"){
			for (var i=0; i<ar.length; i++){
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function ChangeClass(menu, newClass) { 
	 if (document.getElementById) { 
	 	document.getElementById(menu).className = newClass;
	 } 
} 

document.onselectstart = new Function("return false");



