var xmlHttp
 function show_page(str)
{
	  
xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="compare_credit_card.php?type="+str
   
 xmlHttp.onreadystatechange=stateChanged_comp
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_comp() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("hide_page_div").style.display = 'none';
   document.getElementById("show_page_div").style.display = '';
   document.getElementById("show_page_div").innerHTML = xmlHttp.responseText
  } 
}
//------------------------------------------------------ show laon ------------------------------------------
 function show_page_loan(str)
{
	  
xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="compare_loan.php?type="+str
   
 xmlHttp.onreadystatechange=stateChanged_compl
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_compl() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("hide_page_div").style.display = 'none';
   document.getElementById("show_page_div").style.display = '';
   document.getElementById("show_page_div").innerHTML = xmlHttp.responseText
  } 
}
//------------------------------------------------------car insurance---------------------------------------
function show_page_ins_car(str)
{
	  
xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="compare_ins_car.php?type="+str
   
 xmlHttp.onreadystatechange=stateChanged_car
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_car() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("hide_page_div").style.display = 'none';
   document.getElementById("show_page_div").style.display = '';
   document.getElementById("show_page_div").innerHTML = xmlHttp.responseText
  } 
}
//----------------------------------------------------  CARD DETAIL  ----------------------------------------

 function show_page_detail(str)
{

xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="compare_credit_card_detail.php?type="+str
  
 xmlHttp.onreadystatechange=stateChanged_comp_detail
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_comp_detail() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 
 document.getElementById("hide_page_div").style.display = 'none';
   document.getElementById("show_page_div").style.display = '';
   document.getElementById("show_page_div").innerHTML = xmlHttp.responseText
  } 
}
/*----------------------------------------- label value-------------------------------------------*/

 function show_name_saving(str,id,upval)
{
 
xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="compare_credit_card_label.php?type="+str+"&id="+id+"&upval="+upval+"&saving=saving" 
 
 if(id==1)  
 xmlHttp.onreadystatechange=stateChanged_comp_detail_lavel_1
 if(id==2) 
 xmlHttp.onreadystatechange=stateChanged_comp_detail_lavel_2
if(id==3) 
 xmlHttp.onreadystatechange=stateChanged_comp_detail_lavel_3
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function show_name(str,id,upval,loan)
{
	alert('hello')
 xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="compare_credit_card_label.php?type="+str+"&id="+id+"&upval="+upval+"&loan="+loan
 
 if(id==1)  
 xmlHttp.onreadystatechange=stateChanged_comp_detail_lavel_1
 if(id==2) 
 xmlHttp.onreadystatechange=stateChanged_comp_detail_lavel_2
if(id==3) 
 xmlHttp.onreadystatechange=stateChanged_comp_detail_lavel_3
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_comp_detail_lavel_1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
	 
    document.getElementById("label1").style.display = '';
    document.getElementById("label1").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_comp_detail_lavel_2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
     document.getElementById("label2").style.display = '';
   document.getElementById("label2").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_comp_detail_lavel_3() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
     document.getElementById("labe13").style.display = '';
   document.getElementById("labe13").innerHTML = xmlHttp.responseText
  } 
}
//----------------------------------sub tab select-----------------------------
 function show_sub_tab(str,id)
{
	
  xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="sub_tab_select.php?type="+str+"&id="+id
 
if(id==1)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_tab
}
else if(id==2)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_tab1	
}
else
{
	 xmlHttp.onreadystatechange=stateChanged_show_sub_tab2	
}

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_show_sub_tab() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab1").style.display = 'none';
   document.getElementById("show_sub_tab1").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_tab1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab2").style.display = 'none';
   document.getElementById("show_sub_tab2").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_tab2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab3").style.display = 'none';
   document.getElementById("show_sub_tab3").innerHTML = xmlHttp.responseText
  } 
}
//--------------------------------------------------------loan sub tab --------------------------------
function show_sub_tab_saving(str,id)
{
	
  xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="sub_tab_select.php?type="+str+"&id="+id+"&saving=saving"
 
if(id==1)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_tab_loan
}
else if(id==2)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_tab1_loan	
}
else
{
	 xmlHttp.onreadystatechange=stateChanged_show_sub_tab2_loan	
}

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}


function show_sub_tab_loan(str,id)
{
	
  xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="sub_tab_select.php?type="+str+"&id="+id+"&loan=loan"
 
if(id==1)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_tab_loan
}
else if(id==2)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_tab1_loan	
}
else
{
	 xmlHttp.onreadystatechange=stateChanged_show_sub_tab2_loan	
}

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_show_sub_tab_loan() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab1").style.display = 'none';
   document.getElementById("show_sub_tab1").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_tab1_loan() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab2").style.display = 'none';
   document.getElementById("show_sub_tab2").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_tab2_loan() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab3").style.display = 'none';
   document.getElementById("show_sub_tab3").innerHTML = xmlHttp.responseText
  } 
}
//--------------------------------------------------------insurance car loan  sub tab --------------------------------
function show_sub_tab_car_ins(str,id)
{
	
  xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="sub_tab_select.php?type="+str+"&id="+id+"&ins=car"
 
if(id==1)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_ins_car
}
else if(id==2)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_ins_car1
}
else
{
	 xmlHttp.onreadystatechange=stateChanged_show_sub_ins_car2
}

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_show_sub_ins_car() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab1").style.display = 'none';
   document.getElementById("show_sub_tab1").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_ins_car1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab2").style.display = 'none';
   document.getElementById("show_sub_tab2").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_ins_car2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab3").style.display = 'none';
   document.getElementById("show_sub_tab3").innerHTML = xmlHttp.responseText
  } 
}
//--------------------------------------------------------insurance home    sub tab --------------------------------
function show_sub_tab_home_ins(str,id)
{
	
  xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="sub_tab_select.php?type="+str+"&id="+id+"&ins=home"
 
if(id==1)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_ins_home
}
else if(id==2)
{
 xmlHttp.onreadystatechange=stateChanged_show_sub_ins_home1
}
else
{
	 xmlHttp.onreadystatechange=stateChanged_show_sub_ins_home2
}

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_show_sub_ins_home() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab1").style.display = 'none';
   document.getElementById("show_sub_tab1").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_ins_home1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab2").style.display = 'none';
   document.getElementById("show_sub_tab2").innerHTML = xmlHttp.responseText
  } 
}
function stateChanged_show_sub_ins_home2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  
 
   document.getElementById("hide_sub_tab3").style.display = 'none';
   document.getElementById("show_sub_tab3").innerHTML = xmlHttp.responseText
  } 
}

//--------------------------------------------------------------

function show_companies(str)
{
	xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="credit_card_company.php?type="+str
  
 xmlHttp.onreadystatechange=stateChanged_company
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
	
}

function stateChanged_company() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  document.getElementById("hide_page_div").style.display = 'none';
   document.getElementById("show_page_div").style.display = '';
   document.getElementById("show_page_div").innerHTML = xmlHttp.responseText
  } 
}

 function showArticles()
{
	  
xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="show_articles.php";
 
 xmlHttp.onreadystatechange=stateChanged_art
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_art() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
    document.getElementById("show_articles").innerHTML = xmlHttp.responseText
  } 
}

 function showNews()
{
	  
xmlHttp=GetXmlHttpObject()
 
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="wp-news.php";
 
 xmlHttp.onreadystatechange=stateChanged_news
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_news() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
    document.getElementById("latestNewsGroup").innerHTML = xmlHttp.responseText
  } 
}



function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}// JavaScript Document
 





 