//window.onerror=function(){return true;} var bann1=new Array(); var bann2=new Array(); var bann3=new Array(); bann1['out']=new Image();bann1['out'].src="images/bann_1.jpg"; bann1['over']=new Image();bann1['over'].src="images/bann_1_a.jpg"; bann2['out']=new Image();bann2['out'].src="images/bann_2.jpg"; bann2['over']=new Image();bann2['over'].src="images/bann_2_a.jpg"; bann3['out']=new Image();bann3['out'].src="images/bann_3.jpg"; bann3['over']=new Image();bann3['over'].src="images/bann_3_a.jpg"; function rollOver(id,action){document.getElementById(id).src=eval(id+"['"+action+"'].src");} var loader_yellow=new Image();loader_yellow.src="http://www.avignon-auto.ru/images/loader_yellow.gif"; var check_button=new Image();check_button.src="http://www.avignon-auto.ru/images/check_button.gif"; var check_button_active=new Image();check_button_active.src="http://www.avignon-auto.ru/images/check_button_active.gif"; function view_foto(adr,w,h){ var new_foto=window.open('view_foto.php?adr='+adr,'','width='+w+',height='+h); } function view_img(id,alt){ var viewimg=window.open('view_img.php?id='+id+'&alt='+escape(alt),'','width=100,height=100,status=1'); } function open_accessories_descript(id){ if(document.getElementById("accessories_descript_"+id).style.display=='none'){ document.getElementById("accessories_descript_"+id).style.display="block"; document.getElementById("accessories_open_descript_"+id).innerHTML="
» ñêðûòü
"; } else{ document.getElementById("accessories_descript_"+id).style.display="none"; document.getElementById("accessories_open_descript_"+id).innerHTML="
» ïîäðîáíåå
"; } return false; } function set_complete(id){ show_yellow_loader(); var ajax = new ajax_class("ajax_response_set_complete_func"); var query_string="action=configurator_set_complete&id="+id; ajax.ajax("GET","maction.php?"+query_string); ajax.callback(null); delete ajax; return false; } function ajax_response_set_complete_func(arg){ eval(arg); } function set_color_image(eid,cid){ show_yellow_loader(); var ajax = new ajax_class("ajax_response_set_color_image_func"); var query_string="action=configurator_set_color_image&eid="+eid+"&cid="+cid; ajax.ajax("GET","maction.php?"+query_string); ajax.callback(null); delete ajax; return false; } function ajax_response_set_color_image_func(arg){ eval(arg); } function set_equipment(id){ show_yellow_loader(); var ajax = new ajax_class("ajax_response_set_equipments_func"); var query_string="action=configurator_set_equipments&id="+id+"&img="+document.getElementById('equipment_img_id_'+id).src; ajax.ajax("GET","maction.php?"+query_string); ajax.callback(null); delete ajax; return false; } function ajax_response_set_equipments_func(arg){ eval(arg); } function print_order(){ var printorderwin=window.open("print_order.php",'print_order','width=700,height=600,scrollbars=1'); } function send_order(){ var sendorderwin=window.open("send_order.php",'send_order','width=600,height=540,scrollbars=1'); } function show_yellow_loader(){ if(typeof divly!='undefined'){document.body.removeChild(divly);delete divly;} divly=document.createElement('div'); divly.setAttribute('id','loader_yellow_container'); divly.innerHTML="
ÇÀÃÐÓÆÀÅÒÑß...
"; divly.style.top=Math.floor((document.body.clientHeight+document.body.scrollTop)/2-50); divly.style.left=Math.floor((document.body.clientWidth+document.body.scrollLeft)/2-50); document.body.appendChild(divly); } function hide_yellow_loader(){ if(typeof divly!='undefined'){document.body.removeChild(divly);delete divly;} } function showmenu(id){ menu="menu_container_"+id; ar=objectXY(id); document.getElementById(id).className='item_container_active'; if(document.getElementById(menu)){ document.getElementById(menu).style.left=ar[0]; document.getElementById(menu).style.visibility='visible'; } } function showmenusub(id){ menu="menu_container_"+id; ar=objectXY("sub_"+id); document.getElementById(id).className='item_container_active'; if(document.getElementById(menu)){ document.getElementById(menu).style.left=ar[0]+10; document.getElementById(menu).style.top=ar[1]-10; document.getElementById(menu).style.visibility='visible'; } } function hidemenu(id){ menu="menu_container_"+id; document.getElementById(id).className='item_container_noactive'; if(document.getElementById(menu))document.getElementById(menu).style.visibility='hidden'; } function setclassName(obj,name){ document.getElementById(obj).className=name; } function objectXY(obj) { var dobj=eval('document.getElementById("'+obj+'")') var x = 0, y = 0; do{ x += dobj.offsetLeft; y += dobj.offsetTop; }while (typeof(dobj = dobj.offsetParent) != 'undefined' && dobj != null); return [x,y]; } function loc(url){ window.location.href=url; } function objectXY(obj) { var dobj=eval('document.getElementById("'+obj+'")') var x = 0, y = 0; do{ x += dobj.offsetLeft; y += dobj.offsetTop; }while (typeof(dobj = dobj.offsetParent) != 'undefined' && dobj != null); return [x,y]; } function bgf(name,color){ name.style.backgroundColor=color; } function win_resize(e,intWidth,intHeight){ var newW=(intWidth==null || intWidth=='' || isNaN(parseInt(intWidth)))? 800 : parseInt(intWidth); var newH=(intHeight==null || intHeight=='' || isNaN(parseInt(intHeight)))? 800 : parseInt(intHeight); if(is_ie4 || is_ie){newW+=10;newH+=29;} if(is_ns4 || is_ns){newW+=6;newH+=27;} if(is_opera){newW+=10;newH+=29;} if(is_firefox){newW+=0;newH+=22;} if(screen.width>newW)newLeft=Math.round((screen.width-newW)/2); else newLeft=10; if(screen.height>newH)newTop=Math.round((screen.height-newH)/2); else newTop=10; newH+=20; e.resizeTo(newW,newH); e.moveTo(newLeft,newTop); } function move_window_to_center_screen(){ if(is_ns4 || is_ns){ leftco=document.body.offsetWidth+16; topco=document.body.offsetHeight+44; } if(is_ie || is_ie4 || is_firefox){ leftco=document.body.clientWidth; topco=document.body.clientHeight; } if(is_opera){ leftco=document.body.clientWidth; topco=document.body.clientHeight+200; } newLeft=Math.round((screen.width-leftco)/2); newTop=Math.round((screen.height-topco)/2); window.moveTo(newLeft,newTop); } var userAgent = navigator.userAgent.toLowerCase(); var is_opera = (userAgent.indexOf('opera') != -1); var is_firefox = (userAgent.indexOf('firefox') != -1); var is_saf = ((userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == 'Apple Computer, Inc.')); var is_webtv = (userAgent.indexOf('webtv') != -1); var is_ie = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv)); var is_ie4 = ((is_ie) && (userAgent.indexOf('msie 4.') != -1)); var is_moz = ((navigator.product == 'Gecko') && (!is_saf)); var is_kon = (userAgent.indexOf('konqueror') != -1); var is_ns = ((userAgent.indexOf('compatible') == -1) && (userAgent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_saf)); var is_ns4 = ((is_ns) && (parseInt(navigator.appVersion) == 4)); var is_mac = (userAgent.indexOf('mac') != -1); dom = (document.getElementById); nc = (document.layers && (parseInt(navigator.appVersion) >= 4 )); brName = navigator.appName; brVer = navigator.appVersion; brAgent = navigator.userAgent; isDOM = document.getElementById ? true:false; isOpera = (window.opera && isDOM) ? true:false; isOpera6 = (isOpera && window.print)? true:false; isOpera7= (isOpera && document.readyState)? true:false; isOpera8= /Opera[^\d]*8/.test(brAgent); isOpera9= /Opera[^\d]*9/.test(brAgent); isIE = (document.all && document.all.item && !isOpera)? true:false isSafari=/\WSafari\W/.test(brAgent); isNN= (brName=="Netscape")? true:false; isMozilla= (isNN && isDOM)? true:false;