﻿function popAc(divid)
  {  
           
    var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
    var layer = document.createElement("div");
    layer.style.zIndex = 2;
    layer.id = "layer";
    layer.style.position = "absolute";
    layer.style.top = "0px";
    layer.style.left = "0px";
    layer.style.height = document.documentElement.scrollHeight + "px";
    layer.style.width = width + "px";
    layer.style.backgroundColor = "black";
    layer.style.opacity = ".6";
    layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
    document.body.appendChild(layer);  
    
    var div = document.createElement("div");
    div.style.zIndex = 3;
    div.id = "box";
    div.style.position = (navigator.userAgent.indexOf("MSIE 6") > -1) ? "absolute" : "fixed";
    div.style.top = "200px";
    div.style.left = (width / 2) - (400 / 2) + "px";	
    div.style.height = "346px";
    div.style.width = "480px";
     
    div.innerHTML= document.getElementById(divid).innerHTML.replace(/pop_ad/gi,"pop_ad2").replace(/pop_kurum/gi,"pop_kurum2").replace(/pop_sifre/gi,"pop_sifre2").replace(/txt1/gi,"txt12").replace(/txt2/gi,"txt22").replace(/txt3/gi,"txt32").replace(/txt4/gi,"txt42").replace(/txt5/gi,"txt52").replace(/txt6/gi,"txt62").replace(/arkSonuc/gi,"arkSonuc2").replace(/chb1/gi,"chb1").replace(/chb2/gi,"chb2");     
    
    document.body.appendChild(div);  
    
    //return false;  
  }
function popGizle(){
    document.body.removeChild(document.getElementById("box"));
    document.body.removeChild(document.getElementById("layer"));
}
function gformAc(){    
    document.getElementById("girisForm11").style.display="block";     
    document.getElementById("p_evet").src="images/popBtnEvet2.jpg";
    popGizle();
    popAc("bolum1");
}
function popAc1(divid) {

    var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
    var layer = document.createElement("div");
    layer.style.zIndex = 2;
    layer.id = "layer";
    layer.style.position = "absolute";
    layer.style.top = "0px";
    layer.style.left = "0px";
    layer.style.height = document.documentElement.scrollHeight + "px";
    layer.style.width = width + "px";
    layer.style.backgroundColor = "black";
    layer.style.opacity = ".6";
    layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
    document.body.appendChild(layer);

    var div = document.createElement("div");
    div.style.zIndex = 3;
    div.id = "box";
    div.style.position = (navigator.userAgent.indexOf("MSIE 6") > -1) ? "absolute" : "fixed";
    div.style.top = "200px";
    div.style.left = (width / 2) - (400 / 2) + "px";
    div.style.height = "346px";
    div.style.width = "480px";
    
    div.innerHTML = document.getElementById(divid).innerHTML;

    document.body.appendChild(div);

    return false;
}
function dvPopUp(imgId) {
    document.getElementById('imgBig').src = 'images/kaslar/big/' + imgId + '.png';  
    popAc1('dvBig');
}

function gformGonder(){ 
    
    if(document.getElementById("pop_ad2").value=="" || document.getElementById("pop_kurum2").value=="" || document.getElementById("pop_sifre2").value=="")
    {
        alert("Lütfen tüm alanları doldurunuz.");
    }
    else
    {
        location.href="SaglikCalisanlari.aspx"; 
    }         
}


var xmlHttp
function arkaGonder(str1,str2,str3,str4)
{ 
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null)
    {
        alert("Ajax destekleyen browser kullanın.");
        return;
    }
    var url="ajx_arkgonder.aspx";
    url=url+"?ad1="+str1;
    url=url+"&email1="+str2;
    url=url+"&ad2="+str3;
    url=url+"&email2="+str4;
    url=url+"&sid="+Math.random();
    xmlHttp.onreadystatechange=stateChanged1;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
}

function stateChanged1() 
{ 
    if (xmlHttp.readyState==4)
    { 
        //alert("Mesajınız gönderilmiştir.");
        alert(xmlHttp.responseText);
        popGizle();
    }
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}


function arkGonder(){ 
    if(document.getElementById("txt22").value=="" || document.getElementById("txt42").value=="")
    {
        alert("Lütfen tüm alanları doldurunuz.");
    }
    else
    {
        arkaGonder(document.getElementById("txt12").value,document.getElementById("txt22").value,document.getElementById("txt32").value,document.getElementById("txt42").value);
    }
}


function dahaFazlaGonder(){ 
    if(document.getElementById("txt12").value=="")
    {
        alert("Lütfen tüm alanları doldurunuz.");
    }
    else
    {
        dGonder(document.getElementById("txt12").value,document.getElementById("txt22").value,document.getElementById("txt32").value,document.getElementById("txt42").value);
    }
}


function dGonder(str1,str2,str3,str4,str5,str6,sbox1,sbox2)
{ 
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null)
    {
        alert("Ajax destekleyen browser kullanın.");
        return;
    }
    var url="ajx_dahagonder.aspx";
    url=url+"?a="+str1;
    url=url+"&b="+str2;
    url=url+"&c="+str3;
    url=url+"&d="+str4;
    url=url+"&e="+str5;
    url=url+"&f="+str6;
    url=url+"&g="+sbox1;
    url=url+"&h="+sbox2;
    url=url+"&sid="+Math.random();
    xmlHttp.onreadystatechange=stateChanged2;
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
}

function stateChanged2() 
{ 
    if (xmlHttp.readyState==4)
    { 
        alert(xmlHttp.responseText);
        popGizle();
    }
}