function win_open(){
ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'none', 'Diki.pl', 'width=417px,height=380px,left=400px,top=150px,resize=1,scrolling=1');
ajaxwin.hide();
//go2();
}

function go2(){
var right = document.getElementById('right');
right.style.borderColor='red';
var word = document.getElementById('wordfield');
var url = 'http://www.diki.pl/slownik-angielskiego/?q='+word.value;
ajaxwin.show();
ajaxwin.load('iframe', url, 'Diki.pl');
word.value='';
return false;
}

function size1(){
var iframe = document.getElementById('dict');
var dic_wrap = document.getElementById('dict_wrap');
iframe.style.height = '225px'; 
dic_wrap.style.height = '274px';
}
function size2(){
var iframe = document.getElementById('dict');
var dic_wrap = document.getElementById('dict_wrap');
iframe.style.height = '325px'; 
dic_wrap.style.height = '374px';
}
function size3(){
var iframe = document.getElementById('dict');
var dic_wrap = document.getElementById('dict_wrap');
iframe.style.height = '425px'; 
dic_wrap.style.height = '474px';
}

function go(){
var dic = document.getElementById('dict');
var dict_wrap2 = document.getElementById('dict_wrap2');
dict_wrap2.style.height='275px';
var right_ = document.getElementById('right_wrap');
var dic_wrap = document.getElementById('dict_wrap');
var dic_wrap = document.getElementById('dict_wrap');
	if (dic_wrap.style.display!="block"){
		dic_wrap.style.display="block";
		dic_wrap.style.height='274px';
		right_.style.display="none";
	};

var word = document.getElementById('wordfield');
var url = 'http://www.diki.pl/slownik-angielskiego/?q='+word.value;
dic.src=url;
word.value='';
return false;
}

function dict_close(){
var dic_wrap = document.getElementById('dict_wrap');
var right_ = document.getElementById('right_wrap');
var dict_wrap2 = document.getElementById('dict_wrap2');

if (dic_wrap.style.display!="none"){
	dict_wrap2.style.height='0px';
	dic_wrap.style.display="none";
	right_.style.display="block";
	size1();
	
};

}

// JavaScript Document
function smiley(code){
	var cache = document.q_add.tresc.value;
	this.code = code;
	document.q_add.tresc.value = cache + "<img src='/img/smileys/" + code + ".gif'>";
	document.q_add.tresc.focus();
}

// F. Permadi May 2000 - thanks to the author for the hint & inspiration!
function getMovie(mName){
	
	if (window.document[mName]){
		return window.document[mName];
	}

	if (navigator.appName.indexOf("Microsoft Internet")==-1){
	
		if (document.embeds && document.embeds[mName]){
			return document.embeds[mName];
		}
	}
	else{
		return document.getElementById(mName);
	}
}

function SendData(dir,word){
	var flashMovie=getMovie("play_but");
	flashMovie.SetVariable("/:myword", word);
	flashMovie.SetVariable("/:dir2", dir);
	flashMovie.SetVariable("/:is_playing", "1");
	  
}



/***********************************************
* Disable \"Enter\" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
                
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}

