function pass_error()
{
return true
}
document.onerror=pass_error

var button_click
button_click=""
function btn_clk_roll(obj_id) {
	document.all(obj_id).filters.alpha.style=0
}
function btn_clk(obj_id) {
	document.all(obj_id).filters.alpha.style=3
	window.clearInterval(button_click);
	obj_id_deg=obj_id;
	button_click=window.setInterval("btn_clk_roll(obj_id_deg)", 200);
}

function btn_clk_roll_2(obj_id,aktif_sorgu_id) {
	document.all(obj_id).filters[2].enabled=1
	document.all(aktif_sorgu_id).filters[2].enabled=0
}
function btn_clk_2(obj_id,aktif_sorgu_id) {
	document.all(obj_id).filters[2].addCone(-50,0,300,400,60,238,233,245,55,100);
	window.clearInterval(button_click);
	obj_id_deg=obj_id;
	aktif_sorgu_id_deg=aktif_sorgu_id
	//button_click=window.setInterval("btn_clk_roll_2(obj_id_deg,aktif_sorgu_id_deg)", 200);
	btn_clk_roll_2(obj_id_deg,aktif_sorgu_id_deg)
	document.all(aktif_sorgu_id_deg).filters[2].clear()
}


function btn_clk_roll_3(obj_id) {
	document.all(obj_id).filters[2].enabled=0
	document.all(obj_id).filters[2].clear()
}
function btn_clk_3(obj_id) {
	if (obj_id!=aktif_sorgu){
		document.all(obj_id).filters[2].enabled=1
		document.all(obj_id).filters[2].addCone(-80,10,300,400,60,247,247,247,55,100);
	}
}

function show_hata(hata_msg,lbl_id){
	if(lbl_id==null){lbl_id=""}
	msg_init()
	document.all("img_hata"+lbl_id).style.display='';
	document.all("img_ok"+lbl_id).style.display='none';
	document.all("hatsat"+lbl_id).innerText=hata_msg;
	lbl_id_deg=lbl_id
	renk_int=setInterval('renk_deg(1,lbl_id_deg)',150)
}

function show_ok(ok_msg,lbl_id){
	if(lbl_id==null){lbl_id=""}
	msg_init()
	document.all("img_hata"+lbl_id).style.display='none';
	document.all("img_ok"+lbl_id).style.display='';
	document.all("hatsat"+lbl_id).innerText=ok_msg;
	lbl_id_deg=lbl_id
	renk_int=setInterval('renk_deg(2,lbl_id_deg)',150)
}

function show_clr(lbl_id_deg){
	if(lbl_id_deg==null){lbl_id_deg=""}
	document.all("img_hata"+lbl_id_deg).style.display='none';
	document.all("img_ok"+lbl_id_deg).style.display='none';
	document.all("hatsat"+lbl_id_deg).innerText='';
}

var sayac_msg
sayac_msg=0

function renk_deg(hata_id,lbl_id_deg){
	if(lbl_id_deg==null){lbl_id_deg=""}
	if(hata_id==1){renk='ff0000'}else{renk='6666ff'}
	sayac_msg++
	if(document.all("hatsat"+lbl_id_deg).style.color=="#ffffff"){document.all("hatsat"+lbl_id_deg).style.color=renk}else{document.all("hatsat"+lbl_id_deg).style.color="#ffffff"}
	if (sayac_msg==6){window.clearInterval(renk_int);
		lbl_id=lbl_id_deg
		msg_sil_int=setTimeout('show_clr(lbl_id)',1500)
	}
}

function msg_init(){
	sayac_msg=0
	/*window.clearInterval(renk_int)
	window.clearInterval(msg_sil_int)*/
}


function show_hata_win(hata_msg){
	msg_init()
	document.all("hatsat").innerText=hata_msg;
	document.all("win_hata").style.visibility='';
	renk_int=setInterval('renk_deg_win(1)',250)
}

function show_clr_win(){
	document.all("win_hata").style.visibility='hidden';
}

function renk_deg_win(hata_id){
	sayac_msg++
	if(document.all("hatsat").style.color=="#ffffff"){document.all("hatsat").style.color='555555'}else{document.all("hatsat").style.color="#ffffff"}
	if (sayac_msg==6){window.clearInterval(renk_int);
		msg_sil_int=setTimeout('show_clr_win()',1500)
	}
}

function win_open(en_deg,boy_deg,url_deg) {
	left_deg=(screen.availWidth-en_deg)/2
	top_deg=(screen.availHeight-boy_deg)/2
	window.open(url_deg,"_blank","width=" + en_deg + ",height=" + boy_deg + ",resizable=no,status=no,scrollbars=no,top="+top_deg+",left="+left_deg)
}

function win_open2(en_deg,boy_deg,url_deg) {
	left_deg=(screen.availWidth-en_deg)/2
	top_deg=(screen.availHeight-boy_deg)/2
	window.open(url_deg,"_blank","width=" + en_deg + ",height=" + boy_deg + ",resizable=no,status=no,scrollbars=yes,top="+top_deg+",left="+left_deg)
}

function swin_open2(en_deg,boy_deg,url_deg) {
	left_deg=(screen.availWidth-en_deg)/2
	top_deg=(screen.availHeight-boy_deg)/2
	window.open(url_deg,"_blank","width=" + en_deg + ",height=" + boy_deg + ",resizable=no,status=yes,scrollbars=yes,top="+top_deg+",left="+left_deg)
}

function win_open3(en_deg,boy_deg,url_deg) {
	left_deg=(screen.availWidth-en_deg)/2
	top_deg=(screen.availHeight-boy_deg)/2
	window.open(url_deg,"_blank","width=" + en_deg + ",height=" + boy_deg + ",resizable=yes,status=no,scrollbars=yes,top="+top_deg+",left="+left_deg)
}

function pageChange(pgNo){
	pageNoTemp=0
	if (ComPageNo.options.length!=0 && pgNo!='0'){
		switch (pgNo)
		{
			case 1:pageNoTemp=1;break;
			case 2:pageNoTemp=ComPageNo.value-1;break;
			case 3:pageNoTemp=parseInt(ComPageNo.value)+1;break;
			case 4:pageNoTemp=ComPageNo.options.length;break;
		}
		if (pageNoTemp>ComPageNo.options.length){pageNoTemp=ComPageNo.options.length}
		if (pageNoTemp<1){pageNoTemp=1}
		ComPageNo.selectedIndex=pageNoTemp-1
	}
		setPageButton()
		f_form_submit()
}
function pageLoad(totRowCount,pageRowCount,defPageNum){
tblPage.rows[0].cells[5].innerHTML=totRowCount
totPageCount=Math.ceil(totRowCount/pageRowCount)
if (ComPageNo.options.length<totPageCount){
	for (don=ComPageNo.options.length+1;don<=totPageCount;don++)
	{
		if (don!=0){
			var rv = document.createElement("OPTION");
			rv.text=don
			rv.value=don;
			//rv=new Option(don,don)
			ComPageNo.add(rv)
		}
	}
}else{
	for (don=ComPageNo.options.length;don>=totPageCount;don--)
	{
	 ComPageNo.remove(don)
	}
}
ComPageNo.value=defPageNum
setPageButton()
}

function setPageButton(){
		if (ComPageNo.value<=1)
		{
			document.all('btnPage1').filters[0].enabled=true
			document.all('btnPage2').filters[0].enabled=true
			document.all('btnPage1').disabled=true
			document.all('btnPage2').disabled=true
		}else{
			document.all('btnPage1').filters[0].enabled=false
			document.all('btnPage2').filters[0].enabled=false
			document.all('btnPage1').disabled=false
			document.all('btnPage2').disabled=false
		}

		if (ComPageNo.value>=ComPageNo.options.length)
		{
			document.all('btnPage3').filters[0].enabled=true
			document.all('btnPage4').filters[0].enabled=true
			document.all('btnPage3').disabled=true
			document.all('btnPage4').disabled=true
		}else{
			document.all('btnPage3').filters[0].enabled=false
			document.all('btnPage4').filters[0].enabled=false
			document.all('btnPage3').disabled=false
			document.all('btnPage4').disabled=false
		}
}
