var widthMenu = 760;
var widthMenuElem = new Array(135,100,90,160,160,122,114,0,0);
var offsetXMenuElem = new Array(76,0,241,348,433,300,403,0,0);

if(!window.saveInnerWidth) {
  window.onresize = resize;
	if (window.innerHeight){
		window.saveInnerWidth = window.innerWidth;
		window.saveInnerHeight = window.innerHeight;}
	else if (document.body){
		if (document.body.clientWidth){
			window.saveInnerWidth = document.body.clientWidth;
			window.saveInnerHeight = document.body.clientHeight;}}}

function resize() {
	if (window.innerHeight){
    if (saveInnerWidth < window.innerWidth || 
        saveInnerWidth > window.innerWidth || 
        saveInnerHeight > window.innerHeight || 
        saveInnerHeight < window.innerHeight ){
        window.history.go(0);}}
	else if (document.body){
		if (document.body.clientWidth){
			if (saveInnerWidth < document.body.clientWidth || 
					saveInnerWidth > document.body.clientWidth || 
					saveInnerHeight > document.body.clientHeight || 
					saveInnerHeight < document.body.clientHeight ) 
			{window.history.go(0);}}}}

function getWidth(elem)
{return (widthMenuElem[elem-1]);}

function getHeight(){return 142;}

function getXOffset(elem){
	/*
	if (window.innerHeight)
		offset = ((window.innerWidth-16)-widthMenu)/2;
	else if (document.body)
		if (document.body.clientWidth)
			offset = ((document.body.clientWidth)-widthMenu)/2;
	else
		offset=0;
	*/
	
	offset = 80;
	
	if (offset < 0) offset=0;
	offset += offsetXMenuElem[elem-1];
	//alert(offset);
	return (offset);
	
}

