
$(document).ready(function(){

 $("body").append('<iframe id="spread_frame" src="spreadpage.htm" class="spread"></iframe><iframe id="center_frame" frameborder="0" marginwidth="0" marginheight="0" height="320" width="500" src="loading.htm" scrolling="no" class="modelPopup"></iframe>');
 $("body").append('<iframe id="spread_framewalk" src="spreadpage.htm" class="darkspread"></iframe><iframe id="center_framewalk" frameborder="0" marginwidth="0" marginheight="0" height="320" width="500" src="loading.htm" scrolling="no" class="modelPopup_no_border"></iframe>');

pageHeight=document.getElementById('_bg').offsetHeight;

pageWidth =document.getElementById('_bg').offsetWidth;

//document.getElementById('mainDiv').style.width = pageWidth + 'px';

scrWidth = window.screen.width;
scrHeight = window.screen.height;





//================set window size strats=======================================

if(scrWidth>pageWidth)
{
 if (navigator.appName.indexOf("Microsoft")!=-1) 
 { 

 
  if (document.all) {

  var fixedHeight = pageHeight + 100;
  
  window.resizeTo(pageWidth,fixedHeight); // resize window with some fixed height and width 
  var diffIEHeight = fixedHeight - document.documentElement.offsetHeight ;
  
  var diffIEWidth = pageWidth - document.documentElement.offsetWidth ;
  

if(pageHeight<scrHeight)
  window.resizeTo(pageWidth + diffIEWidth ,pageHeight + diffIEHeight );
  else
  window.resizeTo(pageWidth + diffIEWidth ,scrHeight );

  }

 }
 else
 {


 var diffHeight = (window.outerHeight)-(window.innerHeight);
diffWidth = (window.outerWidth)-(window.innerWidth);
//window.resizeTo(pageWidth + diffWidth , document.body.clientHeight + diffHeight);
  
}

}
}



);

// Script for Load Quickquote

 if (typeof XMLHttpRequest != 'undefined') {
 var httpRequest = new XMLHttpRequest();
httpRequest.open('GET', 'Quickquote.html', false);
 httpRequest.send(null);
 if(document.getElementById("quickQuoteMain")!=null)
 document.getElementById("quickQuoteMain").innerHTML=httpRequest.responseText;
 }
  if(document.getElementById("quickQuoteMain")!=null)
 Resetfn();



 //script for Load RHS Accordion


 if (typeof XMLHttpRequest != 'undefined') {
     var httpRequest = new XMLHttpRequest();
     var pos=document.location.href.toLowerCase().indexOf("contact-us.aspx");
     if(pos!=-1)
     httpRequest.open('GET', 'Contactaccordion.htm', false);
     else
     httpRequest.open('GET', 'HTMLPage.htm', false);
     httpRequest.send(null); 
     if(document.getElementById("firstpane")!=null)    
     document.getElementById("firstpane").innerHTML = httpRequest.responseText;
 }
 
 
 // To View Range Map Help window
function rangemaphelp()
{

var popWidth=627;
document.getElementById('center_frame').src="popups/help-range-map.html";
document.getElementById('center_frame').style.display = 'block';  
document.getElementById('center_frame').style.height="250px";
document.getElementById('center_frame').style.width=popWidth +"px";
document.getElementById('center_frame').style.top= setFrameTop(450) + "px";//((window.screen.height-310)/2) +"px" ;//+ document.body.scrollTop; 
document.getElementById('center_frame').style.left=(window.screen.width-popWidth)/2 + "px";
document.getElementById('spread_frame').style.display='block';
document.getElementById('spread_frame').style.height=((document.body.scrollHeight)+50) + "px";
document.getElementById('spread_frame').style.width=document.body.scrollWidth;


}

 
 
 