///CurrencyFormat
function currencyFormat(fld, milSep, decSep, e)
		{
			var sep = 0;
			var key = '';
			var i = j = 0;
			var len = len2 = 0;
			var strCheck = '0123456789';
			var aux = aux2 = '';
			var whichCode = (window.Event) ? e.which : e.keyCode;
				if (whichCode == 13) return true;
					key = String.fromCharCode(whichCode);
				if (strCheck.indexOf(key) == -1) return false;
					len = fld.value.length;
				for(i = 0; i < len; i++)
				if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
					aux = '';
				for(; i < len; i++)
				if (strCheck.indexOf(fld.value.charAt(i))!=-1) aux += fld.value.charAt(i);
					aux += key;
					len = aux.length;
				if (len == 0) fld.value = '0';
				if (len == 1) fld.value = '0'+ decSep + '0' + aux;
				if (len == 2) fld.value = '0'+ decSep + aux;
				if (len > 2)
			{
					aux2 = '';
				for (j = 0, i = len - 4; i >= 0; i--)
			{
				if (j == 3)
			{
					aux2 += milSep;
					j = 0;
			}
					aux2 += aux.charAt(i);
					j++;
			}
					fld.value = '';
					len2 = aux2.length;
				for (i = len2 - 1; i >= 0; i--)
				fld.value += aux2.charAt(i);
				fld.value += decSep + aux.substr(len - 3, len);
			}
				return false;
			}

//////

function showimg(form)
		{
			adres = form.image_file.value;
			index = adres.indexOf(".gif");
			index = index + adres.indexOf(".jpg");
			index = index + adres.indexOf(".bmp");
			if (form.image_file.value == "")
		 {
			alert("Lütfen Resim Seçiniz !");
		 }
			else
		 {
			if (index == -3){alert("Seçtiğiniz dosya resim değildir.\n\n Lütfen resim seçiniz");
		    form.width.value=0;
		    form.height.value=0;}
		  else
	    {
		    var img_obj = new Image();
		    img_obj = form.image_file.value;
		    document.changing.src = img_obj;
		    document.changing2.src= img_obj;
		    document.changing.width = document.changing2.width;
		    document.changing.height = document.changing2.height;
		    set();
		}
		}
		}
			fast = 0;
			change = 0;
			
function upw()
		{
			  document.image.width.value=parseInt(document.image.width.value)+1;
			  resize();
		}

function over_upw(){upw();
			change = 1;
		    changetime = setTimeout("fast_upw()","600");
		}

function fast_upw(){clearTimeout(changetime);
			upw();
			fast = setTimeout("fast_upw()","100");
		}

function clt()
		{
			if (change == 1){clearTimeout(changetime);
		}
			clearTimeout(fast);
			change = 0;
		}

function resize()  
		{
			document.changing.height = document.image.height.value;
			document.changing.width = document.image.width.value;
		}

function downw()
		{
			document.image.width.value=parseInt(document.image.width.value)-1;
			resize();
		}

function over_downw()
		{
			downw();
			change = 1;
			changetime = setTimeout("fast_downw()","600");
		}

function fast_downw()
		{
			clearTimeout(changetime);
			downw();
			fast = setTimeout("fast_downw()","100");
		}

function uph()
		{
			document.image.height.value=parseInt(document.image.height.value)+1;
			resize();
		}

function over_downh()
		{
			downh();
			change = 1;
			changetime = setTimeout("fast_downh()","600");
		}

function fast_downh()
		{
			clearTimeout(changetime);
			downh();
			fast = setTimeout("fast_downh()","100");
		}

function over_uph()
		{
			uph();
			change = 1;
			changetime = setTimeout("fast_uph()","600");
		}

function fast_uph()
		{
			clearTimeout(changetime);
			uph();
			fast = setTimeout("fast_uph()","100");
		}

function downh()
		{
			document.image.height.value=parseInt(document.image.height.value)-1;
			resize();
		}

function set()
		{
			document.image.width.value=document.changing.width;
			document.image.height.value=document.changing.height;
		}