// JavaScript Document

// Marquee text in status bar : Kiran Anthony 07-06-07

var data = " Best Viewed in Microsoft Internet Explorer 6.0 and above... !!!  ";    // Message to be display 
var limit="                        ";    // define bounce limit 
var message1=limit+'*'+data+'*'+limit; 
var direction = "left"; 
var speed = 200; 

function bounce() 
{ 
if (direction == "left") 
  { 
    message2=message1.substring(2,message1.length)+"  ";//alert()
    window.status=message2; 
    setTimeout("bounce();",speed); 
    message1=message2; 
    if (message1.substring(0,1) == "*") 
     direction="right"; 
  } 
else 
  { 
    message2="  "+message1.substring(0,message1.length-2); 
    window.status=message2; 
    setTimeout("bounce();",speed); 
    message1=message2; 
    if (message1.substring(message1.length-1,message1.length) == "*") 
     direction="left"; 
  } 
} 
bounce() 



//////////////

function openWindowLink(objUrl)
{
window.open(objUrl,'mywindow','width=' + screen.width + ', height=' + screen.height + ',left=0, top=0,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
}

/*function financeCalculator(){

	openWindowLink('http://www.wesbank.co.za/fastapp/gmsa/calculator/index.asp');
}*/



function financeCalculator(){
	
	openFixedWindow('https://www.wesbank.co.za/WesBankCoZa/calculators/loanamount/index.jspx?siteID=gmsa')
}

function openFixedWindow(objUrl)
{
	alert('Disclaimer:  The finance calculators are not the property of GMSA and therefore not controlled by GMSA.');
window.open(objUrl,'popup','top=75, left=25, toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizeable=no,width=490,height=360');
}


function ItemChange()

            {

                        var brandUrl= document.getElementById("models")

                        if(brandUrl.value!="")

                        {

                                    if(brandUrl.value==2)

                                    {

                                                document.location  = brandUrl.value;

                                    }

                                    else

                                    {

                                                document.location  = brandUrl.value;

                                    }

 

                        }

                        

            }
function dealerLocator(){
	location.href="/content_data/LAAM/ZA/en/GBPZA/999/dealer_locator/dealerlocator.html?deriv_cd=1?modelCd=GMSA";
}
function onlineBooking(){
	if(modelName=="999")
		location.href="/GBPServiceMgr2.dyn?CntryCd=ZA&LangCd=en&WebSiteID=GBPZA&ReqsType=Pull&ServiceName=GlobalComponent&func=TestDrive&NampltCdTD=999";
	else		location.href="/GBPServiceMgr2.dyn?CntryCd=ZA&LangCd=en&WebSiteID=GBPZA&ReqsType=Pull&ServiceName=GlobalComponent&func=TestDrive&NampltCdTD=999";

}
function contactUs(){
	if(modelName=="999")
		location.href="/GBPServiceMgr2.dyn?CntryCd=ZA&LangCd=en&WebSiteID=GBPZA&ReqsType=Pull&ServiceName=GlobalComponent&func=ContactUs&NampltCdCU=999";
	else
		location.href="/GBPServiceMgr2.dyn?CntryCd=ZA&LangCd=en&WebSiteID=GBPZA&ReqsType=Pull&ServiceName=GlobalComponent&func=ContactUs&NampltCdCU=999";
}
function gvtOrder(){
	if(modelName=="999")
				location.href="/content_data/LAAM/ZA/en/GBPZA/gbl/govt_order.html?modelCd=999";
	else
				location.href="/content_data/LAAM/ZA/en/GBPZA/gbl/govt_order.html?modelCd=999";
}
function track_trace(){
	if(modelName=="999")
		location.href="/content_data/LAAM/ZA/en/GBPZA/gbl/TrackAndTrace.html?modelCd=999";
	else
		location.href="/content_data/LAAM/ZA/en/GBPZA/gbl/TrackAndTrace.html?modelCd=999";
}
function sitemap()
{
	//alert(modelName);
	if(modelName=="999")
		location.href="/content_data/LAAM/ZA/en/GBPZA/999/footer/sitemap.html";
	else
		location.href="/content_data/LAAM/ZA/en/GBPZA/999/footer/sitemap.html";
}
function home()
{
	if(modelName=="999")
		location.href="/content_data/LAAM/ZA/en/GBPZA/999/index.html";
	else
		location.href="/content_data/LAAM/ZA/en/GBPZA/999/index.html";
}

function populateHeader()
{
document.write("<TABLE height=40 cellSpacing=0 cellPadding=0 width=776 border=0>"+
"  <TBODY>"+
 "   <TR>"+ 
 "     <TD vAlign=top rowSpan=2><A href='http://www.gmsa.com'>"+
"	  <IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/GM_logo.jpg' border=0></A></TD>"+


"    </TR>"+
"  </TBODY>"+
"</TABLE>")
}


function populateHeaderTT()
{
document.write("<TABLE height=40 cellSpacing=0 cellPadding=0 width=776 border=0>"+
"  <TBODY>"+
 "   <TR>"+ 
 "     <TD vAlign=top rowSpan=2><A href='http://www.gmsa.com'>"+
"	  <IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/GM_logo.jpg' border=0></A></TD>"+
"      <TD vAlign=top colSpan=2> <TABLE height=20 width='100%' align=right bgColor=#003399 border=0>"+
"          <TBODY>"+
"            <TR>"+ 
"              <TD align=right><A class=headerTopmenu href='javaScript:dealerLocator();'>&nbsp;Your Nearest Dealer&nbsp;&nbsp; </A></TD>"+
/*"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/whitedot.gif'></TD>"+
"              <TD align=right><A href='/content_data/LAAM/ZA/en/GBPZA/999/header/finance/lease.html'  class=headerTopmenu >&nbsp;Finance&nbsp;</A></TD>"+*/
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/whitedot.gif'></TD>"+
"              <TD align=right><A class=headerTopmenu href='javaScript:onlineBooking();'>&nbsp;On-Line Booking&nbsp;&nbsp; </A></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/whitedot.gif'></TD>"+
"              <TD align=right><A href='/content_data/LAAM/ZA/en/GBPZA/999/header/Services/our_goal.html' class=headerTopmenu>&nbsp;Services&nbsp;&nbsp;</A></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/whitedot.gif'></TD>"+
"              <TD align=right><A href='/content_data/LAAM/ZA/en/GBPZA/999/news.html' class=headerTopmenu>&nbsp;News&nbsp;&nbsp;</A></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/whitedot.gif'></TD>"+
"              <TD align=right><A href='/content_data/LAAM/ZA/en/GBPZA/gbl/TrackAndTrace.html?modelCd=999' class=headerTopmenu>&nbsp;Track&Trace&nbsp;&nbsp;</A></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/whitedot.gif'></TD>"+
//"              <TD align=right><A href='/content_data/LAAM/ZA/en/GBPZA/999/header/media_merchandise/wallpaper.html' class=headerTopmenu>Media&amp;Merchandise</A></TD>"+
"              <TD align=right><A href='/content_data/LAAM/ZA/en/GBPZA/999/header/media_merchandise/wallpaper.html' class=headerTopmenu>&nbsp;Media&nbsp;&nbsp;</A></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/whitedot.gif'></TD>"+
"              <TD align=right><A class=headerTopmenu href='http://www.gmsafleetsales.co.za' target='blank'>&nbsp;Fleet&nbsp;&nbsp;</A></TD>"+

"                <TD align=right><SELECT style='FONT-SIZE: 9px; FONT-FAMILY: arial' onchange=ItemChange()  id='models'>"+

"                    <option selected>GM Brand Web sites</option>"+

"                    <option value='http://www.chevrolet.co.za'>Chevrolet</option>"+
"                    <option value='http://www.opel.co.za'>Opel</option>"+
"                    <option value='http://www.isuzu.co.za'>Isuzu</option>"+
//"                    <option value='http://www.isuzutrucks.co.za'>Isuzu Trucks</option>"+
	"                    <option value='http://www.g2cars.com'>G2 Used Cars</option>"+

//"                    <option value='http://www.isuzuusedtrucks.co.za'>Used Trucks</option>"+
//"                    <option value='http://www.grandvitara.co.za'>Suzuki</option>"+

"                    <option value='http://www.hummer.co.za '>HUMMER</option>"+
"                    <option value='http://www.saab.com/main/ZA/en/index_flash.shtml'>SAAB</option>"+
"                    <option value='http://www.cadillac.co.za'>Cadillac</option>"+

"                  </SELECT> </TD>"+
"            </TR>"+
"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+
/*"    <TR>"+
"      <TD style='FONT-SIZE: 0px' vAlign=center align=right>"+ 
	"  <A href='http://www.g2cars.com'><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/G2-logo.jpg' height=22 width=93 border=0></A>"+  
"    <A href='/content_data/LAAM/ZA/en/GBPZA/999/showroom_advisor/showroom.html'>&nbsp;<IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/gmsa_showroom.jpg' width='139' height='20' border=0></A>"+  
"        &nbsp;&nbsp;&nbsp;</TD>"+
"    </TR>"+*/


"    <TR>"+ 
"      <TD>"+
"<table width='100%' border='0' cellpadding='0' cellspacing='0'>"+
"      <tr  align='right'>"+
"        <td><img src='/content_data/LAAM/ZA/en/GBPZA/999/images/GMSA.jpg' width='90' height='11'></td>"+
"        <td align='right'>"+
/*	"<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='212' height='20'>"+
"            <param name='movie' value='/content_data/LAAM/ZA/en/GBPZA/999/images/flash/autoafrica_banner.swf'>"+
"            <param name='quality' value='high'>"+
"            <embed src='/content_data/LAAM/ZA/en/GBPZA/999/images/flash/autoafrica_banner.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='212' height='20'></embed>"+
"        </object>"+*/
"</td>"+
"        <td><a href='/content_data/LAAM/ZA/en/GBPZA/999/header/finance/National_Credit_Act.html?deriv_cd=1?modelCd=GMSA'><img src='/content_data/LAAM/ZA/en/GBPZA/999/images/gmsa_finance.jpg' width='158' height='20' border='0'></a></td>"+
"        <td><a href='http://www.g2cars.com'><img src='/content_data/LAAM/ZA/en/GBPZA/999/images/G2-logo.jpg' width='93' height='22' border='0'></a></td>"+
"        <td><a href='/content_data/LAAM/ZA/en/GBPZA/999/showroom_advisor/showroom.html'><img src='/content_data/LAAM/ZA/en/GBPZA/999/images/gmsa_showroom.jpg' width='139' height='20' border='0'></a></td>"+


"        <td><a href='/content_data/LAAM/ZA/en/GBPZA/999/brandsite/special_offer.html?modelCd=999'><img src='/content_data/LAAM/ZA/en/GBPZA/999/images/gmsa_specialprices.jpg' border='0'></a></td>"+

//Red Tag campaign"        <td><a href='/content_data/LAAM/ZA/en/GBPZA/999/brandsite/redTag_Events.html?modelCd=999'><img src='/content_data/LAAM/ZA/en/GBPZA/999/images/gmsa_specialprices.jpg' border='0'></a></td>"+
"      </tr>"+
"    </table>"+
"</TD>"+
"    </TR>"+

"  </TBODY>"+
"</TABLE>")
}




function populateFooter()
{
document.write("<TABLE cellSpacing=0 cellPadding=0 width=776 border=0>"+
"  <TBODY>"+
"    <TR bgColor=silver>"+ 
"      <TD></TD>"+
"    </TR>"+
"    <TR>"+ 
"      <TD style='FONT-SIZE: 0px'><IMG height=2 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=0px> </TD>"+
"    </TR>"+
"    <TR bgColor=silver>"+ 
"      <TD></TD>"+
"    </TR>"+
"    <TR>"+ 
"      <TD style='FONT-SIZE: 0px'><IMG height=2 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=0px> </TD>"+
"    </TR>"+
"    <TR>"+ 
"      <TD align=middle bgColor=silver> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"          <TBODY>"+
"            <TR>"+ 
"              <TD align=middle><A href='/content_data/LAAM/ZA/en/GBPZA/999/footer/our_contact_details.html'  class=footerFont>Our Contact Details</A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=15 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A href='/content_data/LAAM/ZA/en/GBPZA/999/footer/legal_and_privacy_policy.html'   class=footerFont>Legal &amp; Privacy </A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=15 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A href='/content_data/LAAM/ZA/en/GBPZA/999/footer/disclaimer.html'  class=footerFont>Disclaimer</A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A href='/content_data/LAAM/ZA/en/GBPZA/999/footer/information_act.html'  class=footerFont>Information Act </A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A class=footerFont href='javascript:contactUs();'>Contact Us</A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A href='javascript:sitemap();' class=footerFont >Site Map </A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/999/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/999/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A class=footerFont href='javascript:home();'>Home</A></TD>"+
"            </TR>"+
"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+
"  </TBODY>"+
"</TABLE><BR>")
}




function populateFooter1()
{
document.write("<TABLE cellSpacing=0 cellPadding=0 width=100% border=0>"+
"  <TBODY>"+
"    <TR bgColor=silver>"+ 
"      <TD></TD>"+
"    </TR>"+
"    <TR>"+ 
"      <TD style='FONT-SIZE: 0px'><IMG height=2 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=0px> </TD>"+
"    </TR>"+
"    <TR bgColor=silver>"+ 
"      <TD></TD>"+
"    </TR>"+
"    <TR>"+ 
"      <TD style='FONT-SIZE: 0px'><IMG height=2 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=0px> </TD>"+
"    </TR>"+
"    <TR>"+ 
"      <TD align=middle bgColor=silver> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"          <TBODY>"+
"            <TR>"+ 
"              <TD align=middle><A href='#'  onclick=openWindowLink('/content_data/LAAM/ZA/en/GBPZA/999/footer/our_contact_details.html')   class=footerFont>Our Contact Details</A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=15 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A href='#'  onclick=openWindowLink('/content_data/LAAM/ZA/en/GBPZA/999/footer/legal_and_privacy_policy.html')    class=footerFont>Legal &amp; Privacy </A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=15 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A href='#'  onclick=openWindowLink('/content_data/LAAM/ZA/en/GBPZA/999/footer/disclaimer.html')   class=footerFont>Disclaimer</A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A href='#'  onclick=openWindowLink('/content_data/LAAM/ZA/en/GBPZA/999/footer/information_act.html')   class=footerFont>Information Act </A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD align=middle><A class=footerFont href='javascript:contactUs();'>Contact Us</A></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/black_dot.gif'></TD>"+
"              <TD style='FONT-SIZE: 0px'><IMG height=10 src='/content_data/LAAM/ZA/en/GBPZA/019/images/spacer.gif' width=8 border=0></TD>"+


"              <TD align=middle><A class=footerFont href='javascript:home();'>Home</A></TD>"+
"            </TR>"+
"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+
"  </TBODY>"+
"</TABLE>")
}
