function openW(urlW, nameW, width_w, height_w, scroll_bar) {
	center_x = Math.round((window.screen.availWidth - width_w) / 2);
	center_y = Math.round((window.screen.availHeight - height_w) / 2);
	window.open(urlW, nameW, 'top=' + center_y + ',left=' + center_x + ',width=' + width_w + ',height=' + height_w + ',status=no,titlebar=no,toolbar=no,menubar=no,location=no,resizable=no,directories=no,scrollbars=' + scroll_bar);
	return false;
}
function getMap() {
    var links = $('#Map > .maplink');
    links.each(function(index) {
        $(this).click(function() {
            var rows = $('.contactinfo');
            rows.each(function(row) { 
                $(this).hide();
            });
            var id = $(this).attr('href').match(/#(\w.+)/)[1]; 
            $('#dealer_' + id).show(); 
        });
    });
    if(document.location.href.match(/#(\w.+)/)) {
        var loc = RegExp.$1;    
        $('#dealer_' + loc).show();
    }
}

function getColorator() {
    var thumbs = $('#colorThumb > a');
    thumbs.each(function(index) {
        $(this).click(function() {
            var cars = $('#colorCar > img');
            cars.each(function(car) { 
                $(this).hide();
                $('#colorName').text('');
            });
            var id = $(this).attr('id').match(/_(\w.+)/)[1]; 
            $('#car_' + id).show();
            $('#colorName').text($(this).attr('title')); 
        });
    }); 
    return false;           
}

