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() {
// reduce image flicker in IE6
 if (ie) {
   try {
     document.execCommand('BackgroundImageCache', false, true);
   } 
   catch(e) {}; // ignore it
 }

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;
}