function report(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=yes,width=450,height=300,left = 100,top = 50');");
}
function reportPopup(ID, vid)
{
this.id=ID
this.vid=vid
window.open('report.php?vid='+this.vid+'&do='+this.id, 'report','toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=yes,width=450,height=300,left=100,top=50');
}
function sharePopup(vid)
{
this.vid=vid
window.open('share.php?vid='+this.vid, 'share','toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=no,width=450,height=300,left=100,top=50');
}
function addmyspacePopup(vid)
{
this.vid=vid
window.open('share_code.php?vid='+this.vid+'&social=myspace', 'share','toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=no,width=450,height=300,left=100,top=50');
}

function textLimit(field, maxlen) {
	document.getElementById( "sym_left" ).innerHTML = 400 - document.getElementById( "comment_txt" ).value.length;
	if (field.value.length > maxlen + 1)
	alert('Ваш комментарий слишком длинный!');
	if (field.value.length > maxlen)
	field.value = field.value.substring(0, maxlen);
} 
function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}
