/************************************************************************************
* Php online-ucak-rezervasyon
* 29/04/2010 
* Ümit CAN / umit@dominant.com.tr
* Dominant Yazılım ve Destek A.Ş.
* tel:+902163268660 fax:+902163268665 destek@dominant.com.tr
*************************************************************************************/

function wsMouseInfo(id,elt,w,h,xA,yA,yer,tablo) {
	if(id == 1) {//--|id=1
		wsMouseInfo(2,hafizaElt,null,null,null,null,null,null);
		hafizaElt	= elt;
		cordinat 	= eltFindPos(elt);
		var Left	= cordinat.x+xA;
		var Top		= cordinat.y+yA;		
		SecEltDiv.style.left	= Left;
		SecEltDiv.style.top 	= Top;
		//SecEltDiv.style.width 	= w;
		//SecEltDiv.style.height 	= h;
		SecEltDiv.innerHTML		= tablo;
		if(yer == 'yerBul') {
			if(oELT('overTablo') != null) {
				var SecTablo = oELT('overTablo');
				
				for(t1=0;t1<SecTablo.rows.length;t1++) {
					SecTablo.rows[t1].setAttribute("st",0);
					SecTablo.rows[t1].className = 'inputSelectBackTrA';
					SecTablo.rows[t1].cells[0].innerHTML = '<IMG src="'+imgChkBos+'">';
				}
				
				elt.style.backgroundColor 	= mso_back;
				elt.style.color			 	= mso_font;
				if(elt.getAttribute("turNo") == null) {
					//if(elt.indexNo != "") {
						SecTablo.rows[elt.getAttribute("indexNo")].setAttribute("st",1);
						SecTablo.rows[elt.getAttribute("indexNo")].className = 'inputSelectBackTrC';
						SecTablo.rows[elt.getAttribute("indexNo")].cells[0].innerHTML = '<IMG src="'+imgChkDolu+'">';
					//}
				}
				else {
					var bbk = 0;
					var bbk2 = elt.getAttribute("turNo")+""+elt.getAttribute("indexNo");
					
					while(SecTablo.rows[bbk] != null) {
						
						if(SecTablo.rows[bbk].getAttribute("tur")*1 == bbk2*1) {
							SecTablo.rows[bbk].setAttribute("st",1);
							SecTablo.rows[bbk].className = 'inputSelectBackTrC';
							SecTablo.rows[bbk].cells[0].innerHTML = '<IMG src="'+imgChkDolu+'">';
							break;
						}
						bbk++;
					}
				}
			}
			if(oELT('overTablo2') != null) {
				var SecTablo = oELT('overTablo2');
				
				for(t1=0;t1<SecTablo.rows.length;t1++) {
					SecTablo.rows[t1].setAttribute("st",0);
					SecTablo.rows[t1].className = 'inputSelectBackTrA';
				}
				
				//elt.style.backgroundColor 	= bColor;
				//elt.style.color			 	= tdABackColor;//"white";
				SecTablo.rows[elt.getAttribute("indexNo")].setAttribute("st",1);
				SecTablo.rows[elt.getAttribute("indexNo")].className = 'inputSelectBackTrC';
			}
		}
		else if(yer == null || yer == 'focus') {
			elt.style.backgroundColor 	= mso_back;
			elt.style.color			 	= mso_font;
		}
		
		if(yer == 'focus') {
			if(navigator.appName == "Microsoft Internet Explorer")
				SecEltDiv.onmouseout = null;
			else
				SecEltDiv.setAttribute("onmouseout","null");
		}
		else {
			if(navigator.appName == "Microsoft Internet Explorer")
				SecEltDiv.onmouseout = function() {if (mouseLeaves(this, event)) {wsMouseInfo(2,elt,null,null,null,null,null,null);}};
			else
				SecEltDiv.setAttribute("onmouseout","if (mouseLeaves(this, event)) {wsMouseInfo(2,hafizaElt,null,null,null,null,null,null);}");
		}
		if (SecEltDiv.style.display == 'none') SecEltDiv.style.display = 'inline';
	}//--|id=1
	else if(id == 2) {//--|id=2
		if(elt != null) {
			if(elt.style.backgroundColor != 'red' && elt.getAttribute("stBack") != 'X') {
				elt.style.backgroundColor 	= "";
				elt.style.color			 	= "";
			}
		}
		if(navigator.appName == "Microsoft Internet Explorer")
			SecEltDiv.onmouseout = null;
		else
			SecEltDiv.setAttribute("onmouseout","null");
		eltKadir(SecEltDiv);
	}//--|id=2
	else if(id == 3) {//--|id=3
		if(w == 4) {//--|isim listesi unvan sec
			if(h == null) {
				if (oELT('adim_2_isimListe_table') != null) {
					var yon = oELT('adim_2_isimListe_table');
					var val = elt.cells[1].innerHTML;
					var tablo = yon.getElementsByTagName("tbody")[0];
					if (tablo != null) {
						oELT(xA).setAttribute("indexNo",yA);
						oELT(xA).innerHTML = val;
						if(elt.cells[1].value != null && oELT(xA).getAttribute("secVal") != null)
							oELT(xA).setAttribute("secVal",elt.cells[1].value);
						eltKadir(SecEltDiv);
					}
				}
			}
			else if(h == 1) {//--|bebek icin yetiskin sec
				if(memoryDomi.sistemModul == 'packetModul') bufHafiza = hafiza.adimPac_1;
				else if(memoryDomi.sistemModul == 'ucakModul') bufHafiza = hafiza.adim_1;
				if(elt.options[elt.selectedIndex].value == "") {
					bbk2 = false;
				}
				else {
					var arrBuf = elt.options[elt.selectedIndex].value.split("*");
					var val = elt.options[elt.selectedIndex].text;
					
					var bbk2 = true;
					for(bkk3=1;bkk3<=bufHafiza.odaSayisi;bkk3++) {
						var bbk = 1;
						while(oELT('frmIsimListeBebek_yno_'+bkk3+'_'+bbk) != null) {
							if(elt.getAttribute('id') != 'frmIsimListeBebek_yno_'+bkk3+'_'+bbk) {
								if(oELT('frmIsimListeBebek_yno_'+bkk3+'_'+bbk).getAttribute("indexNo") == ((arrBuf[0]*1)-1) && oELT('frmIsimListeBebek_yno_'+bkk3+'_'+bbk).getAttribute("turNo") == ((arrBuf[1]*1))) {
									bbk2 = false;
									if(memoryDomi.sistemModul == 'packetModul')
										wsHataMsj(2,arrLang.a[78][0]+' '+val+', '+bkk3+'. '+arrLang.a[78][1]+' '+bbk+'. '+arrLang.a[78][2],HataMsj_1,0);
									else if(memoryDomi.sistemModul == 'ucakModul')
										wsHataMsj(2,arrLang.a[79][0]+' '+val+', '+bbk+'. '+arrLang.a[79][1],HataMsj_1,0);
									break;	
								}
							}
							bbk++;
						}
					}
				}
				
				if(bbk2 == true) {
					elt.setAttribute("indexNo",((arrBuf[0]*1)-1));
					elt.setAttribute("turNo",((arrBuf[1]*1)));
					elt.setAttribute("secVal",((arrBuf[0]*1)));
				}
				else {
					elt.setAttribute("indexNo",'');
					elt.setAttribute("turNo",'');
					elt.setAttribute("secVal",'');
					elt.selectedIndex = 0;
				}
			}//--|bebek icin yetiskin sec
		}//--|isim listesi unvan sec
		else if(w == 6) {//--|kk gecerlilik tarihi
			//--|hafiza
			hafiza.adim_2.odemeInfo.kartTarih = oELT('adim_2_sonKullAy').options[oELT('adim_2_sonKullAy').selectedIndex].value+"/"+oELT('adim_2_sonKullYil').options[oELT('adim_2_sonKullYil').selectedIndex].value;
			//--|hafiza
		}//--|kk gecerlilik tarihi
		else if(w == 7) {//--|kk numarasi kontrolu
			if(elt.value.length < 16) {
				elt.value = '';
				if(oELT('kkNoMsj') != null) {
					oELT('kkNoMsj').innerHTML = arrLang.a[80];
				}
			}
			else {
				if(isCreditCard(elt.value) == false) {
					elt.value = '';
					if(oELT('kkNoMsj') != null) {
						oELT('kkNoMsj').innerHTML = arrLang.a[81];
					}
				}
				else {
					//--|hafiza
					hafiza.adim_2.odemeInfo.kartNo = elt.value;
					if(oELT('kkNoMsj') != null) {
						oELT('kkNoMsj').innerHTML = '&nbsp;';
					}
				}
			}
		}//--|kk numarasi kontrolu
		else if(w == 8) {//--|kk tip secimi
			if(h==1) {
				//--|hafiza
				hafiza.adim_2.odemeInfo.kartTip = "visaKart";
				oELT('frmKartTipImg_1').src = imgChkDolu;	
				oELT('frmKartTipImg_2').src = imgChkBos;	
			}
			else if(h==2) {
				//--|hafiza
				hafiza.adim_2.odemeInfo.kartTip = "masterKart";
				oELT('frmKartTipImg_1').src = imgChkBos;	
				oELT('frmKartTipImg_2').src = imgChkDolu;	
			}
		}//--|kk tip secimi
		else if(w == 9) {//--|odeme bilgisi inputlar hafizaya at
			if(h=='kartAd') hafiza.adim_2.odemeInfo.ad = elt.value;
			if(h=='kartSoyad') hafiza.adim_2.odemeInfo.soyad = elt.value;
			if(h=='kartCvv') hafiza.adim_2.odemeInfo.kartCvv = elt.value;
		}//--|odeme bilgisi inputlar hafizaya at
	}//--|id=3
}

function dhtmlSelect(selectid, selectwidth, optionwidth,bufTable){
	oELT('adim_2_sonKullAyInc').style.display = 'inline';

	 
}


if(oELT('js_domiScriptUcak_mouseInfo') != null)
	yukleyici(1,'js_domiScriptUcak_mouseInfo',arrLang.a[82]);
