var livescreenHeight=screen.availHeight;
var livescreenWidth=screen.availWidth;

var dom=(document.getElementById) ? 1 : 0;
var nn4=(document.layers) ? 1 : 0;
var opera=(window.opera) ? 1 : 0; 
var ie=(document.all && !opera) ? 1 : 0;


function LivePageWidth() {
 if (document.body.clientWidth!= null)
  return document.body.clientWidth;
 if (window.innerWidth!= null)
  return window.innerWidth;
 return screen.availWidth;
}

function myResize() {
 var obj = document.getElementById('front_white');
 if (!obj) return;

 var winWidth=LivePageWidth();
 if (winWidth>1256) winWidth=1256;
 var fLeft=0;

 if (winWidth< 1045) {
  obj.style.left = '27.6%'; 
 } else {

  fLeft = (winWidth/41.2 + 1.2); 
  obj.style.left = fLeft+'%'; 
 }

}

function myResize_page() {
 var obj = document.getElementById('front_white');
 if (!obj) return;

 var winWidth=LivePageWidth();
 if (winWidth>1256) winWidth=1256;
 var fLeft=0; 

 if (winWidth< 1050) {
  obj.style.left = '32.34%'; 
 } else {
   if (winWidth< 1120) {
     fLeft = (winWidth/34.9 + 1.1); 
   } else {
     fLeft = (winWidth/36.2 + 1.1); 
   }
   obj.style.left = fLeft+'%'; 
 }

}


var oldonload = window.onload;

if (typeof window.onload != 'function') { 
 window.onload = myOnload; 
}
else { 
  window.onload = function() {oldonload(); myOnload(); }
}



function myOnload() {
 if (ie) {
   try { document.execCommand('BackgroundImageCache', false, true); } 
   catch(e) {};
 }

 if (document.location.hash=="#regions") Layer_Close('second','first','m1','m','l','c','r');

var obj = document.getElementById('phone_call'); if (!obj) return;
 if (ie) { obj['onclick'] = new Function('location.href = location.protocol +"//"+location.host + linkGoCall; return;');  }
 else obj.setAttribute('onclick','goCall()');
 linkGoCall='/callback/';
}

var linkGoCall='';
function goCall() {
  if(linkGoCall !='' )  location.href = location.protocol +"//"+location.host + linkGoCall; return;
}


function Layer_Close(f,sec,midl,midl2,mleft,mcent,mright){ 
 try {
	  var obj=document.getElementById(f),
	  obj2=document.getElementById(sec),
	  m=document.getElementById(midl),
	  m2=document.getElementById(midl2),
	  ml=document.getElementById(mleft),
	  mc=document.getElementById(mcent),
	  mr=document.getElementById(mright);  
	  if(!obj) return;
	  if(!obj2) return;
	  if(!m) return;
	  if(!m2) return;
	  if(!ml) return;
	  if(!mc) return;
	  if(!mr) return;
	  if(obj.style.display =='none') {
		  obj.style.display ='block';
		  obj2.style.display ='none';
	  }
	 		
	if(f =='first') {
				m.className ='';
				m2.className ='tm';
				ml.className ='';
				mc.className ='tab_m1';
				mr.className ='tab_right';
	}  else {
				m.className ='';
				m2.className ='tm';
				ml.className ='tab_left';
				mc.className ='tab_m';
				mr.className ='';
	}
  } catch(e) {}
} 

$(document).ready(function () {
  $(".prod .pic img").lazyload({ placeholder : "/img/0.gif",  effect: "fadeIn"  });
;});



