var browser_name = navigator.appName;
selected = '';
menu = new Array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '13');
/*
if (browser_name == "Microsoft Internet Explorer"){
document.write('');
} else {
document.write('');
} */
function toggle(id) {
var o = document.getElementById(id);
if (o) {
if (document.getElementById(id).style.display == 'none') {
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
}
}
function openPhoto(path, width, height) {
var x = Math.floor((screen.width / 2) - (width / 2));
var y = Math.floor((screen.height / 2) - (height * 0.6));
var win = window.open('', 'photo', 'width='+width+',height='+height+',toolbar=no,directories=no,status=no,location=no,resizable=no,scrollbars=no,menubar=no,screenx='+x+',screeny='+y+',left='+x+',top='+y);
win.document.write('
Concept');
win.document.close();
}
function galleryChange(path, url, width, height) {
document.getElementById('gallery').src = path;
if (typeof(url) != 'undefined' && url != '') {
document.getElementById('galleryLink').rel = 'lightbox[plants]';
document.getElementById('galleryLink').style.cursor = 'default';
} else {
document.getElementById('galleryLink').href = '#';
document.getElementById('galleryLink').style.cursor = 'default';
}
}
function getRandom(min_random, max_random){
max_random++;
var range = max_random - min_random;
var n = Math.floor(Math.random()*range) + min_random;
return n;
}
/*
function inArray (value, array){
var i;
for (i = 0; i < array.length; i++){
if (array[i] === value){
return true;
}
}
return false;
}
*/
function siteFiller(){
document.getElementById('bigimg_link').href = bigImagesLinks[0];
document.getElementById('bigimg').style.backgroundImage = "url('" + bigImages[0] + ".jpg')";
document.getElementById('bigimg_over').src = bigImages[0] + '.over.gif';
}
function ChangeBigImg(){
if (curBigImg == (bigImages.length - 1)){
curBigImg = 0;
} else {
curBigImg++;
}
document.getElementById('bigimg').style.backgroundImage = "url('" + bigImages[curBigImg] + ".jpg')";
document.getElementById('bigimg_over').src = bigImages[curBigImg] + '.over.gif';
document.getElementById('bigimg_link').href = bigImagesLinks[curBigImg];
}
function preloadBigImages(){
for(var i=0; i= menuDropMaxHeight) {
document.getElementById('dropdownarea').style.display = 'none';
menuDropState = true;
finish = true;
document.getElementById(id).style.height = parseInt(document.getElementById(id).style.height) + difference + 'px';
} else {
document.getElementById(id).style.height = height + 'px';
}
setTimeout("menuChangeState()", menuDropSpeed);
}
}
function menuHide() {
var id = 'dropdown';
var height = parseInt(document.getElementById(id).style.height);
if (startState != menuDropState){
finish = false;
id = '';
return ;
}
// Going UP
height = height - menuDropStep;
if (height <= menuDropMinHeight) {
document.getElementById('dropdownarea').style.display = 'block';
menuDropState = false;
finish = true;
if (difference < 0){
difference = parseInt(document.getElementById(id).style.height) - 10;
}
document.getElementById(id).style.height = '10px';
} else {
document.getElementById(id).style.height = height + 'px';
}
setTimeout("menuHide()", menuDropSpeed);
}
function divToggle(id){
if (document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
}
function switchTechImage(){
var image_div = document.getElementById("techBigImg");
if(image_div.style.display=="none"){
image_div.style.display = "block";
document.getElementById("techMain").style.display = "none";
}
else {
image_div.style.display = "none";
document.getElementById("techMain").style.display = "block";
}
}
var active_car_popup = "";
function closeCarPopups(){
var active_popup = document.getElementById(active_car_popup);
if(active_popup){
active_popup.style.display = "none";
}
}
function popupCarDescription(id){
closeCarPopups();
var popup = document.getElementById("car_description_"+id);
if(popup){
popup.style.display = "block";
}
active_car_popup = "car_description_"+id;
return false;
}
function popupModelTypes(){
closeCarPopups();
document.getElementById("iChoiceWindow").style.display = "block";
active_car_popup = "iChoiceWindow";
}
active_model_type = "model_type_none";
function switchModelType(type){
var active_type = document.getElementById(active_model_type);
if(active_type) active_type.style.display = "none";
var type_panel = document.getElementById("model_type_" + type);
if(type_panel) type_panel.style.display = "block";
active_model_type = "model_type_"+type;
}
function popupModelSeries(){
closeCarPopups();
document.getElementById("model_series_popup").style.display = "block";
active_car_popup = "model_series_popup";
}
active_model_series = "model_series_none";
function switchModelSeries(series){
var active_series = document.getElementById(active_model_series);
if(active_series) active_series.style.display = "none";
var series_panel = document.getElementById("model_series_" + series);
if(series_panel) series_panel.style.display = "block";
active_model_series = "model_series_"+series;
}
function banners_preload(){
for(var i=0; i=banners.length) current_banner = 0;
var id = banners[current_banner];
if(banners_images[id]) document.getElementById('banner').src = banners_images[id];
document.getElementById('bigimg_over').src = banners_images_active[id];
document.getElementById('bigimg_link').href = banners_links[id];
}
function banners_show_active(){
var id = banners[current_banner];
if(!banners_images_active[id]) return;
document.getElementById('bigimg_over').style.visibility='visible';
}
function banners_hide_active(){
document.getElementById('bigimg_over').style.visibility='hidden';
}