function next_award(){
	var left = 0;
	
	var total_awards = $('.award').length;
	
	if( award_index < total_awards ){
		award_index = award_index + 1;	
	}
	
	left = 93 * ( award_index - 1 );
	left = -left;
	
	$('#awards_list').css('left', left);
	
}

function prev_award(){
	var left = 0;
	
	if( award_index > 1 ){
		award_index = award_index - 1;	
	}
	
	left = 93 * ( award_index - 1 );
	left = -left;

	$('#awards_list').css('left', left);
	
}


function set_roll(index){
	$('.roll').removeClass('active');
	$('#roll' + index).addClass('active');
	$('#roll').val( index );
}


function set_material(index){
	$('.material').removeClass('active');
	$('#material' + index).addClass('active');
	$('#material').val( index );
}


function set_cmyk(index){
	
	if( $('#cmyk' + index).hasClass('active') == true ){
		
		$('#cmyk' + index).removeClass('active');
		
		switch( index ){
			case 1:
				$('#cmyk_c').removeAttr('checked');
				break;
			case 2:
				$('#cmyk_m').removeAttr('checked');
				break;
			case 3:
				$('#cmyk_y').removeAttr('checked');
				break;
			case 4:
				$('#cmyk_k').removeAttr('checked');
				break;								
		}
		
	}else{
		
		$('#cmyk' + index).addClass('active');
		
		switch( index ){
			case 1:
				$('#cmyk_c').attr('checked', 'checked');
				break;
			case 2:
				$('#cmyk_m').attr('checked', 'checked');
				break;
			case 3:
				$('#cmyk_y').attr('checked', 'checked');
				break;
			case 4:
				$('#cmyk_k').attr('checked', 'checked');
				break;								
		}
			
	}

}


function calculate_left_interval(){
	
	var list_width = 0;
	var item_width = 0;
	var c = $('.equipment_item').length;	
	
	$('.equipment_item').each(function(){
		list_width += $(this).outerWidth(true);
	});
	
	var w2 = $('#equipment').outerWidth(true);
	
	var offset = w2 / 2 - $('#equipment_item' + c).outerWidth(true) / 2;	
	
	left_interval.min = -( $('#equipment_list').outerWidth(true) - $('#equipment_item1').outerWidth(true) - offset + 170 );
	
	left_interval.max = $('#equipment').outerWidth(true) / 2 - $('#equipment_item1').outerWidth(true) / 2;
	
}

function select_equipment(index){
	
	if( mouse_button == true && mouse_move == true ){
		mouse_button = false;
		mouse_move = false;
		// console.log('Кнопка отпущена.');
		// console.log('Клик по ссылке.');	
		return false;
	}

	mouse_button = false;
	mouse_move = false;

	
	var w = $('#equipment_item' + index).outerWidth(true);
	var w2 = $('#equipment').outerWidth(true);

	var offset = w2 / 2 - w / 2;
	
	var anim_left = 0;
	
	if( index == 1 ){
		var left = offset;
		anim_left = left;
		left = left + 'px';
	}else{

		var c = 1;
		var c = index - 1;

		
		var total_width = 0;
		
		for( var i = 1; i <= c; i++ ){
			
			total_width = total_width + $('#equipment_item' + i).outerWidth(true);
			
		}
		
		var w3 = total_width;
		
		var left = Math.abs( w3 - offset );
		anim_left = '-' + left;
		left = '-' + left + 'px';
	}
	
	
  	$('#equipment_list').animate({ left: anim_left }, 500, 'swing');	
	
	$('.list1 a').removeClass('active');
	
	$('#link' + index).addClass('active');
}


function select_service(index, images_url){
	
	if( index == 2 ){
		$('#easter_egg').show();
	}else{
		$('#easter_egg').hide();
	}
	
	service_index = index;
	
	$('.menu1 a').removeClass('active');	
	$( '#s' + index ).addClass('active');
	
//	var back = 'url(' +  images_url + '/services/' + index + '.png)';
//	$('#service_image').css('background-image', back);
	
	$('#service_image').removeClass('service_image1');
	$('#service_image').removeClass('service_image2');
	$('#service_image').removeClass('service_image3');
	$('#service_image').removeClass('service_image4');
	
	$('#service_image').addClass('service_image' + index);
	
	$('.service_text').hide();	
	$('#service_text' + index).show();
	
}


function next_service(images_url){
	
	if( service_index < 4 ){
		service_index++;
	}else if( service_index == 4 ){
		service_index = 1;
	}
	
	select_service( service_index, images_url );	
}

function prev_service(images_url){
	if( service_index >= 2 ){
		service_index--;
	}else if( service_index == 1 ){
		service_index = 4;
	}

	select_service( service_index, images_url );		
}

function selector_calculate(){
	
	if( active_menu_item > 0 ){
		
		index = active_menu_item;
		
		var width = $('#menu_item' + index).outerWidth(true);
		
		var pos = $('#menu_item' + index).position();
		
		var left = pos.left + 72;
		
		width = parseInt( width );
		
		if( index == 5 ){
		//	console.log( width );
			
			$('#menu_item_selector').css('width', width - 19);
		}else{
			$('#menu_item_selector').css('width', width - 8);	
		}
		
				
		$('#menu_item_selector').css('left', left);
		$('#menu_item_selector').show();		
		
	}
	
	
	var top = $(document).height() - $('#lb').height();
 	$('#lb').css('top', top);	

	
}


function menu_action(action, index){

	
	switch( action ){
		case 'mover':
		
			var width = $('#menu_item' + index).outerWidth(true);
			var pos = $('#menu_item' + index).position();
			
			var left = pos.left + 72;
			
			//alert(left);
			
			width = parseInt( width );
			
			if( index == 5 ){
				$('#menu_item_selector').css('width', width - 19);
			}else{
				$('#menu_item_selector').css('width', width - 8);	
			}
			
			$('#menu_item_selector').css('left', left);
			$('#menu_item_selector').show();
				
			//active_menu_item = index;	
				
			// console.log(width);		
		
			break;		
		case 'mout':
		
			if( active_menu_item == 0 )
				$('#menu_item_selector').hide();
			
			selector_calculate();
						
			break;
	}

}



function _change_big_image( action ){
	if( action == 'in' ){
		$('#front_image').fadeIn(fade_duration, function(){
			change_big_image();
		});					
	}else if( action == 'out' ){
		$('#front_image').fadeOut(fade_duration, function(){
			change_big_image();
		});
	}
}


function screen_width(){
	return $.browser.opera? window.innerWidth : $(window).width();
} 

function screen_height(){
	return $.browser.opera? window.innerHeight : $(window).height();
} 

function change_big_image( index ){
	
	$('.circle').removeClass('active_circle');

//	if( index > 0 ){
//
//		$('#big_image').removeClass('image1');
//		$('#big_image').removeClass('image2');
//		$('#big_image').removeClass('image3');
//		$('#big_image').removeClass('image4');
//		$('#big_image').removeClass('image5');
//			
//		big_image_index = index;
//		
//		$('#circle' + big_image_index).addClass('active_circle');
//		
//		$('#big_image').addClass('image' + big_image_index);
//		
//	}else{
	
	if( index > 0 ){
		
		big_image_index = index;
		
		$('#circle' + big_image_index).addClass('active_circle');
		
		$('#back_image').removeClass('image1');
		$('#back_image').removeClass('image2');
		$('#back_image').removeClass('image3');
		$('#back_image').removeClass('image4');
		$('#back_image').removeClass('image5');
		
		$('#back_left').removeClass('image1');
		$('#back_left').removeClass('image2');
		$('#back_left').removeClass('image3');
		$('#back_left').removeClass('image4');
		$('#back_left').removeClass('image5');						

		$('#back_right').removeClass('image1');
		$('#back_right').removeClass('image2');
		$('#back_right').removeClass('image3');
		$('#back_right').removeClass('image4');
		$('#back_right').removeClass('image5');							

		var cls = 'image' + big_image_index;
		
		$('#back_image').addClass(cls);
		$('#back_left').addClass(cls);
		$('#back_right').addClass(cls);
		
		$('#front_image').hide();
		$('#front_left').hide();
		$('#front_right').hide();			
					
			
	}else{
		
		// console.log(big_image_index);
		
		$('#circle' + big_image_index).addClass('active_circle');
		
		if( big_image_index < 5 ){
			big_image_index++;
		}else{
			big_image_index = 1;
		}

		if( $('#front_image').css('display') == 'none' ){
			
			$('#front_image').removeClass('image1');
			$('#front_image').removeClass('image2');
			$('#front_image').removeClass('image3');
			$('#front_image').removeClass('image4');
			$('#front_image').removeClass('image5');
			
			$('#front_left').removeClass('image1');
			$('#front_left').removeClass('image2');
			$('#front_left').removeClass('image3');
			$('#front_left').removeClass('image4');
			$('#front_left').removeClass('image5');						

			$('#front_right').removeClass('image1');
			$('#front_right').removeClass('image2');
			$('#front_right').removeClass('image3');
			$('#front_right').removeClass('image4');
			$('#front_right').removeClass('image5');						

			var cls = 'image' + big_image_index;
			
			$('#front_image').addClass(cls);
			$('#front_left').addClass(cls);
			$('#front_right').addClass(cls);						
			
			setTimeout('_change_big_image("in");', timeout);
		
		}else{
			
			$('#back_image').removeClass('image1');
			$('#back_image').removeClass('image2');
			$('#back_image').removeClass('image3');
			$('#back_image').removeClass('image4');
			$('#back_image').removeClass('image5');
			
			$('#back_left').removeClass('image1');
			$('#back_left').removeClass('image2');
			$('#back_left').removeClass('image3');
			$('#back_left').removeClass('image4');
			$('#back_left').removeClass('image5');						

			$('#back_right').removeClass('image1');
			$('#back_right').removeClass('image2');
			$('#back_right').removeClass('image3');
			$('#back_right').removeClass('image4');
			$('#back_right').removeClass('image5');										
			
			var cls = 'image' + big_image_index;
			
			$('#back_image').addClass(cls);
			$('#back_left').addClass(cls);
			$('#back_right').addClass(cls);											
		
			setTimeout('_change_big_image("out");', timeout);
		
		}
	}
}



function refresh_hover_buttons(){
	var width = screen_width();
	var left = Math.abs( $('#hover_buttons').outerWidth(true) / 2 - width / 2 );
	$('#hover_buttons').css('left', left + 'px');
}


function close_form(){
	$('#form_wrapper').hide();
	$('#overlay').hide();
}

function open_form(){
	
	$('#form_wrapper').draggable({ handle: 'h4' });	
	
	var width = screen_width();
	var w = $('#form_wrapper').outerWidth();
	var left = width / 2 - w / 2;
	
	var height = screen_height();
	var h = $('#form_wrapper').outerHeight();
	var top = height / 2 - h / 2;	
	
	$('#form_wrapper').css('top', top + 'px');
	$('#form_wrapper').css('left', left + 'px');
	
	$('#overlay').show();
	$('#form_wrapper').show();
}

function close_live_support(){
	$('#live_support').hide();
	$('#overlay').hide();	
}

function open_live_support(){

	$('#live_support').draggable({ handle: 'h4' });	
	
	var width = screen_width();
	var w = $('#live_support').outerWidth();
	var left = width / 2 - w / 2;
	
	var height = screen_height();
	var h = $('#live_support').outerHeight();
	var top = height / 2 - h / 2;	
	
	$('#live_support').css('top', top + 'px');
	$('#live_support').css('left', left + 'px');
	
	$('#overlay').show();
	$('#live_support').show();
}

function submit_form_calculation(){
	$('#form_calculation').submit();
}

function submit_feedback_form(){

	var name = $('#name').val();
	var company = $('#company').val();
	var phone = $('#phone').val();
	var comments = $('#comments').val();
	
	$('#feedback_form_messages').hide();
	$('#feedback_form_messages').html('');
	
	cmd( 'submit_feedback_form', name, company, phone, comments );
	
}


function ajax_command(_params){
	
	var params = {
		// Команда.
		action: '',
		// Код элемента, где требуется показать индикатор.
		element_id: '',
		data: {},
		callback: '',
		service: 'chelprint',
		async: false
	}
	
	// Обработка полученных параметров.
	for( name in _params ){
		params[ name ] = _params[ name ];
	}		

	$.ajax({
		type: 'POST',
		dataType: 'json',
		async: params.async,
		url: '/index.php?_service=' + params.service + '&action=' + params.action,
		data: 'data=' + encodeURIComponent($.toJSON(params.data)),
		beforeSend: function(XMLHttpRequest){
			if( params.element_id != '' ){
				var html = '<img src="/site/interfaces/chelprint/images/ajax-loader.gif" />';
				$('#' + params.element_id).html(html);
				$('#' + params.element_id).show();
			}
		},
		success: function(answer, textStatus){
			$('#' + params.element_id).hide();
			$('#' + params.element_id).html('');
			params.callback(answer);
			
		}
	});	
}


function cmd(action){
	
	var data = {};
	
	var async = false; 
	var element_id = '';
	
	switch( action ){
		case 'calculate':
			
			if( $('#calc').hasClass('state_inactive') ){
				return false;
			}
			
			if( $('#from').val() == '' )
				$('#from_city').val('');

			if( $('#to').val() == '' )
				$('#to_city').val('');
		
			data.from = $('#from_city').val();
			data.to = $('#to_city').val();
			data.volume = $('#volume').val();
			data.weight = $('#weight').text();
			
			$('#calc_mes').html('');
			
			break;
		case 'submit_feedback_form':
			
			data.name = $('#name').val();
			data.company = $('#company').val();
			data.phone = $('#phone').val();
			data.comments = $('#comments').val();
			
			element_id = 'ajax_indicator';
			
			
			break;
	}
	
	ajax_command({
		action: action,
		data: data,
		element_id: element_id,
		async: async, 
		callback: function(answer){
			switch( answer.action ){
				case 'calculate':
						
					$('#amount').html( answer.amount );
					
					$('#calc_mes').html( answer.messages );
						
					break;
				case 'submit_feedback_form':
					
					if( answer.messages != ''){
						
						$('#feedback_form_messages').show();
						$('#feedback_form_messages').html( answer.messages );
						
					}
					
					
					if( answer.error == false ){
						
						$('#name').val('');
						$('#company').val('');
						$('#phone').val('');
						$('#comments').val('');						
						
					}
					
				
					break;
			}
		}
	});
	
}



function check_box_click2( img_id, name ){
	check_box_click( img_id, name );
}


function show_scheme(index){
	
	var width = screen_width();
	var height = screen_height();
	
	var left = Math.round( width / 2 - $('#scheme_wrapper').width() / 2 );
	var top = Math.round( height / 2 - $('#scheme_wrapper').height() / 2 );
	
	$('#overlay').show();
	$('#scheme_wrapper').show();
	
	$('#scheme_img' + index).show();
	
	$('#scheme_wrapper').css('top', top);
	$('#scheme_wrapper').css('left', left);	
	
}

function close_scheme(){
	$('#overlay').hide();
	
	$('#scheme_img1').hide();
	$('#scheme_img2').hide();
	$('#scheme_img3').hide();
	$('#scheme_img4').hide();
	
	
	$('#scheme_wrapper').hide();
}

function close_overlay(overlay){
	
	close_live_support();
	close_form();
	close_scheme();
	
}

function onload_photo( ind, img ){
	img_width = img_width + img.width + 110;
//	console.log(img_width);	
	eq_list();
}

function eq_list(){
	$('#equipment_list').css('width', img_width + 'px');
	$('#equipment_list').show();
}

/**
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
* Version: 0.0.8a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
*
* Example usage:
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
**/
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();
