
	var isSelectedDelete = false;
	var strCheckedItem = ""
	function CheckBoxControl(cName,tableName,hiColor,rowNo){
		if(cName.checked==true){
			document.getElementById(tableName).rows[rowNo].style.backgroundColor=hiColor
			strCheckedItem = strCheckedItem + "," + rowNo + ","
		}else{
			document.getElementById(tableName).rows[rowNo].style.backgroundColor="#FFFFFF"
			strCheckedItem = strCheckedItem.replace("," + rowNo + ",","")
		}
		
		if(strCheckedItem==""){
			isSelectedDelete = false
		}else{
			isSelectedDelete = true
		}
	}
	
	function selectAllCheckBox(obj){
		var oCheckbox = document.getElementsByName("chkbox01")
		for(var i=0;i<oCheckbox.length;i++){
			if(!oCheckbox[i].disabled){
				if(obj.checked){
					isSelectedDelete = true
					oCheckbox[i].checked=true
				}else{
					oCheckbox[i].checked=false
				}
			}
		}
	}
	
	function deleteSelectedRecord(url){
		if(isSelectedDelete){
			if(confirm("Seçili kayıtları silmek istediğinize eminmisiniz?")){
				document.frmList.action = url;
				document.frmList.submit();
			}
		}else{
			alert("Öncelikle seçim yapmalısınız")
		}
	}
	
	function processSelectedRecord(url,confirmText){
		if(isSelectedDelete){
			if(confirm(confirmText)){
				document.frmList.action = url;
				document.frmList.submit();
			}
		}else{
			alert("Öncelikle seçim yapmalısınız")
		}
	}
	
	function deleteRecord(url){
		if(confirm("Kaydı silmek istediğinize eminmisiniz?")){
			window.location.href=url
		}
	}
	
	function ComboAutoSelected(objDropDown,selectedValue){
		for (i=0;i<=objDropDown.length-1;i++){
			if (objDropDown.options[i].value == selectedValue){
				objDropDown.selectedIndex = i ;
			}
		}	
	}
	
	function IsNumberic(v,maxOrdCnt,minOrdCnt) {
		var isNum = /^[0-9]*$/;
		if (!isNum.test(v.value)) {
			v.value = v.value.replace(/[^0-9]/g,"");
		}

		if(v.value>0){
			if(maxOrdCnt<=minOrdCnt){minOrdCnt = maxOrdCnt}
			
			if(v.value>(maxOrdCnt*1) && maxOrdCnt.length>0){
				if(confirm("Bu ürün stoklarımızda " + maxOrdCnt + " adettir. Otomatik olarak " + maxOrdCnt + " adet ayarlansınmı?")){
					v.value=maxOrdCnt
				}else{
					v.value=""	
				}
			}else if(v.value<(minOrdCnt*1) && minOrdCnt.length>0){
				if(confirm("Bu üründen minimum " + minOrdCnt + " adet sipariş edebilirsiniz. Otomatik olarak " + minOrdCnt + " adet ayarlansınmı?")){
					v.value=minOrdCnt
				}else{
					v.value=""
				}
			}
		}
	}
	

	function showHideShoppingCardIFrame(isShoppingCard,IsRefresh,strImage){
		var location
		
		try{
			if(window.parent.document.getElementById('ifrmShoppingCard')){
				location = window.parent
			}else if(window.opener.document.getElementById('ifrmShoppingCard')){
				location = window.opener
			}
		}catch(e){
		
		}
		if(location){
			if(isShoppingCard){
				location.document.getElementById('ifrmShoppingCard').height = document.getElementById("oTblShoppingCard").offsetHeight
				location.document.getElementById('btnTeklifGonder').src = "files/images/btn-" + strImage + "-tamamla.png"
				location.document.getElementById('btnTeklifGonder').onclick = function newFN(){location.validation();}
				location.document.getElementById('btnTeklifGonder').style.cursor = "pointer"
				if(IsRefresh){
					location.document.getElementById('ifrmShoppingCard').src = location.document.getElementById('ifrmShoppingCard').src
				}
			}else{
				location.document.getElementById('ifrmShoppingCard').height="0px"
				location.document.getElementById('btnTeklifGonder').src = "files/images/btn-" + strImage + "-tamamla-disabled.png"
				location.document.getElementById('btnTeklifGonder').onclick="";
				location.document.getElementById('btnTeklifGonder').style.cursor = "default"
			}
		}
	}
	
	function setValueIsnetObject(objName,objValue){
		var wiInputObject = ISGetObject(objName);
 		wiInputObject.SetValueData(objValue);
		
		document.getElementById("hd_"+objName).value = objValue

	}
	
	function sendData(url,isRefresh,isReturn){
		    oxmlhttp = null;
		    try{ 
			    oxmlhttp = new XMLHttpRequest();
			    oxmlhttp.overrideMimeType("text/xml");
		    }catch(e){ 
			    try{ 
				    oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			    }catch(e){ 
		            return null;
		        }
		    }
    		
		    if(!oxmlhttp) {return null;}
    		
	        try{
		        oxmlhttp.open("GET",url,false);
		        oxmlhttp.send(null);
    			
		        if(isReturn && oxmlhttp.responseText.length>0){
			        return oxmlhttp.responseText;				
		        }
    			
		        if(isRefresh){
			        window.location.reload();
		        }
	        }catch(e){ return null;}
    	    
	    }
	
