/***********************************/
/*                                 */
/*   Copyright (c) 2008 Masters    */
/*                                 */
/*   Orhan POLAT                   */
/*                                 */
/***********************************/
function shadow(status,opacityVal){var targetID='shadow';if(status&&(status=='hide')){if(document.getElementById(targetID)){document.body.removeChild(document.getElementById(targetID));}hideshowbehind(null,targetID);return false;}var opacity=(opacityVal?parseInt(opacityVal):60);if(!document.getElementById('shadow')){var shadow=document.createElement('div');shadow.id=targetID;shadow.style.position='absolute';shadow.style.top='0';shadow.style.left='0';shadow.style.zIndex='1000';shadow.style.textAlign='center';shadow.style.backgroundColor='#000000';shadow.style.width=document.documentElement.scrollWidth+'px';shadow.style.height=document.documentElement.scrollHeight+'px';document.body.appendChild(shadow);}else{var shadow=document.getElementById(targetID);}if(navigator.appName=="Microsoft Internet Explorer"){shadow.style.filter='alpha(opacity='+opacity+')';}else{shadow.style.opacity=(opacity/100);shadow.style.mozOpacity=(opacity/100);}hideshowbehind(null,targetID);return true;};function layer(status,dialog,w,h,t,buttons){if(!document.getElementById(dialog)){alert('Dialog bulunamadı!');return false;}var modalDialogId='modalDialog';if(status=='show'){if(!w|| !h|| !t){alert('Dialog verileri eksik!');return false;}document.body.style.overflow='hidden';shadow('show');if(!document.getElementById(modalDialogId)){var modalDialog=document.createElement('div');modalDialog.id=modalDialogId;modalDialog.className='dialog';modalDialog.style.position='absolute';modalDialog.style.zIndex='1001';modalDialog.style.width=w+'px';modalDialog.style.height=h+'px';var modalDialogHeader=document.createElement('div');modalDialogHeader.id=modalDialogId+'Header';modalDialogHeader.className='dialogheader';modalDialogHeader.style.position='relative';modalDialogHeader.style.height='25px';modalDialogHeader.style.overflow='hidden';modalDialogHeader.style.textAlign='left';var modalDialogHeaderMove=document.createElement('div');modalDialogHeaderMove.onmouseover=new Function('dragover=true;');modalDialogHeaderMove.onmouseout=new Function('dragover=false;');modalDialogHeaderMove.style.position='absolute';modalDialogHeaderMove.style.cursor='move';modalDialogHeaderMove.style.top='0';modalDialogHeaderMove.style.left='0';modalDialogHeaderMove.style.width=(w-35)+'px';modalDialogHeaderMove.style.height='25px';var modalDialogHeaderTitle=document.createElement('span');modalDialogHeaderTitle.style.paddingLeft='10px';modalDialogHeaderTitle.style.lineHeight='25px';modalDialogHeaderTitle.innerHTML=t;var modalDialogHeaderClose=document.createElement('div');modalDialogHeaderClose.style.position='absolute';modalDialogHeaderClose.style.top='5px';modalDialogHeaderClose.style.right='10px';modalDialogHeaderClose.innerHTML='<a href="javascript:void(0);" onclick="layer(\'hide\', \''+dialog+'\')"><img src="objects/sysicons/close.gif" width="16" height="16" align="absmiddle" border="0" hspace="0" alt="Kapat"/><\/a>';modalDialogHeader.appendChild(modalDialogHeaderMove);modalDialogHeader.appendChild(modalDialogHeaderTitle);modalDialogHeader.appendChild(modalDialogHeaderClose);var modalDialogBody=document.createElement('div');modalDialogBody.id=modalDialogId+'Body';modalDialogBody.style.position='relative';modalDialogBody.style.height=(h-(buttons?(buttons.height?buttons.height:40)+25:25))+'px';modalDialogBody.style.textAlign='left';var modalDialogBodyHTML=document.createElement('div');modalDialogBodyHTML.style.position='absolute';modalDialogBodyHTML.style.top='5px';modalDialogBodyHTML.style.left='5px';modalDialogBodyHTML.style.borderTop='2px solid #FFFFFF';modalDialogBodyHTML.style.borderLeft='2px solid #FFFFFF';modalDialogBodyHTML.style.borderRight='2px solid #999999';modalDialogBodyHTML.style.borderBottom='2px solid #999999';modalDialogBodyHTML.style.width=(w-14)+'px';modalDialogBodyHTML.style.height=((h-(buttons?(buttons.height?buttons.height:40)+25:25))-14)+'px';modalDialogBodyHTML.style.overflow='auto';modalDialogBodyHTML.appendChild(document.getElementById(dialog));modalDialogBody.appendChild(modalDialogBodyHTML);if(buttons){var modalDialogFooter=document.createElement('div');modalDialogFooter.id=modalDialogId+'Footer';;modalDialogFooter.style.position='relative';modalDialogFooter.style.height=(buttons.height?buttons.height:40)+'px';modalDialogFooter.style.overflow='hidden';var html='<table width="100%" border="0" cellpadding="5" cellspacing="0">\n'+'<tr>\n'+'<td align="'+(buttons.align?buttons.align:'right')+'">\n';switch(buttons.type){case 'YESNO':html+='<input type="button" id="'+modalDialogId+'BtnYes" name="'+modalDialogId+'BtnYes" value="'+(buttons.labelYES?buttons.labelYES:'Evet')+'" onclick="'+((buttons.functionYES)?buttons.functionYES:'')+'">\n';html+='<input type="button" id="'+modalDialogId+'BtnNo" name="'+modalDialogId+'BtnNo" value="'+(buttons.labelNO?buttons.labelNO:'Hayır')+'" onclick="'+((buttons.functionNO)?buttons.functionNO:'')+'">\n';break;case 'YESNOCANCEL':html+='<input type="button" id="'+modalDialogId+'BtnYes" name="'+modalDialogId+'BtnYes" value="'+(buttons.labelYES?buttons.labelYES:'Evet')+'" onclick="'+((buttons.functionYES)?buttons.functionYES:'')+'">\n';html+='<input type="button" id="'+modalDialogId+'BtnNo" name="'+modalDialogId+'BtnNo" value="'+(buttons.labelNO?buttons.labelNO:'Hayır')+'" onclick="'+((buttons.functionNO)?buttons.functionNO:'')+'">\n';html+='<input type="button" id="'+modalDialogId+'BtnCancel" name="'+modalDialogId+'BtnCancel" value="'+(buttons.labelCANCEL?buttons.labelCANCEL:'İptal')+'" onclick="'+((buttons.functionCANCEL)?buttons.functionCANCEL:'')+'">\n';break;case 'OKCANCEL':html+='<input type="button" id="'+modalDialogId+'BtnOK" name="'+modalDialogId+'BtnOK" value="'+(buttons.labelOK?buttons.labelOK:'Tamam')+'" onclick="'+((buttons.functionOK)?buttons.functionOK:'')+'">\n';html+='<input type="button" id="'+modalDialogId+'BtnCancel" name="'+modalDialogId+'BtnCancel" value="'+(buttons.labelCANCEL?buttons.labelCANCEL:'İptal')+'" onclick="'+((buttons.functionCANCEL)?buttons.functionCANCEL:'')+'">\n';break;case 'SAVECANCEL':html+='<input type="button" id="'+modalDialogId+'BtnSave" name="'+modalDialogId+'BtnSave" value="'+(buttons.labelSAVE?buttons.labelSAVE:'Kaydet')+'" onclick="'+((buttons.functionSAVE)?buttons.functionSAVE:'')+'">\n';html+='<input type="button" id="'+modalDialogId+'BtnCancel" name="'+modalDialogId+'BtnCancel" value="'+(buttons.labelCANCEL?buttons.labelCANCEL:'İptal')+'" onclick="'+((buttons.functionCANCEL)?buttons.functionCANCEL:'')+'">\n';break;case "OK":html+='<input type="button" id="'+modalDialogId+'BtnOK" name="'+modalDialogId+'BtnOK" value="'+(buttons.labelOK?buttons.labelOK:'Tamam')+'" onclick="'+((buttons.functionOK)?buttons.functionOK:'')+'">\n';break;default:html+=buttons.html?buttons.html:'';}html+='<\/td>\n'+'<\/tr>\n'+'<\/table>\n';modalDialogFooter.innerHTML=html;}modalDialog.appendChild(modalDialogHeader);modalDialog.appendChild(modalDialogBody);if(buttons)modalDialog.appendChild(modalDialogFooter);document.body.appendChild(modalDialog);document.getElementById(dialog).style.display='block';}centerModalDialog();setFocus(modalDialogId);}else{document.body.style.overflow='auto';shadow('hide');if(document.getElementById(modalDialogId)){document.getElementById(dialog).style.display='none';document.body.appendChild(document.getElementById(dialog));document.body.removeChild(document.getElementById(modalDialogId));}clearForm(dialog+'form');}showAll(dialog);return true;};function centerModalDialog(){if(document.getElementById('modalDialog')){var shadow=document.getElementById('shadow');var sw=document.documentElement.scrollWidth;var sh=document.documentElement.scrollHeight;shadow.style.width=sw+'px';shadow.style.height=sh+'px';var w=document.getElementById('modalDialog').style.width;var h=document.getElementById('modalDialog').style.height;w=w.replace('px','');h=h.replace('px','');document.getElementById('modalDialog').style.left=((document.documentElement.clientWidth/2)-(w/2)+document.documentElement.scrollLeft)+'px';document.getElementById('modalDialog').style.top=((document.documentElement.clientHeight/2)-(h/2)+document.documentElement.scrollTop)+'px';}};function setFocus(dialog){if(document.getElementById(dialog)&&(document.getElementById(dialog).style.display!='none')){var el=document.getElementById(dialog).getElementsByTagName('input');for(var i=(el.length-1);i> -1;i--){if((el[i].type=='button')||(el[i].type=='submit')){el[i].focus();break;}}}};function messageDialog(message,properties,act){var dialogID='messageDialog';if(act&&(act=='hide')){if(document.getElementById(dialogID)){layer('hide',dialogID);document.body.removeChild(document.getElementById(dialogID));}return false;}if(document.getElementById(dialogID))document.body.removeChild(document.getElementById(dialogID));var im=((properties&&properties.icon)?'<img src="objects/sysicons/'+properties.icon+'" width="32" height="32" alt="Simge" align="absmiddle" border="0" hspace="5"/>':'');var html='<table width="100%" border="0" cellpadding="0" cellspacing="0">\n'+'<tr>\n'+'<td align="center" height="85">'+im+message+'<\/td>\n'+'<\/tr>\n'+'<\/table>\n';var el=document.createElement('div');el.id=dialogID;el.innerHTML=html;document.body.appendChild(el);var type=((properties&&properties.type)?properties.type:'OK');switch(type){case "YESNO":layer('show',dialogID,400,160,((properties&&properties.title)?properties.title:'Mesaj'),{type:'YESNO',labelYES:((properties&&properties.labelYES)?properties.labelYES:'Evet'),labelNO:((properties&&properties.labelNO)?properties.labelNO:'Hayır'),height:35,align:'center',functionYES:'layer(\'hide\', \''+dialogID+'\');'+((properties&&properties.functionYES)?' '+properties.functionYES:''),functionNO:'layer(\'hide\', \''+dialogID+'\');'+((properties&&properties.functionNO)?' '+properties.functionNO:'')});break;default:layer('show',dialogID,400,160,((properties&&properties.title)?properties.title:'Mesaj'),{type:'OK',labelOK:((properties&&properties.labelOK)?properties.labelOK:'Tamam'),height:35,align:'center',functionOK:'layer(\'hide\', \''+dialogID+'\');'+((properties&&properties.functionOK)?' '+properties.functionOK:'')});}return true;};function processDialog(status,tx){var dialogID='processDialog';if(status&&(status=='hide')){if(document.getElementById(dialogID)){document.body.removeChild(document.getElementById(dialogID));}shadow('hide');return false;}if(document.getElementById(dialogID))document.body.removeChild(document.getElementById(dialogID));shadow('show',1);var w=300;var h=90;var html='<div style="padding:5px; text-align:center;">\n'+'<div style="height:40px; background:url(objects/loaders/loading.gif) no-repeat center center">&nbsp;<\/div>\n'+'<div style="color:#000000; font-size:14px; font-weight:bold">'+(tx?tx:'Yükleniyor, lütfen bekleyiniz...')+'<\/div>\n'+'<\/div>\n';var ct=document.createElement('div');ct.style.cssText='position:absolute; width:'+(w-16)+'px; left:8px; height:'+(h-16)+'px; top:8px; background-color:#ffffff;';var dv=document.createElement('div');dv.id=dialogID;dv.style.cssText='position:absolute; width:'+w+'px; height:'+h+'px; background-color:#dddddd; z-index:1001';dv.style.left=((document.documentElement.clientWidth/2)-(w/2)+document.documentElement.scrollLeft)+'px';dv.style.top=((document.documentElement.clientHeight/2)-(h/2)+document.documentElement.scrollTop)+'px';dv.appendChild(ct);document.body.appendChild(dv);ct.innerHTML=html;return true;};function bubble(status,tx,wi,he,obj){var targetID='bubble';if(status&&(status=='hide')){if(document.getElementById(targetID)){document.body.removeChild(document.getElementById(targetID));}hideshowbehind('content',targetID);return false;}if(document.getElementById(targetID))document.body.removeChild(document.getElementById(targetID));var pos=getPosition(obj);var w=(wi)?wi:200;var h=(he)?he:50;var html='<table width="100%" border="0" cellpadding="0" cellspacing="0">\n'+'<tr>\n'+'<td width="6"><img src="objects/sysicons/bubble/bubble_left_top.gif" border="0" width="6" height="6" alt=""><\/td>\n'+'<td style="background:url(objects/sysicons/bubble/bubble_top.gif)"><img src="objects/sysicons/bubble/spacer.gif" border="0" width="1" height="6" alt=""><\/td>\n'+'<td width="6"><img src="objects/sysicons/bubble/bubble_right_top.gif" border="0" width="6" height="6" alt=""><\/td>\n'+'<\/tr>\n'+'<tr>\n'+'<td width="6" style="background:url(objects/sysicons/bubble/bubble_left.gif)"><img src="objects/sysicons/bubble/spacer.gif" border="0" width="6" height="1" alt=""><\/td>\n'+'<td style="background-color:#ffffe1" align="center" height="'+h+'">\n'+tx+'\n'+'<\/td>\n'+'<td width="6" style="background:url(objects/sysicons/bubble/bubble_right.gif)"><img src="objects/sysicons/bubble/spacer.gif" border="0" width="6" height="1" alt=""><\/td>\n'+'<\/tr>\n'+'<tr>\n'+'<td width="6"><img src="objects/sysicons/bubble/bubble_left_bottom.gif" border="0" width="6" height="6" alt=""><\/td>\n'+'<td style="background:url(objects/sysicons/bubble/bubble_bottom.gif)"><img src="objects/sysicons/bubble/spacer.gif" border="0" width="1" height="6" alt=""><\/td>\n'+'<td width="6"><img src="objects/sysicons/bubble/bubble_right_bottom.gif" border="0" width="6" height="6" alt=""><\/td>\n'+'<\/tr>\n'+'<\/table>\n'+'<div style="position:absolute; right:15px; bottom:-20px"><img src="objects/sysicons/bubble/bubble_pointer.gif" border="0" width="20" height="21" alt=""><\/div>\n';var dv=document.createElement('div');dv.id=targetID;dv.style.cssText='position:absolute; z-index:1002; width:'+w+'px;';dv.style.left=(pos.x-w+15)+'px';dv.style.top=(pos.y-h-25)+'px';dv.innerHTML=html;document.body.appendChild(dv);hideshowbehind('content',targetID);return true;};function showAll(dialog){var source=document.getElementById(dialog);if(source){var tags=new Array('applet','iframe','select');for(var k=0;k<tags.length;k++){var ar=source.getElementsByTagName(tags[k]);var cc=null;for(var i=0;i<ar.length;i++){cc=ar[i];cc.style.visibility='visible';}}}};function clearForm(formname){if(document.forms[formname]){document.forms[formname].reset();}};function hideshowbehind(sourcename,targetname){var tags=new Array('object','applet','iframe');var source=document.getElementById(sourcename);var target=document.getElementById(targetname);if(navigator.appName=="Microsoft Internet Explorer"){tags.push('select');}if(target){var p=getPosition(target);var EX1=p.x;var EX2=target.offsetWidth+EX1;var EY1=p.y;var EY2=target.offsetHeight+EY1;}else{var EX1=0;var EX2=0;var EY1=0;var EY2=0;}for(var k=0;k<tags.length;k++){if(source){var ar=source.getElementsByTagName(tags[k]);}else{var ar=document.getElementsByTagName(tags[k]);}var cc=null;for(var i=0;i<ar.length;i++){cc=ar[i];p=getPosition(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if((CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){cc.style.visibility='visible';}else{cc.style.visibility='hidden';}}}};function getPosition(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=getPosition(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};var ob;var dragover=false;function MD(e){if(dragover){if(!document.all){ob=document.getElementById('modalDialog');X=e.layerX;Y=e.layerY;return false;}else{ob=document.getElementById('modalDialog');ob=ob.style;X=event.offsetX;Y=event.offsetY;}}return true;};function MM(e){if(ob){if(!document.all){ob.style.top=(e.pageY-Y)+'px';ob.style.left=(e.pageX-X)+'px';}else{ob.pixelLeft=event.clientX-X+document.documentElement.scrollLeft;ob.pixelTop=event.clientY-Y+document.documentElement.scrollTop;return false;}}return true;};function MU(){ob=null;};if(window.addEventListener){window.addEventListener('mousedown',MD,false);window.addEventListener('mousemove',MM,false);window.addEventListener('mouseup',MU,false);}else if(document.attachEvent){document.attachEvent('onmousedown',MD);document.attachEvent('onmousemove',MM);document.attachEvent('onmouseup',MU);}