/******************************************************** Daca rezolutie mai mica de 1024 pun alta poza */
var __popupWin = null;

function popup2(url) 
{ 
    var width = arguments[1] ? arguments[1] : 650;
    var height = arguments[2] ? arguments[2] : 450;
    var scrollbars = arguments[3] ? arguments[3] : 'no';
    var resizable = arguments[4] ? arguments[4] : 'no';
    var targetName = arguments[5] ? arguments[5] : 'info';
    var modal = arguments[6] ? arguments[6] : 'no';

    var LeftPosition = 0;
    var TopPosition = 0;

    if (__popupWin != null && !__popupWin.closed) {
        __popupWin.close(); 
    }

    try {
        if(window.opener){
            LeftPosition =(window.opener.innerWidth-width) / 2;
            TopPosition =((window.opener.innerHeight-height)/2) + 60;
        } else if(window.innerWidth) {
            LeftPosition =(window.innerWidth-width) / 2;
            TopPosition =((window.innerHeight-height)/2) + 60;
        } else {
            LeftPosition =(parseInt(window.screen.width) - width)/2;
            TopPosition=((parseInt(window.screen.height) - height)/2) + 60;
        }
    } catch(e) {}

    __popupWin = window.open(url,targetName,'scrollbars='+scrollbars+',width='+width+
        ',height='+height+',resizable='+resizable+',left=' + LeftPosition + 
        ',top=' + TopPosition+',modal='+modal);

    if (window.focus) {
        __popupWin.focus();
    }
    return __popupWin;
}


function isInteger(s)
{
        var i;
        for (i = 0; i < s.length; i++) {
                // Check that current character is number.
                var c = s.charAt(i);
                if (((c < "0") || (c > "9"))) return false;
        }

        // All characters are numbers.
        return true;
}
function checkEmail(e) {
        ok = '1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM';

        for(i = 0; i < e.length; i++){
                if(ok.indexOf(e.charAt(i)) < 0)
                        return (false);
        }

        if (document.images) {
                re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
                re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
                if (!e.match(re) && e.match(re_two))
                        return (-1);
        }
}


function clickText(el, text) {
  if (el.value == text) {
    el.value = '';
  }  
}
function blurText(el, text) {
  if (el.value == '') {
    el.value = text;
  }  
}



window.onload = function() {
/*  
	if(document.body.offsetWidth<=1056){
		document.getElementById('top').style.width = '1100px';
	}
	if(document.body.offsetWidth<=1056){
		document.getElementById('header').style.width = '1100px';
	}
}
window.onresize = function() {
	if(document.body.offsetWidth<=1056){
		document.getElementById('top').style.width = '1100px';
	}

	if(document.body.offsetWidth<=1056){
		document.getElementById('top').style.width = '1100px';
	}
*/
  var x = document.getElementById('sidebar').offsetHeight;
  if (document.getElementById('content').offsetHeight < x) {
  
      document.getElementById('content').style.height = x + 'px';
  }
}
  
