
/* Used in moreinfo popup */

function calculatemoreinfoCssProperties()
{
	document.getElementById("regPopCopy").style.height=document.getElementById("regPopCopy").offsetHeight+100;
}

function calculatearticleIndexImgBrdrCssProperties(article) 
{
	
	
	
	if (article=='thirdarticle')
	{
		document.getElementById("articalcontainer").style.height=document.getElementById("articlelinks").offsetHeight+260;
		document.getElementById("articalcontainerborder").style.height=document.getElementById("articlelinks").offsetHeight+173;
		document.getElementById("whiteborder").style.height=document.getElementById("articlelinks").offsetHeight+175;
		document.getElementById("copyart").style.height=document.getElementById("articlelinks").offsetHeight+60;
		document.getElementById("articlefooter").style.top=document.getElementById("articlelinks").offsetHeight+228;
		document.getElementById("articlefooter").style.left=455;
		
	}else if (article=='firstarticle')
	{
		document.getElementById("articalcontainer").style.height=655;
		document.getElementById("articalcontainerborder").style.height=573;
		document.getElementById("whiteborder").style.height=575;
		document.getElementById("copyart").style.height=460;
		document.getElementById("articlefooter").style.top=630;
		document.getElementById("articlefooter").style.left=455;
		
	}
}

function calculateServiceFormImgBrdrCssProperties() { 

// Retrieve region div heights
  var headerHeight = document.getElementById("serviceform1").offsetHeight;
 
  document.getElementById("serviceform1").style.height=headerHeight;
  document.getElementById("serviceform").style.height=headerHeight+88;
  
  document.getElementById("serviceformpage").style.height=headerHeight+230;
  document.getElementById("serviceformwhiteborder").style.height=headerHeight+232;
  
  document.getElementById("innerbox").style.height=headerHeight+243;
  document.getElementById("outerdiv").style.height=headerHeight+455;
  document.getElementById("outerdiv_bottomborder").style.top=headerHeight+470;
  document.getElementById("extremout").style.height=headerHeight+520;
  document.getElementById("footerLinks").style.top=headerHeight+475;
  document.getElementById("outerdiv_rightslice").style.height=headerHeight+445;
  document.getElementById("outrdivborder").style.height=headerHeight+450;
  document.getElementById("serviceform_submit").style.top=headerHeight+10;
}
function calculateBrdrCssProperties(vcode) { 

var leftHeight = document.getElementById("copyContent3").offsetHeight;
 var rightHeight = document.getElementById("serviceform1").offsetHeight;
 var maxHeight = rightHeight;
 var headerHeight = document.getElementById("header1").offsetHeight;
 var footerHeight = 40; 
 
 if(rightHeight > leftHeight) 
 {
   maxHeight = rightHeight;
  }
  else
  {
  maxHeight = leftHeight;
  }
  
 document.getElementById("copyContent3").style.height = maxHeight+17+"px";
 document.getElementById("servformleftcopy").style.height = maxHeight+"px";
 document.getElementById("innerbox1").style.height=maxHeight+"px";
 document.getElementById("serviceformpagex").style.height = rightHeight+90+"px";
 document.getElementById("formdottedline3").style.top =document.getElementById("tab1").offsetHeight+175+"px";
 document.getElementById("serviceform_submit").style.top=document.getElementById("tab1").offsetHeight+40+"px";
 document.getElementById("footerLinks").style.top = document.getElementById("innerbox1").offsetHeight+240+"px";
 document.getElementById("outerdiv").style.height=document.getElementById("innerbox1").offsetHeight+230+"px"; 
 document.getElementById("ftr-disclaimer").style.top = document.getElementById("innerbox1").offsetHeight+260+"px";; 
 document.getElementById("extremout").style.height = headerHeight+maxHeight+footerHeight+document.getElementById("ftr-disclaimer").offsetHeight+100+"px";
}


function calculateFormImgBrdrCssProperties(vcode)
{
  var headerHeight = document.getElementById("serviceform1").offsetHeight;
  
  alert("header height"+headerHeight);
  
  if(vcode!=null && vcode=="3024")
  {
  	document.getElementById("AgreeToReceiveEmail").className='tshow';
	document.getElementById("AgreeToReceiveNewsletter").className='thide';	
  }	
  else
  {
  	document.getElementById("AgreeToReceiveEmail").className='thide';
	document.getElementById("AgreeToReceiveNewsletter").className='tshow';	
  }
  
  document.getElementById("serviceform1").style.height=headerHeight+60;

   
  document.getElementById("serviceformpage").style.height=headerHeight+150;
  document.getElementById("serviceformheader").style.height=headerHeight+149;
  
  document.getElementById("serviceformwhiteborder1").style.height=headerHeight+232;
  document.getElementById("serviceforminnerbox_rightslice").style.height=document.getElementById("serviceformpage").style.height;
  
 	 
  document.getElementById("innerbox").style.height=headerHeight+243;
  document.getElementById("outerdiv").style.height=headerHeight+455;
  document.getElementById("outerdiv_bottomborder").style.top=headerHeight+456;
  document.getElementById("outerdiv_bottomborder").style.left=0;
  document.getElementById("outerdiv_rightborder").style.left=730;
  document.getElementById("outerdiv_rightborder").style.top=0;
  document.getElementById("outerdiv_rightslice").style.left=730;
  document.getElementById("outerdiv_rightslice").style.top=5;
  document.getElementById("extremout").style.height=headerHeight+520;
  
  document.getElementById("footerLinks").style.top=headerHeight+460;
  document.getElementById("ftr-disclaimer").style.top=headerHeight+480;
   document.getElementById("ftr-disclaimer").style.left=0;
  document.getElementById("footerLinks").style.left=10;
  document.getElementById("formdottedline").style.top=80
  document.getElementById("formdottedline").style.left=325;
  document.getElementById("formdottedline2").style.left=330;
  document.getElementById("formdottedline2").style.top=document.getElementById("serviceform1").offsetHeight+60;
  document.getElementById("outerdiv_rightslice").style.height=headerHeight+452;
  document.getElementById("outrdivborder").style.height=headerHeight+450;
  //document.getElementById("serviceform_submit").style.top=document.getElementById("serviceform1").offsetHeight-60;
  document.getElementById("serviceform_processing").style.top=10;
  
  document.getElementById("serviceforminnerbox_btmbrd").style.top=document.getElementById("serviceform1").offsetHeight+104;	
  
}


function calculateNoFormImgBrdrCssProperties()
{ 

 // Retrieve region div heights
  var headerHeight = document.getElementById("servformleftcopy1").offsetHeight;
  document.getElementById("servformleftcopy1").style.height= headerHeight+"px";
  document.getElementById("serviceformwhiteborder").style.height= headerHeight+"px";
  document.getElementById("innerbox").style.height= (headerHeight+10)+"px";
  document.getElementById("outerdiv").style.height= (headerHeight+220)+"px";
  document.getElementById("outerdiv_noformbottomborder").style.top=(headerHeight+221)+"px";
  document.getElementById("extremout").style.height= (headerHeight+284)+"px";
  document.getElementById("footerLinks").style.top= (headerHeight+239)+"px";
  document.getElementById("outerdiv_noformrightslice").style.height= (headerHeight+215)+"px";
  document.getElementById("outrdivborder").style.height=(headerHeight+221)+"px";
}

function calculateNoFormImgBrdrCssPropertiesthankyou()
{ 

 // Retrieve region div heights
  var headerHeight = document.getElementById("servformleftcopy1").offsetHeight;
  document.getElementById("servformleftcopy1").style.height= headerHeight+"px";
  document.getElementById("serviceformwhiteborder").style.height= headerHeight+"px";
  document.getElementById("innerbox").style.height= (headerHeight+10)+"px";
  document.getElementById("outerdiv").style.height= (headerHeight+220)+"px";
  document.getElementById("outerdiv_noformbottomborder").style.top=(headerHeight+221)+"px";
  document.getElementById("extremout").style.height= (headerHeight+284)+"px";
  document.getElementById("footerLinks").style.top= (headerHeight+239)+"px";
  document.getElementById("outerdiv_noformrightslice").style.height= (headerHeight+215)+"px";
  document.getElementById("outrdivborder").style.height=(headerHeight+221)+"px";
  
  for (i = 0; i < 4; i=i+2){
  var j = i+1;
  if(document.getElementById('sp'+i)!= null && document.getElementById('sp'+j) != null){
   if(document.getElementById('sp'+i).offsetHeight > document.getElementById('sp'+j).offsetHeight)
      document.getElementById('sp'+j).style.height = document.getElementById('sp'+i).offsetHeight;
      else   
    document.getElementById('sp'+i).style.height = document.getElementById('sp'+j).offsetHeight;
  }
 }
}


function calculateNoFormAdSenseBrdrCssProperties()
{ 

 // Retrieve region div heights
  var headerHeight = document.getElementById("servformleftcopyadsense").offsetHeight;
  document.getElementById("servformleftcopyadsense").style.height= headerHeight+"px";
  document.getElementById("serviceformwhiteborderadsense").style.height= (headerHeight+2)+"px";
  document.getElementById("innerboxadsense").style.height= (headerHeight+10)+"px";
  document.getElementById("outerdivadsense").style.height= (headerHeight+220)+"px";
  document.getElementById("outerdiv_noformbottomborderadsense").style.top=(headerHeight+221)+"px";
  document.getElementById("extremoutadsense").style.height= (headerHeight+284)+"px";
  document.getElementById("footerlinksadsense").style.top= (headerHeight+239)+"px";
  document.getElementById("outerdiv_noformrightsliceadsense").style.height= (headerHeight+208)+"px";
  document.getElementById("outrdivborderadsense").style.height=(headerHeight+221)+"px";
}


function calculateIndexImgBrdrCssProperties() { 


   // Retrieve region div heights
  var headerHeight = document.getElementById("indexformpage").offsetHeight;

  var indexForm=headerHeight+240;
  var whiteBorder=indexForm+1;
  var innerboxBottomBrd=indexForm+250;
  var innerboxRightSlice=indexForm-5;
  var outerdivRightSlice=indexForm+15;
 
  
  if(document.getElementById("submitBtn")!=null)
  {
  	document.getElementById("submitBtn").style.top=headerHeight+10;
  }
  document.getElementById("whiteborderonindex").style.height=whiteBorder;
  document.getElementById("indexform").style.height=indexForm;
  document.getElementById("innerbox_bottomborder").style.top=676;
  document.getElementById("innerbox_rightslice").style.height=innerboxRightSlice+6;
  document.getElementById("dottedline2").style.top=468;
  document.getElementById("dottedline").style.top=400;
  document.getElementById("innerbox_rightslice").style.top=311;
  document.getElementById("innerbox").style.height=indexForm+350;
  document.getElementById("outerdiv").style.height=indexForm+560;
  document.getElementById("outerdiv_bottomborder").style.top=indexForm+576;
  document.getElementById("extremout").style.height=indexForm+611;
  document.getElementById("footerLinks").style.top=indexForm+575;
  document.getElementById("outerdiv_rightslice").style.height=indexForm+545;
  document.getElementById("outrdivborder").style.height=indexForm+471;
 
 
  
}

function calculatePreformImgBrdrCssProperties() { 


  // Retrieve region div heights
  var headerHeight = document.getElementById("indexformpage").offsetHeight;
  var indexForm=headerHeight+240;
  var whiteBorder=indexForm+1;
  var innerboxBottomBrd=indexForm+250;
  var innerboxRightSlice=indexForm-5;
  var outerdivRightSlice=indexForm+15;
 
  
  if(document.getElementById("submitBtn")!=null)
  {
  	document.getElementById("submitBtn").style.top=headerHeight+10;
  }
  document.getElementById("whiteborderonpreform").style.height=whiteBorder;
  document.getElementById("indexform").style.height=indexForm;
  document.getElementById("innerbox_bottomborder").style.top=innerboxBottomBrd+60;
  document.getElementById("innerbox_rightslice").style.height=innerboxRightSlice;
  if(document.getElementById("dottedline2")!=null)
  {
  	document.getElementById("dottedline2").style.top=indexForm+100;
  }
  document.getElementById("innerbox").style.height=indexForm+350;
  document.getElementById("outerdiv").style.height=indexForm+560;
  document.getElementById("outerdiv_bottomborder").style.top=indexForm+576;
  document.getElementById("extremout").style.height=indexForm+611;
  document.getElementById("footerLinks").style.top=indexForm+575;
  document.getElementById("outerdiv_rightslice").style.height=indexForm+545;
  document.getElementById("outrdivborder").style.height=indexForm+471;
  document.getElementById("submitBtn").style.top=headerHeight+40;
  document.getElementById("processing1").style.top=headerHeight+40;
  
}

function calculateIndexAndFormImgBrdrCssProperties1() { 

  // Retrieve region div heights
  var headerHeight = document.getElementById("form001").offsetHeight;
  
   
  var indexForm=headerHeight;
  var whiteBorder=indexForm+1;
  var innerboxBottomBrd=indexForm+100;
  var innerboxRightSlice=indexForm-5;
  var outerdivRightSlice=indexForm+15;
 
  document.getElementById("indexformonform").style.height=headerHeight+240;
  document.getElementById("submitBtn001").style.top=headerHeight+25;
  document.getElementById("processingform").style.top=headerHeight-160;
  document.getElementById("form001").style.height=headerHeight;
  document.getElementById("form_findmebestwin").style.top=document.getElementById("welcometoresource").offsetHeight+40;
  document.getElementById("whiteborderonform").style.top=document.getElementById("welcometoresource").offsetHeight+22;
  document.getElementById("forminnerbox_rightslice").style.top=document.getElementById("welcometoresource").offsetHeight+22;
  document.getElementById("formdottedline").style.top=document.getElementById("welcometoresource").offsetHeight+110;
  document.getElementById("leftarrowonform").style.top=document.getElementById("welcometoresource").offsetHeight-70;
  
  document.getElementById("whiteborderonform").style.height=headerHeight+235;
  
  
  document.getElementById("forminnerbox_bottomborder").style.top=headerHeight+340;

  document.getElementById("forminnerbox_rightslice").style.height=headerHeight+240;
  if(document.getElementById("formdottedline2")!=null)
  {
  	document.getElementById("formdottedline2").style.top=headerHeight+300;
  }
  
  
  document.getElementById("innerbox").style.height=headerHeight+369;
  document.getElementById("outerdiv").style.height=headerHeight+579;
  document.getElementById("outerdiv_bottomborder").style.top=headerHeight+595;
  document.getElementById("extremout").style.height=headerHeight+630;
  document.getElementById("footerLinks").style.top=headerHeight+594;
  document.getElementById("outerdiv_rightslice").style.height=headerHeight+564;
  document.getElementById("outrdivborder").style.height=headerHeight+490;
  
}




function openWin(page,win_width,win_height) {

    try {
    	popup_window.close();
    } catch(e) {
					
    }

    if ( page.indexOf("mailto") == -1 ) {
    	var options = "scrollbars=yes, width=" + win_width + ", height=" + win_height;
    	var win = window.open(page, 'MyWin', options);
    	if (window.focus) { win.focus() }
    }
}

function openPopupWindow(page) {

    try {
    	popup_window.close();
    } catch(e) {
					
    }
   var win_width = '517px';
   var win_height = '460px';
   if (page=='popups/options.jsp')
   {
   	win_width = '630px';
	win_height = '700px';
   }

    if ( page.indexOf("mailto") == -1 ) {
    	var options = "scrollbars=yes, width=" + win_width + ", height=" + win_height;
    	var win = window.open(page, 'MyWin', options);
    	if (window.focus) { win.focus() }
    }
}


function doProcessing() {
  document.getElementById('submitBtn').className = 'thide'; 	
  document.getElementById('processing').className = 'tshow';
}
function doProcessing1() {
  document.getElementById('submitBtn001').className = 'thide'; 	
  document.getElementById('processingform').className = 'tshow';
}

function doPreformProcessing() {
  document.getElementById('submitBtn').className = 'thide'; 	
  document.getElementById('processing1').className = 'tshow';
}



function doProcessingNoForm()
{
  document.getElementById('serviceform_submit').className = 'thide'; 	
  document.getElementById('serviceform_processing').className = 'tshow';
}
