// ***************************************************************************************************
// Filename      :  /js/windowmanager.js
// Author        :  Scott Westerfield
// Date/Time     :  06-13-2002
// Purpose       :  Configuration for the windowmanager.The window manager will use the
// 					javascript functions UFWindowCreate and UFWindowClose, WMSimpleFunction
// Parameters    :  N/A
// Revisions     :  N/A
// ***************************************************************************************************


// ========================
// Windows Conf
// -------
// Use this area to describe the pop-up windows on the site.
// sName = Array (sType, sScreenLocation, sScrollable, sResizable, iWidth, iHeight)
// -------
aWMWindowConf = new Array();
aWMWindowConf["compare"] = new Array("compact","center","yes","no",675,510);
aWMWindowConf["build"] = new Array("small","center","yes","no",668,510);
aWMWindowConf["offers"] = new Array("small","center","yes","no",650,510);
aWMWindowConf["email"] = new Array("compact","center","no","no",350,515);
aWMWindowConf["info"] = new Array("compact","center","yes","no",460,510);
aWMWindowConf["finance"] = new Array("small","center","yes","no",650,510);
aWMWindowConf["calculators"] = new Array("small","center","yes","no",650,510);
aWMWindowConf["savings_calculator"] = new Array("compact","center","no","no",704,510);
aWMWindowConf["locator"] = new Array("compact","center","yes","no",695,510);
aWMWindowConf["modelsgallery"] = new Array("compact","topleft","yes","no",666,540);
aWMWindowConf["modelsgallery360"] = new Array("compact","topleft","no","no",532,434);
aWMWindowConf["modelsgalleryvideo"] = new Array("compact","topleft","no","no",320,275);
aWMWindowConf["accessorydetail"] = new Array("compact","topleft","yes","no",552,540);
aWMWindowConf["trimlevels"] = new Array("compact","center","yes","no",650,510);
aWMWindowConf["awards"] = new Array("compact","topleft","yes","no",370,510);
aWMWindowConf["hondacare"] = new Array("compact","topleft","yes","no",443,510);
aWMWindowConf["brochure"] = new Array("compact","center","yes","no",370,510);
aWMWindowConf["safetyengineering"] = new Array("compact","center","no","no",320,510);
aWMWindowConf["hybrid_mileage_calc"] = new Array("compact","center","yes","no",350,510);
aWMWindowConf["presidentsaward"] = new Array("compact","topleft","no","no",500,400);
aWMWindowConf["ribbon"] = new Array("compact","topleft","yes","no",820,600);
aWMWindowConf["financing_benefits"] = new Array("compact","center","yes","no",485,510);
aWMWindowConf["tools"] = new Array("compact","center","yes","yes",800,600);
aWMWindowConf["tax_info"] = new Array("compact","center","no","no",635,700);
aWMWindowConf["tax_highlights"] = new Array("compact","center","no","no",400,610);

aWMWindowConf["windowtest"] = new Array("standard","center","yes","yes",10,10);



// ========================
// Simple Fucntion Conf
// -------
// sFunction = Array (sWindowName, sURL, bParams)
// -------
aWMSimpleFunctionsConf = new Array
// tax info window
aWMSimpleFunctionsConf["tax_info"] = new Array ('tax_info','/info/clean_fuel_tax_info.asp',true);

// tax highlight window
aWMSimpleFunctionsConf["tax_highlights"] = new Array ('tax_highlights','/info/clean_fuel_tax_highlights.asp',true);

// use tools window
aWMSimpleFunctionsConf["tax_press"] = new Array ('tools','/images/banners/info/clean_fuel_tax_press.pdf',false);
aWMSimpleFunctionsConf["elementmicrosite"] = new Array ('tools','/theelement/bonus.asp',false);
aWMSimpleFunctionsConf["standard"] = new Array ('tools','/info/exit_meta_redirect.asp',true);

// Uses ribbon Window
aWMSimpleFunctionsConf["ribbon"] = new Array ('ribbon','/info/ribbon.asp',false);

// Uses compare Window
aWMSimpleFunctionsConf["compare"] = new Array ('compare','/tools/frameset.asp?Function=compare',true);
// Uses build Window
aWMSimpleFunctionsConf["configurator"] = new Array ('build','/tools/customize/entry.asp?Function=configurator',true);
aWMSimpleFunctionsConf["get_a_quote"] = new Array ('build','/tools/frameset.asp?Function=get_a_quote',true);
aWMSimpleFunctionsConf["hcuc_search"] = new Array ('build','/tools/frameset.asp?function=hcuc_search',false);
aWMSimpleFunctionsConf["hcuc_search_results"] = new Array ('build','/tools/frameset.asp?function=hcuc_search_results',false);
aWMSimpleFunctionsConf["saved_configuration"] = new Array ('build','/tools/customize/step7.asp',true);
aWMSimpleFunctionsConf["sign_in"] = new Array ('build','/tools/registration/sign_in.asp',true);
// Uses hondacare Window
aWMSimpleFunctionsConf["hondacare"] = new Array ('hondacare','/info/hondacare.asp',true);
// Uses awards Window
aWMSimpleFunctionsConf["awards"] = new Array ('awards','/models/awards_popup.asp',true);
aWMSimpleFunctionsConf["shopping_faqs"] = new Array ('awards','/info/shopping_faqs.asp',false);
// Uses locator Window
aWMSimpleFunctionsConf["dealer_locator"] = new Array ('locator','/tools/locator/landing.asp',false);
aWMSimpleFunctionsConf["dealer_submit"] = new Array ('locator','/tools/locator/default.asp',true);

// Uses calculators Window
aWMSimpleFunctionsConf["hcuc_calculator"] = new Array ('calculators','/tools/frameset.asp?Function=hcuc_calculator',true);
aWMSimpleFunctionsConf["hcuc_rcalculator"] = new Array ('calculators','/tools/frameset.asp?Function=hcuc_rcalculator',true);
aWMSimpleFunctionsConf["estimate_payment"] = new Array ('calculators','/tools/frameset.asp?Function=payment_estimator',true);
aWMSimpleFunctionsConf["lease_payment"] = new Array ('calculators','/tools/frameset.asp?Function=lease_estimator',true);
aWMSimpleFunctionsConf["compare_payment"] = new Array ('calculators','/tools/frameset.asp?Function=compare_estimator',true);
aWMSimpleFunctionsConf["reverse_payment"] = new Array ('calculators','/tools/frameset.asp?Function=reverse_estimator',true);
aWMSimpleFunctionsConf["estimate_spanish"] = new Array ('calculators','/tools/frameset.asp?Function=estimate_spanish',true);

// Uses finance Window
aWMSimpleFunctionsConf["approved_online_vehicle"] = new Array ('finance','/tools/frameset.asp?Function=approved_online_vehicle',false);
aWMSimpleFunctionsConf["approved_online_no_vehicle"] = new Array ('finance','/tools/frameset.asp?Function=approved_online_no_vehicle',false);
aWMSimpleFunctionsConf["initiate_approval"] = new Array ('finance','/tools/frameset.asp?Function=initiate_approval',false);
aWMSimpleFunctionsConf["credit"] = new Array ('finance','/tools/frameset.asp?Function=credit',false);
aWMSimpleFunctionsConf["check_status"] = new Array ('finance','/tools/frameset.asp?Function=check_status',false);
aWMSimpleFunctionsConf["select_dealer"] = new Array ('finance','/tools/frameset.asp?Function=select_dealer',false);
aWMSimpleFunctionsConf["credit_approval"] = new Array ('finance','/tools/frameset.asp?Function=credit_approval',false);
// Uses savings_calculator Window
aWMSimpleFunctionsConf["hybrid_mileage_calc"] = new Array ('savings_calculator','/tools/calculators/mileage_calculator.asp',true)
// Uses offers Window
aWMSimpleFunctionsConf["offers"] = new Array ('offers','/tools/frameset.asp?Function=offers',true);
aWMSimpleFunctionsConf["hcuc_offers"] = new Array ('offers','/tools/frameset.asp?Function=hcuc_offers',false);
aWMSimpleFunctionsConf["hcuc_approval"] = new Array ('offers','/tools/frameset.asp?Function=hcuc_approval',false);


// Uses info Window
aWMSimpleFunctionsConf["homerun_sweepstakes"] = new Array ('info','/info/homerun_sweepstakes.asp',false);
aWMSimpleFunctionsConf["privacy"] = new Array ('info','/info/privacy.asp?section=privacy',false);
aWMSimpleFunctionsConf["legal"] = new Array ('info','/info/privacy.asp?section=legal',false);

//Use email window
aWMSimpleFunctionsConf["email"] = new Array ('email','/tools/email/subscribe.asp',true);

aWMSimpleFunctionsConf["news"] = new Array ('awards','/info/news.asp',true);
// Uses brochure Window
aWMSimpleFunctionsConf["brochure"] = new Array ('brochure','/tools/brochure/request.asp',true)
// Uses modelsgallery Window
aWMSimpleFunctionsConf["modelsgallery"] = new Array ('modelsgallery','/models/popup.asp',true);
aWMSimpleFunctionsConf["modelsgallery360"] = new Array ('modelsgallery360','/models/popup.asp',true);
aWMSimpleFunctionsConf["modelsgalleryvideo"] = new Array ('modelsgalleryvideo','/models/popup.asp',true);
// Uses accessorydetail Window
aWMSimpleFunctionsConf["accessorydetail"] = new Array ('accessorydetail','/models/accessory_detail.asp',true);
// Uses trimlevels Window
aWMSimpleFunctionsConf["trimlevels"] = new Array ('trimlevels','/models/trim_level_desc.asp',true);
// Uses safetyengineering Window
aWMSimpleFunctionsConf["safetyengineering"] = new Array ('safetyengineering','/models/popup.asp',true);
aWMSimpleFunctionsConf["presidentsaward"] = new Array ('presidentsaward','/info/presidentsaward.asp',false);

aWMSimpleFunctionsConf["financing_benefits"] = new Array ('financing_benefits','/info/lease_vs_finance.asp',false);

aWMSimpleFunctionsConf["windowtest"] = new Array ('windowtest','/tools/windowmanager.asp',true);


// ========================
// Complex Fucntion Conf
// -------
// sFunction = Array (javascript functions[...])
// -------
aWMComplexFunctionsConf = new Array
aWMComplexFunctionsConf["build_and_price"] = new Array ("WMSimpleFunction ('configurator','')","WMTopLocation('/landing.asp','')");
aWMComplexFunctionsConf["configurator"] = new Array ("WMExternalPop('get_a_quote','')");
aWMComplexFunctionsConf["get_a_quote"] = new Array ("WMSimpleFunction ('get_a_quote','')","WMTopLocation('/landing.asp','')");
aWMComplexFunctionsConf["select_model"] = new Array ("WMExternalPop('get_a_quote','')");
aWMComplexFunctionsConf["build"] = new Array ("WMExternalPop('configurator','')");

aWMComplexFunctionsConf["specials"] = new Array ("WMSimpleFunction ('offers','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["current_offers"] = new Array ("WMSimpleFunction ('offers','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["offers"] = new Array ("WMSimpleFunction ('offers','')","top.location='/landing.asp'");

aWMComplexFunctionsConf["hondacare_home"] = new Array ("WMSimpleFunction ('hondacare','')","top.location='/landing.asp'");

aWMComplexFunctionsConf["specials_Accord Sedan"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Accord+Sedan'");
aWMComplexFunctionsConf["specials_Accord Coupe"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Accord+Coupe'");
aWMComplexFunctionsConf["specials_Civic Sedan"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Civic+Sedan'");
aWMComplexFunctionsConf["specials_Civic Coupe"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Civic+Coupe'");
aWMComplexFunctionsConf["specials_Civic Si"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Civic Si'");
aWMComplexFunctionsConf["specials_Civic Hybrid"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Civic+Hybrid'");
aWMComplexFunctionsConf["specials_Insight"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Insight'");
aWMComplexFunctionsConf["specials_CR-V"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=CR-V'");
aWMComplexFunctionsConf["specials_Odyssey"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Odyssey'");
aWMComplexFunctionsConf["specials_Pilot"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=Pilot'");
aWMComplexFunctionsConf["specials_S2000"] = new Array ("WMSimpleFunction ('offers','')","top.location='/models/model_overview.asp?ModelName=S2000'");

aWMComplexFunctionsConf["quote_Accord Sedan"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Accord+Sedan')","top.location='/models/model_overview.asp?ModelName=Accord+Sedan'");
aWMComplexFunctionsConf["quote_Accord Coupe"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Accord+Coupe')","top.location='/models/model_overview.asp?ModelName=Accord+Coupe'");
aWMComplexFunctionsConf["quote_Civic Sedan"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Civic+Sedan')","top.location='/models/model_overview.asp?ModelName=Civic+Sedan'");
aWMComplexFunctionsConf["quote_Civic Coupe"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Civic+Coupe')","top.location='/models/model_overview.asp?ModelName=Civic+Coupe'");
aWMComplexFunctionsConf["quote_Civic Si"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Civic+Si')","top.location='/models/model_overview.asp?ModelName=Civic Si'");
aWMComplexFunctionsConf["quote_Civic Hybrid"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Civic+Hybrid')","top.location='/models/model_overview.asp?ModelName=Civic+Hybrid'");
aWMComplexFunctionsConf["quote_Insight"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Insight')","top.location='/models/model_overview.asp?ModelName=Insight'");
aWMComplexFunctionsConf["quote_CR-V"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=CR-V')","top.location='/models/model_overview.asp?ModelName=CR-V'");
aWMComplexFunctionsConf["quote_Odyssey"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Odyssey')","top.location='/models/model_overview.asp?ModelName=Odyssey'");
aWMComplexFunctionsConf["quote_Pilot"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Pilot')","top.location='/models/model_overview.asp?ModelName=Pilot'");
aWMComplexFunctionsConf["quote_S2000"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=S2000')","top.location='/models/model_overview.asp?ModelName=S2000'");
aWMComplexFunctionsConf["quote_Element"] = new Array ("WMSimpleFunction ('get_a_quote','ModelName=Element')","top.location='/models/model_overview.asp?ModelName=Element'");

aWMComplexFunctionsConf["hcuc_offers"] = new Array ("WMSimpleFunction ('hcuc_offers','')","top.location='/certified/landing.asp'");
aWMComplexFunctionsConf["hcuc_specials"] = new Array ("WMSimpleFunction ('hcuc_offers','')","top.location='/certified/landing.asp'");

aWMComplexFunctionsConf["financing_benefits"] = new Array ("WMSimpleFunction ('financing_benefits','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["financing_benefits_pop"] = new Array ("WMExternalPop('financing_benefits','')");

aWMComplexFunctionsConf["privacy_policy"] = new Array ("WMSimpleFunction ('privacy','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["legal_terms"] = new Array ("WMSimpleFunction ('legal','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["privacy_pop"] = new Array ("WMExternalPop('privacy','')");
aWMComplexFunctionsConf["legal_pop"] = new Array ("WMExternalPop('legal','')");

aWMComplexFunctionsConf["close"] = new Array ("WindowClose()");
aWMComplexFunctionsConf["home"] = new Array ("WindowRedirectParent('/landing.asp');","WindowClose()");

aWMComplexFunctionsConf["hcuc_search"] = new Array ("WMSimpleFunction ('hcuc_search','')","top.location='/certified/landing.asp'");
aWMComplexFunctionsConf["hcuc_search_pop"] = new Array ("WMExternalPop('hcuc_search','')");

aWMComplexFunctionsConf["hcuc_search_results"] = new Array ("WMSimpleFunction ('hcuc_search_results','')","top.location='/certified/landing.asp'");
aWMComplexFunctionsConf["hcuc_search_results_pop"] = new Array ("WMExternalPop('hcuc_search_results','')");

aWMComplexFunctionsConf["hcuc_home"] = new Array ("top.location='/certified/landing.asp'");

aWMComplexFunctionsConf["approved_online_vehicle"] = new Array ("WMSimpleFunction ('approved_online_vehicle','')","WindowClose()");
aWMComplexFunctionsConf["approved_online_no_vehicle"] = new Array ("WMSimpleFunction ('approved_online_no_vehicle','')","WindowClose()");
aWMComplexFunctionsConf["initiate_approval"] = new Array ("WMSimpleFunction ('initiate_approval','')","WindowClose()");

aWMComplexFunctionsConf["credit"] = new Array ("WMExternalPop('credit','')");

aWMComplexFunctionsConf["credit_home"] = new Array ("WMSimpleFunction ('credit','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["check_status"] = new Array ("WMExternalPop('check_status','')");

aWMComplexFunctionsConf["check_status_home"] = new Array ("WMSimpleFunction ('check_status','')","top.location='/landing.asp'");

aWMComplexFunctionsConf["select_dealer"] = new Array ("WMExternalPop('select_dealer','')");

aWMComplexFunctionsConf["credit_approval"] = new Array ("WMSimpleFunction ('credit_approval','')","top.location='/landing.asp'");

aWMComplexFunctionsConf["estimate_payment"] = new Array ("WMSimpleFunction ('estimate_payment','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["hcuc_calculator"] = new Array ("WMSimpleFunction ('hcuc_calculator','')","top.location='/certified/landing.asp'");

aWMComplexFunctionsConf["locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/landing.asp'");
aWMComplexFunctionsConf["hcuc_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_submit','d=dealer')","top.location='/certified/landing.asp'");
aWMComplexFunctionsConf["civicgx_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_submit','d=gxd')","top.location='/models/model_overview.asp?ModelName=Civic+GX'");

aWMComplexFunctionsConf["Accord Sedan_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Accord+Sedan'");
aWMComplexFunctionsConf["Accord Coupe_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Accord+Coupe'");
aWMComplexFunctionsConf["Civic Sedan_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Civic+Sedan'");
aWMComplexFunctionsConf["Civic Coupe_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Civic+Coupe'");
aWMComplexFunctionsConf["Civic GX_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_submit','d=gxd')","top.location='/models/model_overview.asp?ModelName=Civic+GX'");
aWMComplexFunctionsConf["Civic Si_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Civic Si'");
aWMComplexFunctionsConf["Civic Hybrid_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Civic+Hybrid'");
aWMComplexFunctionsConf["Insight_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Insight'");
aWMComplexFunctionsConf["CR-V_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=CR-V'");
aWMComplexFunctionsConf["Odyssey_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Odyssey'");
aWMComplexFunctionsConf["Pilot_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Pilot'");
aWMComplexFunctionsConf["S2000_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=S2000'");
aWMComplexFunctionsConf["Element_locate_dealer"] = new Array ("WMSimpleFunction ('dealer_locator','')","top.location='/models/model_overview.asp?ModelName=Element'");

aWMComplexFunctionsConf["home_Accord Sedan"] = new Array ("top.location='/models/model_overview.asp?ModelName=Accord+Sedan'");
aWMComplexFunctionsConf["home_Accord Coupe"] = new Array ("top.location='/models/model_overview.asp?ModelName=Accord+Coupe'");
aWMComplexFunctionsConf["home_Civic Sedan"] = new Array ("top.location='/models/model_overview.asp?ModelName=Civic+Sedan'");
aWMComplexFunctionsConf["home_Civic GX"] = new Array ("top.location='/models/model_overview.asp?ModelName=Civic+GX'");
aWMComplexFunctionsConf["home_Civic Coupe"] = new Array ("top.location='/models/model_overview.asp?ModelName=Civic+Coupe'");
aWMComplexFunctionsConf["home_Civic Si"] = new Array ("top.location='/models/model_overview.asp?ModelName=Civic Si'");
aWMComplexFunctionsConf["home_Civic Hybrid"] = new Array ("top.location='/models/model_overview.asp?ModelName=Civic+Hybrid'");
aWMComplexFunctionsConf["home_Insight"] = new Array ("top.location='/models/model_overview.asp?ModelName=Insight'");
aWMComplexFunctionsConf["home_CR-V"] = new Array ("top.location='/models/model_overview.asp?ModelName=CR-V'");
aWMComplexFunctionsConf["home_Odyssey"] = new Array ("top.location='/models/model_overview.asp?ModelName=Odyssey'");
aWMComplexFunctionsConf["home_Pilot"] = new Array ("top.location='/models/model_overview.asp?ModelName=Pilot'");
aWMComplexFunctionsConf["home_S2000"] = new Array ("top.location='/models/model_overview.asp?ModelName=S2000'");
aWMComplexFunctionsConf["home_Element"] = new Array ("top.location='/models/model_overview.asp?ModelName=Element'");
aWMComplexFunctionsConf["model_home"]= new Array("WMTopLocation('/models/model_overview.asp','')");

aWMComplexFunctionsConf["trim_descriptions"] = new Array ("WMExternalPop('trimlevels','')");

aWMComplexFunctionsConf["espanol_home"] = new Array ("top.location='/setlanguage.asp?language=Spanish&RURL=%2Flanding%2Easp'");
aWMComplexFunctionsConf["news_home"] = new Array ("top.location='/info/news/landing.asp'");

aWMComplexFunctionsConf["email_element"] = new Array ("WMSimpleFunction ('email','ModelName=Element')","top.location='/models/model_overview.asp?ModelName=Element'");

aWMComplexFunctionsConf["ext_gal_element"] = new Array ("top.location='/models/exterior_gallery.asp?ModelName=Element'");

// Old Complex Functions
aWMComplexFunctionsConf["privacy_pop_OLD"] = new Array ("WMSimpleFunction ('privacy','')","WindowClose()");
aWMComplexFunctionsConf["legal_pop_OLD"] = new Array ("WMSimpleFunction ('legal','')","WindowClose()");
aWMComplexFunctionsConf["configurator_OLD"] = new Array ("WMSimpleFunction ('get_a_quote','')","WindowClose()");
aWMComplexFunctionsConf["select_model_OLD"] = new Array ("WMSimpleFunction ('get_a_quote','')","WindowClose()");
aWMComplexFunctionsConf["build_OLD"] = new Array ("WMSimpleFunction ('configurator','')","WindowClose()");
aWMComplexFunctionsConf["financing_benefits_pop"] = new Array ("WMSimpleFunction ('financing_benefits','')","WindowClose()");
aWMComplexFunctionsConf["hcuc_search_pop_OLD"] = new Array ("WMSimpleFunction ('hcuc_search','')","WindowClose()");
aWMComplexFunctionsConf["hcuc_search_results_pop_OLD"] = new Array ("WMSimpleFunction ('hcuc_search_results','')","WindowClose()");


aWMComplexFunctionsConf["credit_OLD"] = new Array ("WMSimpleFunction ('credit','')","WindowClose()");
aWMComplexFunctionsConf["check_status_OLD"] = new Array ("WMSimpleFunction ('check_status','')","WindowClose()");
aWMComplexFunctionsConf["select_dealer_OLD"] = new Array ("WMSimpleFunction ('select_dealer','')","WindowClose()");
aWMComplexFunctionsConf["trim_descriptions_OLD"] = new Array ("WMSimpleFunction ('trimlevels','')","WindowClose()");

//****************************************************************************************************
//Function	: WMcheckBrowser()
//Author	: 
//Date/Time	: 
//Purpose	: 
//Parameters:
//Returns	:
//Revisions	:
//****************************************************************************************************
function WMcheckBrowser(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent.toLowerCase();
	this.dom=document.getElementById?1:0
	this.all=document.all?1:0;
	this.layers=document.layers?1:0;
	this.images=document.images?1:0;
	this.IE = navigator.appName=="Microsoft Internet Explorer"?1:0;
	this.NS = navigator.appName=="Netscape"?1:0;
	this.MAC = (this.agent.indexOf("mac")!=-1);

	return this
}

//****************************************************************************************************
//Function	: WMExternalPop(String Window Manager Function, String Params for Functions)
//Author	: Scott Westerfield
//Date/Time	: 06-25-2002
//Purpose	: 1.  Find the window name for this type function 
//				(privacy pop uses an "info").
//			  2.  Close any existance of the window that this current window will become.  
//				(If the "info" window is already open, close it.)
//			  3.  Resize the window the correct dimensions.  
//				(Look-up the size of the info window and resize the current window to those dimensions.)
//			  4.  Rename the window.  (Rename this current window to be the "info" window.) 
//			  5.  Load the contents.  (Do the simple function)
//Parameters: String - 	Window Manager Function, the function as listed in windowmanager.js
//			  String - 	Params for Functions, parameters to append to the URL in the pop-up
//Returns	: N/A
//Revisions	: N/A
//****************************************************************************************************
function WMExternalPop (sFunction,sParams) {
	oWMBrowser=WMcheckBrowser();
	
	// NewMethod = Resize method
	bNewMethod=false;
	if(bNewMethod) {
		// Step 1
		sWindowName=aWMSimpleFunctionsConf[sFunction][0];
	
		// Step 2
		eval('WMWindow_'+sWindowName+' = window.open("", "WMWin_'+sWindowName+'")');
		eval('WMWindow_'+sWindowName+'.close()');
	
		// Step 3
		self.resizeTo( aWMWindowConf[sWindowName][4], aWMWindowConf[sWindowName][5]);
		
		// Step 4
		self.name='WMWin_'+sWindowName;
	
		// Step 5
		WMSimpleFunction(sFunction,sParams);
	} else {
		WMSimpleFunction(sFunction,sParams);
		WindowClose();
	}
}

//****************************************************************************************************
//Function	: WMSimpleFunction(String Window Manager Function, String Params for Functions)
//Author	: Scott Westerfield
//Date/Time	: 06-25-2002
//Purpose	: This function will use js configuration file windowmanager.js to open a windo
//			  using UFWindowCreate
//Parameters: String - 	Window Manager Function, the function as listed in windowmanager.js
//			  String - 	Params for Functions, parameters to append to the URL in the pop-up
//Returns	: N/A
//Revisions	: N/A
//****************************************************************************************************
function WMSimpleFunction (sFunction,sParams,sDomain) {
	if(aWMSimpleFunctionsConf[sFunction][1]) {
		if(aWMSimpleFunctionsConf[sFunction][2]) {
			aParams=sParams.split("&");
		
			if(aWMSimpleFunctionsConf[sFunction][1].indexOf("?")>-1) {
				sParams="&";
			} else {
				sParams="?";
			}

			for(i=0;i<aParams.length;i++) {
				aParamPair=aParams[i].split("=");
				//aParamPair[1]=escape(aParamPair[1]);
				sParams+=aParamPair[0]+"="+aParamPair[1];
				if((i+1)<aParams.length) {
					sParams+="&";
				}
			}
			sURL=aWMSimpleFunctionsConf[sFunction][1]+sParams;
		} else {
			sURL=aWMSimpleFunctionsConf[sFunction][1];
		}
		if (typeof(sDomain) == 'undefined' || sDomain == '') {
			sDomain = '';
		}
		sURL=sDomain+sURL;
		WMWindowCreate(aWMSimpleFunctionsConf[sFunction][0], aWMWindowConf[aWMSimpleFunctionsConf[sFunction][0]][0], aWMWindowConf[aWMSimpleFunctionsConf[sFunction][0]][1], aWMWindowConf[aWMSimpleFunctionsConf[sFunction][0]][2], aWMWindowConf[aWMSimpleFunctionsConf[sFunction][0]][3], aWMWindowConf[aWMSimpleFunctionsConf[sFunction][0]][4], aWMWindowConf[aWMSimpleFunctionsConf[sFunction][0]][5], sURL);
		
	}
}

//****************************************************************************************************
//Function	: WMComplexFunction(String Window Manager Function, String Params for Functions)
//Author	: Scott Westerfield
//Date/Time	: 06-26-2002
//Purpose	: This function will use js configuration file windowmanager.js to perform a list on
//			  javascript functions
//Parameters: String - 	Window Manager Function, the function as listed in windowmanager.js
//Returns	: N/A
//Revisions	: N/A
//****************************************************************************************************
function WMComplexFunction (sFunction,sParams) {
	if(aWMComplexFunctionsConf[sFunction]) {
		for(i=0;i<aWMComplexFunctionsConf[sFunction].length;i++) {
			if(aWMComplexFunctionsConf[sFunction][i].indexOf("WMSimpleFunction")>-1 || aWMComplexFunctionsConf[sFunction][i].indexOf("WMExternalPop")>-1 ) {
				sTempFunction=aWMComplexFunctionsConf[sFunction][i].replace("\'\'","'"+sParams+"'");
			} else if(aWMComplexFunctionsConf[sFunction][i].indexOf("WMTopLocation")>-1 ) {
				sTempFunction=aWMComplexFunctionsConf[sFunction][i].replace("\'\'","'"+sParams+"'");
			} else {
				sTempFunction=aWMComplexFunctionsConf[sFunction][i];
			}
			//alert(sTempFunction);
			eval('setTimeout("'+sTempFunction+'",1000)');
		}
	}
	
}

//****************************************************************************************************
//Function	: WMTopLocation(string Location, string Params )
//Author	: Scott Westerfield
//Date/Time	: 01-10-2003
//Purpose	: 
//Parameters: 
//Returns	: N/A
//Revisions	: N/A
//****************************************************************************************************
function WMTopLocation(sLocation,sParams) {
	top.location=sLocation+'?'+sParams;
}
//****************************************************************************************************
//Function	: WMWindowCreate(String Window Name, String Window Type, String Window Screen
//			  Location, String Is Window Scrollable, String Is Window Resizable, Integer Width,
//			  Integer Height, String Window URL)
//Author	: Scott Westerfield
//Date/Time	: 06-24-2002
//Purpose	: This function will create pop-up windows
//Parameters: String - 	Window Name, for the ability to control this window
//			  String - 	Window Type, predefinded types will describe windows with different
//			  		   	attributes
//			  String - 	Window Screen Location, predefinded types will describe windows screen  
//			  		   	locations with different attributes
//			  String - 	Is Window Scrollable, yes or no that the window has scrollbars
//			  String - 	Is Window Resizable, yes or no that the window is resizable
//			  Integer - Width, the width of the window
//			  Integer - Height, the height of the window
//			  String -	Window URL, the URL for the window
//Returns	: N/A
//Revisions	: N/A
//Notes		: This function is a duplicate of UFWindowCreate.  It is duplicated so that
//			  Sites not using the framework can still use the window manager.
//****************************************************************************************************
function WMWindowCreate(sName, sType, sScreenLocation, sScrollable, sResizable, iWidth, iHeight, sURL) {
	oWMBrowser=WMcheckBrowser();
	var sWindowParams="";
	var iWindowLeft=0;
	var iWindowTop=0;
	
	// Set "Is Scrollable" Default
	if(sScrollable !="yes" && sScrollable !="no") {
		sScrollable ="no"; 
	} 
	
	// Set "Is Resizable" Default
	if(sResizable !="yes" && sResizable !="no") {
		sResizable ="no"; 
	} 
	
	// Predefined Window Types
	switch (sType) {
		case "mini":	
			sWindowParams="resizable="+sResizable+",status=yes,location=yes,scrollbars="+sScrollable+",menubar=no,toolbar=no,directories=no,width="+iWidth+",height="+iHeight;
			break;
		case "compact":	
			sWindowParams="resizable="+sResizable+",status=no,location=no,scrollbars="+sScrollable+",menubar=no,toolbar=no,directories=no,width="+iWidth+",height="+iHeight;
			break;
		case "tools":	
			sWindowParams="resizable="+sResizable+",status=yes,location=no,scrollbars="+sScrollable+",menubar=no,toolbar=yes,directories=no,width="+iWidth+",height="+iHeight;
			break;
		case "small":	
			sWindowParams="resizable="+sResizable+",status=yes,location=no,scrollbars="+sScrollable+",menubar=no,toolbar=no,directories=no,width="+iWidth+",height="+iHeight;
			break;
		default:
		case "standard":	
			sWindowParams="resizable=yes,status=yes,location=yes,scrollbars="+sScrollable+",menubar=yes,toolbar=yes,directories=yes,width="+iWidth+",height="+iHeight;
			break;
	}

	// Predefined Screen Locations
	switch (sScreenLocation) {
		case "topright":
			iWindowLeft = (screen.width-iWidth);
			iWindowTop = 0;
			break;
		case "topcenter":
			iWindowLeft = ( (screen.width-iWidth) >>1 );
			iWindowTop = 0;
			break;
		case "topleft":
			iWindowLeft = 0;
	   	  	iWindowTop = 0;
			break;		
		case "bottomright":
			iWindowLeft = (screen.width-iWidth);
			iWindowTop = (screen.height-iHeight);
			break;
		case "bottomcenter":
			iWindowLeft = ( (screen.width-iWidth) >>1 );
			iWindowTop = (screen.height-iHeight);
			break;
		case "bottomleft":
			iWindowLeft = 0;
	   	  	iWindowTop = (screen.height-iHeight);
			break;
		case "leftcenter":
			iWindowLeft = 0;
	   	  	iWindowTop = ( (screen.height-iHeight) >>1 );
			break;		
		case "rightcenter":
			iWindowLeft = (screen.width-iWidth);
			iWindowTop = ( (screen.height-iHeight) >>1 );
			break;
		default:
		case "center":
   			iWindowLeft = ( (screen.width-iWidth) >>1 );
	   	  	iWindowTop = ( (screen.height-iHeight) >>1 );
			break;
	}
	
	// raised all non-Mac windows by 27 pix to make room for start bar
	if(iWindowTop>27 && !oWMBrowser.MAC) {
		iWindowTop-=27;
	} 
	if (oWMBrowser.IE) {
		sWindowParams += ",top=" + iWindowTop + ",left=" + iWindowLeft;
  	} else if (oWMBrowser.NS) {
		sWindowParams += ",screenX=" + iWindowLeft + ",screenY=" + iWindowTop;
	}
	
	eval('WMWindow_'+sName+' = window.open("'+sURL+'", "WMWin_'+sName+'", "'+sWindowParams+'")');
	
	eval('setTimeout("WMExistThenFocus(WMWindow_'+sName+')", 2000)');
}

//****************************************************************************************************
//Function	: UFExistThenFocus(object Window )
//Author	: Scott Westerfield
//Date/Time	: 06-24-2002
//Purpose	: If the window exists, then bring it to the front
//Parameters: Object - 	oWindowName, the window in question
//Returns	: N/A
//Revisions	: N/A
//****************************************************************************************************
function WMExistThenFocus(oWindowName) {
	if(oWindowName) {
		if(!oWindowName.closed) {
			oWindowName.focus();
		}
	}
}



//****************************************************************************************************
//Function	: WMWindowClose(String Window Name)
//Author	: Scott Westerfield
//Date/Time	: 06-24-2002
//Purpose	: This function will close a pop-up windows created with UFWindowCreate
//Parameters: String - 	Window Name, for the ability to control this window
//Returns	: N/A
//Revisions	: N/A
//Notes		: This function is a duplicate of UFWindowClose.  It is duplicated so that
//			  Sites not using the framework can still use the window manager.
//****************************************************************************************************
function WMWindowClose(sName) {
	eval('setTimeout("WMWindow_'+sName+'.close()", 1000)');
}
