
function openContactWindow() {
    window.open("http://adult.dougapost.com/contact.php", "_blank","width=480,height=300");
};


function inputDefault(elm, msg) {
	this.elm     = elm;
	this.msg     = msg;
	this.color   = '#999999';
}

         inputDefault.prototype.set = function() {
            this._cleared    = false;
            this._defColor   = this.elm.style.color;

            this.elm.value        = this.msg;
            this.elm.style.color  = this.color;

            var _this = this;
            addEvent( this.elm,      'focus',  function() { _this.clear();  } );
            addEvent( this.elm.form, 'submit', function() { _this.submit(); } );
         }

         inputDefault.prototype.clear = function() {
            if(this._cleared) return;

            this.elm.style.color            = this._defColor;
            this.elm.value = '';
            this._cleared  = true;
         }

         inputDefault.prototype.submit = function() {
            if(this._cleared) return;

            var _this = this;
            this.elm.disabled = true;
            window.setTimeout(function() { _this.elm.disabled = false; }, 1);
         }


         function addEvent(elm, type, event) {
            if(elm.addEventListener) {
               elm.addEventListener(type, event, false);
               } else if(elm.attachEvent) {
               elm.attachEvent('on'+type, event);
               } else {
               elm['on'+type] = event;
            }
         }

function init() {

	var input = new inputDefault(document.getElementById('searchForm'), ' 動画のキーワードを入力 ');
	input.set();
}

function Search(query,page,r) {
	SearchFormP.q.value = query;
	SearchFormP.p.value = page;
	SearchFormP.r.value = r;
	SearchFormP.submit();
}

function List(id,page) {
　　ListForm.id.value = id;
	ListForm.p.value = page;
　　ListForm.submit();
}
