Event.observe(window,'load',function(){

var keyword_last = $('keyword_last') || false;
var photo_pass = $('photo_pass') || false;
//キーワードが入力された場合、検索可//////////////////////////////
//$('keyword').focus();

Event.observe($('keyword'),'keyup',function(){
$('submit').disabled = ($F('keyword') != '') ? false : true;
});

Event.observe($('keyword'),'mouseup',function(){
$('submit').disabled = ($F('keyword') != '') ? false : true;
});
//////////////////////////////////////////////////////////////

//キーワードが入力された場合、検索可//////////////////////////////
//$('keyword_last').focus();z

keyword_last && Event.observe($('keyword_last'),'keyup',function(){
$('submit_last').disabled = ($F('keyword_last') != '') ? false : true;
});

keyword_last && Event.observe($('keyword_last'),'mouseup',function(){
$('submit_last').disabled = ($F('keyword_last') != '') ? false : true;
});
//////////////////////////////////////////////////////////////

//キーワードが入力された場合、検索可//////////////////////////////
photo_pass && $('photo_pass').focus();

photo_pass && Event.observe($('photo_pass'),'keyup',function(){
$('pass').disabled = ($F('photo_pass') != '') ? false : true;
});

photo_pass && Event.observe($('photo_pass'),'mouseup',function(){
$('pass').disabled = ($F('photo_pass') != '') ? false : true;
});
//////////////////////////////////////////////////////////////

/*

if (!document.getElementsByTagName) return false;
	var lists = document.getElementsByTagName("img");
	for (var i=0; i < lists.length; i++) {
		if (lists[i].className.match("picture")) {
			var elem = $(lists[i].id);
				(function(el){
					Event.observe(el,'mouseover',function(){
					//mouseover マウスが乗ったら　click クリックしたら
						
						new Effect.Pulsate(el.id,{ from:0.5,to:1.0,duration:1.0});
						var tmp = "BigImage"+name;
						$(tmp).src = el.name;
						new Effect.Appear(tmp, { from:0.1, to:1.0 });
					});
					Event.observe(el,'click',function(){
						$('showimage').innerHTML = '<img id="syousaimage" src="'+el.name+'" />';
						var di = Element.getDimensions("");
						if(di.width>=di.height){
							if(di.width>480){
								$('showimage').innerHTML = '<img id="syousaimage" src="'+el.name+'" width="480" /><div class="center"><input id="imageclose" type="button" value="閉じる" /></div>';
								Element.setStyle($('showimage'), {"border":"20px ridge #C8DCF8","text-align":"center",position:"fixed",top:"50%",left:"50%","margin-left":"-240px","margin-top":"-"+((Element.getDimensions("syousaimage").height)/2)+"px",width:"480px",height:Element.getDimensions("syousaimage").height+"px","z-index":2});
							}else{
									$('showimage').innerHTML = '<img src="'+el.name+'" width="'+di.width+'" /><div class="center"><input id="imageclose" type="button" value="閉じる" /></div>';
									Element.setStyle($('showimage'), {"border":"20px ridge #C8DCF8","text-align":"center",position:"fixed",top:"50%",left:"50%","margin-left":"-"+(di.width/2)+"px","margin-top":"-"+(di.height/2)+"px",width:di.width+"px",height:di.height+"px","z-index":2});
								}
							}else{
								if(di.height>480){
									$('showimage').innerHTML = '<img id="syousaimage" src="'+el.name+'" height="480" /><div class="center"><input id="imageclose" type="button" value="閉じる" /></div>';
									Element.setStyle($('showimage'), {"border":"20px ridge #C8DCF8","text-align":"center",position:"fixed",top:"50%",left:"50%","margin-left":"-"+((Element.getDimensions("syousaimage").width)/2)+"px","margin-top":"-240px",width:Element.getDimensions("syousaimage").width+"px",height:"480px","z-index":2});
								}else{
									$('showimage').innerHTML = '<img src="'+el.name+'" height="'+di.height+'" /><div class="center"><input id="imageclose" type="button" value="閉じる" /></div>';
									Element.setStyle($('showimage'), {"border":"20px ridge #C8DCF8","text-align":"center",position:"fixed",top:"50%",left:"50%","margin-left":"-"+(di.width/2)+"px","margin-top":"-"+(di.height/2)+"px",width:di.width+"px",height:di.height+"px","z-index":2});
								}
							}
							new Effect.Appear("showimage",{ from:0.1, to:1.0,deration:1.0,afterFinish:function(){
								new Draggable("showimage");
							}
							});
							Event.observe("imageclose",'click',function(){
								new Effect.Fade("showimage",{ from:1.0, to:0.01,deration:1.0,afterFinish:function()
								{
								$('showimage').innerHTML = '';
								Element.setStyle($('showimage'), {"z-index":"-1"});
								}
								});
							});
						
							alert("huhuhuhu");
					
				})(elem);
		}
	}*/
});