//13233481//
//-------Including special_format.js--------//
function open_special_format_win(){set_special_format_data();waiting(1000);var s_layer_title="<div id='win_sl_top'></div>";var s_layer_content="<div id='win_sf_content'><div id='CALC_showText_Div'></div><div id='CALC_showBoxes_Div'><div id='CALC_showDiv_left'><span id='CALC_showText_left' class='boxHead'></span><input id ='CALC_insertFormat_Input' onFocus='clearText(this.value);' class='text' value='' name='special_format' type='text' size='30' maxlength='50'></div><div class='Clear'></div></div><div id='CALC_ErrorText'></div><div id='CALC_specialFormat_layer_Btn'><div id='CALC_layer_use_Btn'></div><div id='CALC_layer_abort_Btn'></div></div></div>";o_message_layer=$("AdviceSpecialFormatLayer");if(portalShortCut=="p24"){layerswitch();var win=openLayer("","s","",portalShortCut,"special_format_layer",s_layer_title,1);win.setTextContent(s_layer_content);waiting(1000);viewSelectboxes();win.setDestroyOnClose()}else{var userAgent=navigator.userAgent;var i_top_distance=0;if(o_message_layer){i_top_distance=((getDocHeight()-(o_message_layer.getHeight()/2))/3)+"px";if(portalShortCut=="gp"){i_top_distance=347}o_message_layer.setStyle({top:i_top_distance});o_message_layer.style.display="block";if($("MessageLayerBackround")){$("MessageLayerBackround").style.display="block";$("MessageLayerBackround").style.height=getDocHeight();$("MessageLayerBackround").style.width=getDocWidth();$("MessageLayerBackround").style.filter="alpha(opacity=70)";$("MessageLayerBackround").style.opacity=".7";window.onresize=function(){$("MessageLayerBackround").style.height=getDocHeight()}}}}}function set_special_format_data(){var ajax_request=a_get_request_props();var s_ajax_request=ajax_request.join("%");var special_format=$j("#CALC_insertFormat_Input").val();$j.ajax({url:startpage_plain+"cgi-bin/ajax.cgi?&cmd=special_format_layer",type:"POST",dataType:"json",data:{cmd:"special_format_layer",pg:"special_format_layer",props:s_ajax_request,special_format:special_format,sid:sid},success:function(obj_special_format_layer){if(obj_special_format_layer.b_format_check==0){$j("#CALC_showText_Div").html(obj_special_format_layer.text);$j("#CALC_showText_left").html(obj_special_format_layer.headline_left);$j("div#CALC_insertFormat_Input").html(obj_special_format_layer.input_value);$j("#CALC_showText_right").html(obj_special_format_layer.headline_right);$j("div#CALC_layer_use_Btn").html(obj_special_format_layer.button_use);$j("div#CALC_layer_abort_Btn").html(obj_special_format_layer.button_abort);$j("#CALC_insertFormat_Input").val(obj_special_format_layer.input_value);if(obj_special_format_layer.error_text){$j("#CALC_ErrorText").html(obj_special_format_layer.error_text);if(portalShortCut=="p24"){$j("#CALC_ErrorText").attr("style","width: 347px; margin-top: 15px; margin-bottom: -2px;")}if(portalShortCut=="up"){$j("#CALC_ErrorText").attr("style","margin-bottom: -6px;")}if(portalShortCut=="gp"){$j("#CALC_ErrorText").attr("style","width: 294px; margin-bottom: -3px; _margin-bottom: -2px;")}if(portalShortCut=="pw"){$j("#CALC_ErrorText").attr("style","width: 336px; margin-top: 17px; _margin-top: 16px; margin-bottom: 0px; _margin-bottom: -2px;")}if(portalShortCut=="fp"){$j("#CALC_ErrorText").attr("style","width: 362px; margin-top: 15px; _margin-top: 14px; margin-bottom: -3px; _margin-bottom: -2px;")}}if(portalShortCut=="up"){inactiv_color="#909090"}else{if(portalShortCut=="p24"){inactiv_color="#969696"}else{if(portalShortCut=="gp"){inactiv_color="#B2B2B2"}else{if(portalShortCut=="pw"||portalShortCut=="fp"){inactiv_color="#AAAAAA"}}}}$j("#CALC_insertFormat_Input").attr("style","color:"+inactiv_color+";");if(portalShortCut=="p24"){var height=$j("#win_sf_content").height();$j("#win_special_format_layer_content").attr("style","height:"+height+";");return(obj_special_format_layer)}}else{top.Windows.closeAll();if(portalShortCut!="p24"){hide_special_format_layer()}$j("#c_format div:first div:first").attr("property",obj_special_format_layer.i_pgr_id+"-1");$j("#c_aspect_ratio div:first div:first").attr("property",obj_special_format_layer.i_variant_value_id);var elements=$j("#c_shipping_type div.selected:first");elements[0].click?elements[0].click():elements.click()}}})}function hide_special_format_layer(){if(portalShortCut=="pw"||portalShortCut=="gp"){getIframeLink()}var cssObj={display:"none"};$j("#AdviceSpecialFormatLayer").css(cssObj);$j("#MessageLayerBackround").css(cssObj);$j("#CALC_insertFormat_Input").val("")}function waiting(ms){var dt=new Date();dt.setTime(dt.getTime()+ms);while(new Date().getTime()<dt.getTime()){}}function clearText(oThis){var activ_color="";var input_value=$j("#CALC_insertFormat_Input").val();if(oThis==input_value){$j("#CALC_insertFormat_Input").val("")}if(portalShortCut=="p24"||portalShortCut=="pw"){activ_color="#000000"}else{if(portalShortCut=="up"||portalShortCut=="gp"){activ_color="#003399"}else{if(portalShortCut=="fp"){activ_color="#516274"}}}$j("#CALC_insertFormat_Input").attr("style","color:"+activ_color+";")};

