function fixMaxSize(obj,maxSize) {
	if (obj.width > maxSize) {
		obj.width = maxSize;
	}
}
function noImg() {
    document.getElementById('receptImg').style.display='none';
    document.getElementById('imgContainer').style.padding='5px';
}
function back(steps) {
    if (history.length > 1) {
        history.go(steps);
    } else {
        location.href="Default.aspx";
    }
}
function cleanForm(id) {
    document.getElementById(id).value = '';
}
function noViewstate() {
    document.getElementById('__VIEWSTATE').value = '';
    //document.getElementById('__VIEWSTATE').name = '';
    //document.getElementById('freetext').value = encodeURI(document.getElementById('freetext').value);
}
function scrollToContent() {
    var scrollPosition = {
        left: 0,
        top: 0
    }; 
    var _timer = setInterval(function(){
        if (/loaded|complete|interactive/.test(document.readyState)) {
            clearInterval(_timer);
            if (window.pageXOffset == 0 && window.pageYOffset == 0)
                window.scrollTo(scrollPosition.left, scrollPosition.top);
        }
    }, 10);
}