function reload(time) {
	setTimeout("document.location.reload()", time);
}
function moveToSite(where) {
	var skrypt="document.location.replace(\""+where+"\")";
	//alert(skrypt);
	setTimeout(skrypt, 3000);
}
function moveToFlashRTS(where) {
	document.location.replace("http://qlplay.com/MiniFlashRTS");
}
function paymentSelected(payment) {
		myForm=document.getElementById('payform');
	if (payment.selectedIndex==0) {
		myForm.action='oplaty.php5';
	} else {
		document.getElementById('amount').value=payment.options[payment.selectedIndex].value;
		myForm.action="https://www.platnosci.pl/paygw/ISO/NewPayment";
	}
}
function smsPaymentSelected(payment) {
		myForm=document.getElementById('smsform');
	if (payment.selectedIndex==0) {
		myForm.action='oplaty.php5';
	} else {
		document.getElementById('smsAmount').value=payment.options[payment.selectedIndex].value;
		myForm.action="https://www.platnosci.pl/paygw/ISO/NewSMS";
	}
}
function paypalPaymentSelected(payment) {
		myForm=document.getElementById('paypalform');
	if (payment.selectedIndex==0) {
		myForm.action='oplaty.php5';
	} else {
		var str=payment.options[payment.selectedIndex].value;
		document.getElementById('paypal_amount').value=str.substring(0,str.indexOf('@'));
		document.getElementById('currency_code').value=(str.substr(str.indexOf('@')+1)).toUpperCase();
		myForm.action="https://www.paypal.com/us/cgi-bin/webscr";
	}
}

function changeLanguage(language) {
	document.cookie='language='+language;
	var str=document.URL;
	str=str.replace("?pl=true", "");
	str=str.replace("&pl=true", "");
	str=str.replace("pl=true", "")
	window.location.replace(str);
	//document.location.reload();
}
function popup(username, points, id, from) {
	var string=username+" - "+points;
	myWindow=window.open('', '', "directories=no, location=no, menubar=no, titlebar=no, scrollbars=no, status=no, toolbar=no, width=700, height=430");
	myWindow.document.write(username+" - "+points+"<br /><img src=\"images.php5?id="+id+"&from="+from+"&resize=1\" />");
}
function makeAmount(amountField) {
	amount=document.getElementById('amount_field');
	amount.value=amountField.value*100.0;
}
function newWindow(adres) {
	window.open(adres, '');
}