function funcResize() { funcChangeHeader(section); } function funcLoad() { funcSelectHeader(section); funcChangeHeader(section); } function funcChangeHeader(section) { var screen_width = func_get_width(); if (section == "about") { var width3 = new Array(30, 85, 85); func_set_width(width3, "elm3"); var elm = document.getElementById("DivImg9"); if (screen_width > 1024) { elm.style.right = ""; elm.style.left = "897px"; } else { elm.style.left = ""; elm.style.right="7px"; } } if (section == "within") { if (document.getElementById) { var elm2 = document.getElementById("DivI_Img12"); if (elm2) if (screen_width < 770) elm2.style.left = "300px"; else elm2.style.left = "43%"; } } if (section == "geography") { if (document.getElementById) { var elm1 = document.getElementById("DivG_Img3"); var elm = document.getElementById("td1"); if (elm1) if (screen_width < 1100) { elm.width = "20%"; elm1.style.left = "10px"; } else { elm1.style.left = "40px"; } } } if (section == "team_work") { if (document.getElementById) { var elm = document.getElementById("DivV_Img2"); if (elm) { if (screen_width < 800) elm.style.left = "560px"; else if (screen_width > 740) elm.style.left = "58%"; else elm.style.left = "58%"; } } } } function func_get_width() { var myWidth = 0; if (typeof( window.innerWidth ) == 'number') { myWidth = window.innerWidth; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myWidth = document.documentElement.clientWidth; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myWidth = document.body.clientWidth; } return myWidth; } function func_set_width(arr, id) { var width = func_get_width(); var elm = document.images[id]; if (elm) { if (width < 801) { elm.width = arr[0]; } else if(width < 1025) { elm.width = arr[1]; } else elm.width = arr[2]; } } var screen_width = func_get_width(); function enableInput(id1, id2) { var elm1 = document.getElementById(id1); var elm2 = document.getElementById(id2); if (elm1 && elm2) if (elm1.checked) elm2.disabled = false; else { elm2.value= ''; elm2.disabled = true; } } function checkEmailsingle() { var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$"; var regex = new RegExp(emailReg); var result = regex.test(document.contact_frm.email.value); if(document.contact_frm.email.value=="" || document.contact_frm.email.value.indexOf(" ",0)==0 || result==false) { alert('Требуется корректное значение поля \'Ваш e-mail\'.'); document.contact_frm.email.select(); document.contact_frm.email.focus(); result=false; } if (result!=false) result=true; return result; } function checkEmail() { var result = checkEmailsingle(); if (result == true) if ((document.contact_frm.email.value != document.contact_frm.email1.value)) { alert('Оба e-mail адреса должна совпадать.'); document.contact_frm.email1.focus(); result = false; } return result; } function visibleBox(elm, id) { var elm1 = document.getElementById(id); if (elm1) if (elm) if (elm.selectedIndex == 10) elm1.style.display=""; else elm1.style.display="none"; } function func_checkContactFrm(mode) { var result = checkEmail(); if (mode == 'products' && result == true) { var elm = document.getElementById('products'); var elm2 = document.getElementById('other_theme'); if (elm) { if (elm.selectedIndex == 10) { if (elm2) if (elm2.value=="") { alert('Требуется заполнить поле \'Тема сообщения\'.'); elm2.focus(); result=false; } else result=true; } } } if (mode == 'order' && result == true) { result = false; for (var i=0; i=5) { gbIE5 = true; if (nVersion>=5.5) gbIE55=true; } } if (section == "about") { var str =''; var str2 = ''; } else if (section == "products") { var str='', //Define HTML for footer interface defineLoading: '  Загрузка изображения', //Define HTML for "loading" div scrollbarwidth: 16, opacitystring: 'filter:progid:DXImageTransform.Microsoft.alpha(opacity=10); -moz-opacity: 0.1; opacity: 0.1', targetlinks:[], //Array to hold links with rel="thumbnail" current_imgid: 0, // Image Id createthumbBox:function(){ //write out HTML for Image Thumbnail Viewer plus loading div document.write('
') document.write('
'+this.defineLoading+'
') this.thumbBox=document.getElementById("thumbBox") this.thumbImage=document.getElementById("thumbImage") //Reference div that holds the shown image this.thumbLoading=document.getElementById("thumbLoading") //Reference "loading" div that will be shown while image is fetched this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes }, alignDiv:function(divobj, align){ //Centers a div element on the page ie=document.all && !window.opera dom=document.getElementById scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth-this.scrollbarwidth docheight=(ie)? this.standardbody.clientHeight: window.innerHeight docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight //Full scroll height of document var objwidth=divobj.offsetWidth //width of div element var objheight=divobj.offsetHeight //height of div element if (align=="center") { var topposition=(docheight>objheight)? scroll_top+docheight/2-objheight/2+"px" : scroll_top+10+"px" //Vertical position of div element: Either centered, or if element height larger than viewpoint height, 10px from top of viewpoint divobj.style.left=docwidth/2-objwidth/2+"px" //Center div element horizontally divobj.style.top=Math.floor(parseInt(topposition))+"px" divobj.style.visibility="visible" } else { var imgObj=document.getElementById("Img"); var imgDiv=document.getElementById("thumbImg"); var thumbBox = document.getElementById("thumbBox"); imgDiv.style.height=imgObj.offsetHeight+"px" thumbBox.style.width = 602+"px" if (imgObj.offsetWidth > 602) thumbBox.style.width=imgObj.offsetWidth+"px" if (divobj.style.visibility!="visible") thumbnailviewer.showOverlay('block'); if (divobj.style.visibility!="visible") { divobj.style.left=docwidth/2-objwidth/2+"px" // Center div element horizontally divobj.style.top=110+"px" // Math.floor(parseInt(topposition))+"px" divobj.style.visibility="visible" } } }, showthumbBox:function(){ //Show ThumbBox div this.alignDiv(this.thumbBox) if (this.enableAnimation){ //If fading animation enabled this.currentopacity=0.1 //Starting opacity value this.opacitytimer=setInterval("thumbnailviewer.opacityanimation()", 20) } }, go:function(direction){ var thumbLoading=document.getElementById("thumbLoading"); thumbLoading.style.visibility="visible" if (direction=='next') this.current_imgid = (this.current_imgid < count_images) ? this.current_imgid+1 : 1; else this.current_imgid = (this.current_imgid > 1) ? this.current_imgid-1 : count_images; var imgObj=document.getElementById("Img") var imgTitle=document.getElementById("thumbTitle"); var thumbCur=document.getElementById("thumbCur"); imgObj.src='images_ru/'+all_images[this.current_imgid]; imgTitle.innerHTML=all_titles[this.current_imgid].replace(/ - /, "
"); thumbCur.innerHTML=this.current_imgid; }, loadimage:function(link){ //Load image function that gets attached to each link on the page with rel="thumbnail" if (this.thumbBox.style.visibility=="visible") //if thumbox is visible on the page already this.closeit() // Hide it first (not doing so causes triggers some positioning bug in Firefox var imageHTML = new String(""); if (this.enableTitle && link.getAttribute("title")) //Use title attr of the link as description? imageHTML+='
'+link.getAttribute("title").replace(/ - /, '
')+'
'; this.current_imgid = parseFloat(link.getAttribute("id").substring(2)); imageHTML+='
' imageHTML+='<<  ' imageHTML+=''+this.current_imgid+' из '+count_images+'  ' imageHTML+='>>    
' imageHTML+='Закрыть' imageHTML+='
' this.alignDiv(this.thumbLoading, 'center') // Center and display "loading" div while we set up the image to be shown this.thumbImage.innerHTML=imageHTML //Populate thumbImage div with shown image's HTML (while still hidden) this.featureImage=this.thumbImage.getElementsByTagName("img")[0] //Reference shown image itself this.featureImage.onload=function(){ //When target image has completely loaded thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div thumbnailviewer.showthumbBox() //Display "thumbbox" div to the world! } if (document.all && !window.createPopup) //Target IE5.0 browsers only. Address IE image cache not firing onload bug: panoramio.com/blog/onload-event/ this.featureImage.src=link.getAttribute("href") this.featureImage.onerror=function(){ //If an error has occurred while loading the image to show thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div, game over } }, setimgopacity:function(value){ //Sets the opacity of "thumbimage" div per the passed in value setting (0 to 1 and in between) var targetobject=this.featureImage if (targetobject.filters && targetobject.filters[0]){ //IE syntax if (typeof targetobject.filters[0].opacity=="number") //IE6 targetobject.filters[0].opacity=value*100 else //IE 5.5 targetobject.style.filter="alpha(opacity="+value*100+")" } else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax targetobject.style.MozOpacity=value else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax targetobject.style.opacity=value else //Non of the above, stop opacity animation this.stopanimation() }, opacityanimation:function(){ //Gradually increase opacity function this.setimgopacity(this.currentopacity) this.currentopacity+=0.1 if (this.currentopacity>1) this.stopanimation() }, stopanimation:function(){ if (typeof this.opacitytimer!="undefined") clearInterval(this.opacitytimer) }, closeit:function(){ //Close "thumbbox" div function overlay=document.getElementById('overlay') overlay.parentNode.removeChild(overlay); this.stopanimation() this.thumbBox.style.visibility="hidden" this.thumbImage.innerHTML="" this.thumbBox.style.left="-2000px" this.thumbBox.style.top="-2000px" }, cleanup:function(){ //Clean up routine on page unload this.thumbLoading=null if (this.featureImage) this.featureImage.onload=null this.featureImage=null this.thumbImage=null for (var i=0; i