function Alkupon() {
	var DistrictTimer;
	var CityTimer;
	var UserTimer;

        function elementMouseEvent(element,cursor1,textcolor,backgroundcolor1,border1) { //a:link tagi yerine div lere link verilirse kullanisli bir fonksiyon..
		if(cursor1 != "pointer")
			element.style.cursor = cursor1;
		else {
			element.style.cursor = cursor1;
			element.style.cursor = "pointer";
		}

		if (textcolor!='' && textcolor!= null) {
			element.style.color = textcolor; //Ex.'underline' - 'none'
		}
		else if(textcolor == '') {
			element.style.color = '#333';
		}

		if (backgroundcolor1!='' && backgroundcolor1!= null) {
			element.style.backgroundColor = backgroundcolor1; //Ex.  '#D4E7F8'  - 'transparent'
		}
		else if(backgroundcolor1 == '') {
			element.style.backgroundColor = 'transparent'; //Ex.  '#D4E7F8'  - 'transparent'
		}

		if (border1!='' && border1!= null) {
			element.style.border = border1; //Ex.  '
		}
		else if(border1 == '') {
			element.style.border = 'none';
		}

	}

	function showHide(ID) {
                if (document.getElementById(ID)) {
                        if ((document.getElementById(ID).style.visibility == 'hidden')||(document.getElementById(ID).style.visibility == '')) {
            			document.getElementById(ID).style.visibility = 'visible';
				document.getElementById(ID).style.display='block';
			} else {
				this.hide(ID);
			}
		}
	}

        function display(ID) {
                if (document.getElementById(ID)) {
			document.getElementById(ID).style.visibility = 'visible';
			document.getElementById(ID).style.display='block';
		}
	}

	function hide(ID) {
		if (document.getElementById(ID)) {
			document.getElementById(ID).style.visibility = 'hidden';
			document.getElementById(ID).style.display='none';
		}
	}

        function changeHeight(ID,h) {
                if (document.getElementById(ID)) {
			document.getElementById(ID).style.height = h+'px';
		}
	}

	function selectCity(olist1,div_city_name,div_will_hide1) {
		ind = olist1.selectedIndex;
		if(ind >= 0) {
			text = olist1[ind].text;
			value = olist1[ind].value;
			document.getElementById(div_city_name).innerHTML = text;
			this.hide(div_will_hide1);

		}
	}

	function selectDistrict(olist1,div_district_name,div_will_hide1) {
		ind = olist1.selectedIndex;
		if(ind >= 0) {
			text = olist1[ind].text;
			value = olist1[ind].value;
			document.getElementById(div_district_name).innerHTML = text;
			this.hide(div_will_hide1);
		}
	}

	function clearDistrictTimer() {
		clearTimeout(DistrictTimer);
	}

	function setDistrictTimer(ID) {
		var wait = 300; //  mili seconds
		DistrictTimer = setTimeout("oAlkupon.hide('"+ID+"')", wait);
	}

	function clearCityTimer() {
		clearTimeout(CityTimer);
	}

	function setCityTimer(ID) {
		var wait = 300; //  mili seconds
		CityTimer = setTimeout("oAlkupon.hide('"+ID+"')", wait);
	}

	function clearUserTimer() {
		clearTimeout(UserTimer);
	}

	function setUserTimer(ID) {
		var wait = 300; //  mili seconds
		UserTimer = setTimeout("oAlkupon.hide('"+ID+"')", wait);
	}

	function show(page){
                document.location.href = page;
        }
        
        function uncheck(ID) {
                
                if (document.getElementById(ID)) {
                        document.getElementById(ID).checked = false;
		}		
	}

        function check(ID) {

                if (document.getElementById(ID)) {
                        document.getElementById(ID).checked = true;
		}
	}

        this.uncheck = uncheck;
        this.check = check;
        this.showHide = showHide;
        this.display = display;
        this.changeHeight = changeHeight;
        this.selectCity = selectCity;
        this.selectDistrict = selectDistrict ;
        this.hide = hide;
        this.elementMouseEvent = elementMouseEvent;
        this.clearDistrictTimer = clearDistrictTimer;
        this.setDistrictTimer = setDistrictTimer;
        this.clearCityTimer = clearCityTimer;
        this.setCityTimer = setCityTimer;
        this.clearUserTimer = clearUserTimer;
        this.setUserTimer = setUserTimer;
        this.show = show;
}

var oAlkupon = new Alkupon();



