/* 
 * This software and source code is private property protected
 * under copyright laws. Any form of using this software or
 * source code for commercial or non-commercial purposes is
 * strictly forbidden. If you don't own written permission to
 * view or use this source code from author of the software, you
 * are to close and delete this file immediately.
 * 
 * Any non-permitted use of this software or source code will be
 * punished by law.
 * 
 * Copyright (2011) Michal Sukupčák (michal.sukupcak@gmail.com)
 */

function submitOnEnter(submitForm,submitEvent) {
    var keyCode;
    if (Window.event) {
	keyCode = Window.event.keyCode;
    } else if (submitEvent) {
	keyCode = submitEvent.which;
    } else {
	return true;
    }
    if (keyCode == 13) {
	submitForm.form.submit();
	return false;
    } else {
	return true;
    }
}

function windowOpen(url) {
    window.location.href = url;
}
