ï»¿//var d = document;
//var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById && d.documentElement.behaviorUrns)) ? true : false;

//function bodySize(){
//if(winIE && d.documentElement.clientWidth) {
//sObj = d.getElementsByTagName("body")[0].style;
//sObj.width = (d.documentElement.clientWidth<1000) ? "810" : "100%";
//}
//}

//function init(){
//if(winIE) { bodySize(); }
//}
//onload = init;
// if(winIE) { onresize = bodySize; }



function ismax (text) {
	if (text.value.length > 2000) {
//		alert("Âàøå ñîîáùåíèå ïðåâûñèëî ìàêñèìàëüíî äîïóñòèìûé ðàçìåð â 2000 ñèìâîëîâ!");
		text.value = text.value.substring(0, 2000);
	} 
	
}


function p(name, w, h)
{
	e = window.open(name, 'popup', 'scrollbars=yes,width=' + w + ',height=' + h);
	if (window.focus) { e.focus(); }
	return false;
}


function pi(img, w, h)
{
	e = window.open('', 'pic', 'scrollbars=no,width=' + w + ',height=' + h);
	if (window.focus) { e.focus(); }

	e.document.open();
	e.document.write('<html><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	e.document.write('<img id="img" src=' + img + ' width=' + w + ' height=' + h + '><br>');
	e.document.close('</body></html>');

        e.window.resizeTo(100,100);
        e.window.resizeTo(100-(e.document.body.clientWidth-e.document.getElementById("img").width), 100-(e.document.body.clientHeight-e.document.getElementById("img").height));
	return false;

}
