﻿function configureCarCC(pool)
{
    /* For new CC inner size is important, but gotoUrlNewWinSizeByName() calcs outer size */
    var sWidth = 980;
    var sHeight = 680;
    sWidth -= g_is_ie ? 15 : 20;
    sHeight -= 25;

    var HostName = "http://cc.porsche.com";
    var addScreenParam = true;
    switch (pool) {

        case "usa":
            //sUrl = HostName + "/pva_new/ui/pva/index.jsp?sprache=us&modelRange=null";
			sUrl = 'http://www.porsche.com/usa/modelstart/';
            addScreenParam = false;
            break;

        case "canada":
            //sUrl = HostName + "/pva_new/ui/pva/index.jsp?sprache=ca&modelRange=null";
            break;
            
        case "germany":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=de&modelRange=null";
			sUrl = 'http://www.porsche.com/germany/modelstart/';
            addScreenParam = false;
            break;
        
        case "uk":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=en&modelRange=null";
			sUrl = 'http://www.porsche.com/uk/modelstart/';
            addScreenParam = false;
            break;

        case "international":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=cc&modelRange=null";
			sUrl = 'http://www.porsche.com/international/modelstart/';
            addScreenParam = false;
            break;

        case "middle-east":
            sUrl = "/all/transitional/middle-east/models/countryselector/default.htm?sprache=";
            break;
			
        case "france":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=fr&modelRange=null";
			sUrl = 'http://www.porsche.com/france/modelstart/';
            addScreenParam = false;
            break;

        case "italy":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=it&modelRange=null";
			sUrl = 'http://www.porsche.com/italy/modelstart/';
            addScreenParam = false;
            break;
			
        case "spain":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=sp&modelRange=null";
			sUrl = 'http://www.porsche.com/spain/modelstart/';
            addScreenParam = false;
            break;
            
        case "australia":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=ae&modelRange=null";
			sUrl = 'http://www.porsche.com/australia/modelstart/';
            addScreenParam = false;
            break;

        case "japan_jp":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=pj&modelRange=null";
			sUrl = 'http://www.porsche.com/japan/jp/modelstart/';
            addScreenParam = false;
            break;

        case "china_zh":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=cn";
			sUrl = 'http://www.porsche.com/china/zh/modelstart/';
            addScreenParam = false;
            break;

        case "china_en":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=ce&market=PACCE";
			sUrl = 'http://www.porsche.com/china/en/modelstart/';
            addScreenParam = false;
            break;
			
	    case "russia":
            //sUrl = HostName + "/icc_euro/ui/pva/index.jsp?sprache=ru&modelRange=null";
			sUrl = 'http://www.porsche.com/russia/modelstart/';
            addScreenParam = false;
            break;

		case "swiss_de":
			//sUrl = HostName + "/icc_euro/ui/pva/index.jsp?market=CHSD&sprache=sd";
            sUrl = 'http://www.porsche.com/microsite/startcc/swiss-de.htm';
            addScreenParam = false;
			break;
            
		case "swiss_fr":
			//sUrl = HostName + "/icc_euro/ui/pva/index.jsp?market=CHSF&sprache=sf";
            sUrl = 'http://www.porsche.com/microsite/startcc/swiss-fr.htm';
            addScreenParam = false;
			break;
            
		case "swiss_it":
			//sUrl = HostName + "/icc_euro/ui/pva/index.jsp?market=CHSI&sprache=si";
            sUrl = 'http://www.porsche.com/microsite/startcc/swiss-it.htm';
            addScreenParam = false;
			break;            
    }
    
    var screenParam = getScreenXYUrlParam();
    
    if (sUrl && sUrl.length > 0 && addScreenParam == true)
        sUrl += screenParam;

    gotoUrlNewWinSizeByName(sUrl, sWidth, sHeight, "PVA");
}
