// JavaScript Document
Position.GetWindowSize = function(w) {
    w = w ? w : window;
    var width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
    var height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
    return [width, height]
}

Position.Center = function(element, parent) {
    var w, h, pw, ph;
    var d = Element.getDimensions(element);
    w = d.width;
    h = d.height;
    Position.prepare();
    if (!parent) {
        var ws = Position.GetWindowSize();
        pw = ws[0];
        ph = ws[1];
    } else {
        pw = parent.offsetWidth;
        ph = parent.offsetHeight;
    }
    element.style.top = (ph / 2) - (h / 2) - Position.deltaY + "px";
    element.style.left = (pw / 2) - (w / 2) - Position.deltaX + "px";
}

function openWindow(anchor, options) {

    var args = '';

    if (typeof (options) == 'undefined') { var options = new Object(); }
    if (typeof (options.name) == 'undefined') { options.name = 'win' + Math.round(Math.random() * 100000); }

    if (typeof (options.height) != 'undefined' && typeof (options.fullscreen) == 'undefined') {
        args += "height=" + options.height + ",";
    }

    if (typeof (options.width) != 'undefined' && typeof (options.fullscreen) == 'undefined') {
        args += "width=" + options.width + ",";
    }

    if (typeof (options.fullscreen) != 'undefined') {
        args += "width=" + screen.availWidth + ",";
        args += "height=" + screen.availHeight + ",";
    }

    if (typeof (options.center) == 'undefined') {
        options.x = 0;
        options.y = 0;
        args += "screenx=" + options.x + ",";
        args += "screeny=" + options.y + ",";
        args += "left=" + options.x + ",";
        args += "top=" + options.y + ",";
    }

    if (typeof (options.center) != 'undefined' && typeof (options.fullscreen) == 'undefined') {
        options.y = Math.floor((screen.availHeight - (options.height || screen.height)) / 2) - (screen.height - screen.availHeight);
        options.x = Math.floor((screen.availWidth - (options.width || screen.width)) / 2) - (screen.width - screen.availWidth);
        args += "screenx=" + options.x + ",";
        args += "screeny=" + options.y + ",";
        args += "left=" + options.x + ",";
        args += "top=" + options.y + ",";
    }

    if (typeof (options.scrollbars) != 'undefined') { args += "scrollbars=1,"; }
    if (typeof (options.menubar) != 'undefined') { args += "menubar=1,"; }
    if (typeof (options.locationbar) != 'undefined') { args += "location=1,"; }
    if (typeof (options.resizable) != 'undefined') { args += "resizable=1,"; }

    var win = window.open(anchor, options.name, args);
    return false;

}

function getFlashMovieObject(movieName) {
    if (window.document[movieName]) {
        return window.document[movieName];
    }
    if (navigator.appName.indexOf("Microsoft Internet") == -1) {
        if (document.embeds && document.embeds[movieName])
            return document.embeds[movieName];
    }
    else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
    {
        return document.getElementById(movieName);
    }
}
function openTramer() {
    //Position.Center($$$('tramer_div'));
    //document.getElementById('tramer_div').style.display = '';
    //var flashMovie = getFlashMovieObject("tramer_flash");
    //flashMovie.Play();
    openWindow('tramer/index.htm', {name:'TRAMER', width:830, height:590,resizable:false,center:true});
}

function closeTramer() {
    //document.getElementById('tramer_div').style.display = 'none';
}
function closeKampanya() {

    document.getElementById('kampanya').style.display='none';
    document.getElementById('kampanyaOverlay').style.display='none';
    return false;
}

function showKampanya() {
    document.getElementById('kampanya').style.display='';
    document.getElementById('kampanyaOverlay').style.display='';
}

function changeFirsttime(v) {
    new Ajax.Request('firsttime.ashx?firsttime='+v,{asynchronous:true});
}

function showOneri(id) {
        
    Element.hide('oneriler_' + randomOneri);
    Element.show('oneriler_' + id);

}

var lastSubLevel = -1;
function showSubLevels(i) {
    Element.hide('breadcrumb');
    if(lastSubLevel != -1) Element.hide('subnav_'+ lastSubLevel);
    Element.show('subnav_' + i);
    lastSubLevel = i;
}

function hideSubLevels(e) {

	if (!e) var e = window.event;
	var tg = (window.event) ? e.srcElement : e.target;
	if (tg.nodeName != 'DIV') return;
	var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement;
	while (reltg != tg && reltg.nodeName != 'BODY')
		reltg= reltg.parentNode

	if (reltg== tg) return;
	// Mouseout took place when mouse actually left layer
	// Handle event
	
    if(lastSubLevel != -1)  Element.hide('subnav_' + lastSubLevel);
    Element.show('breadcrumb');
}

var lastTabId = 'adim_1';

function selectTab(id) {
    
    if(id != lastTabId) {
        Element.hide(lastTabId);
        $$$(lastTabId + '_link').className = 'iksteps_unselected';
        Element.show(id);
        $$$(id+ '_link').className = 'iksteps_selected';
        lastTabId = id;
    }
}

var lastBelgeDivId;
function selectBelgeDiv(id) {
    var id =$F('belgesec');
    
    if(!$$$('belgeler_'+id)) {
        return;
    }    
    
    if(lastBelgeDivId) {
        Element.hide("belgeler_" + lastBelgeDivId);
    }
    Element.show("belgeler_" + id);
    lastBelgeDivId = id;
    
}

var phonenumber= /\d{7}/
var phonearea= /\d{3}/

function checkIKForm() {
    var errors ="";
    
    if($F('adi') == "") {
        errors += "- Adınızı giriniz.\n";
    }
    if($F('soyadi') == "") {
        errors += "- Soyadınızı giriniz.\n";
    }
    if($F('dGun') == "Gün") {
        errors += "- Doğum gününüzü giriniz.\n";
    }
    
    if($F('dAy') == "Ay") {
        errors += "- Doğum ayınızı giriniz.\n";
    }

    if($F('dYil') == "Yıl") {
        errors += "- Doğum yılınızı giriniz.\n";
    }

    if($F('ctl00_middle_dYer') == "") {
        errors += "- Doğum yerinizi giriniz.\n";
    }

    if(!$$$('cinsiyet1').checked && !$$$('cinsiyet2').checked) {
        errors += "- Cinsiyetinizi giriniz.\n";
    }

    if(!$$$('uyruk1').checked && !$$$('uyruk2').checked) {
        errors += "- Uyruğunuzu giriniz.\n";
    } else if($$$('uyruk2').checked && $F('uyrukDiger') == "") {
        errors += "- Uyruğunuzu giriniz.\n";
    }

    if($F('egitimdurumu') == "Seçiniz") {
        errors += "- Öğrenim durumunuzu giriniz.\n";
    }
    
    if($F('liseBas') == "" || $F('liseSon') == "" ||$F('lise') == "" ) {
        errors += "- Lise bilgilerinizi giriniz.\n";
    }
    
    if($F('deneyim1isyeri') == "") {
        errors += "- Birinci deneyim işyerinizi giriniz.\n";
    }
    if($F('deneyim1tel1') == "" || $F('deneyim1tel2') == "" ) {
        errors += "- Birinci deneyim telefonunuzu giriniz.\n";
    } 
    
    if(!phonearea.test($F('deneyim1tel1')) || !phonenumber.test($F('deneyim1tel2'))){
        errors += "- Birinci deneyim telefonunuzu düzeltiniz(###-#######).\n";
    }

    if($F('deneyim2tel1') != "" || $F('deneyim2tel2') != "") {
        if(!phonearea.test($F('deneyim2tel1')) || !phonenumber.test($F('deneyim2tel2'))){
            errors += "- İkinci deneyim telefonunuzu düzeltiniz(###-#######).\n";
        }
    }

    if($F('deneyim3tel1') != "" || $F('deneyim3tel2') != "") {
        if(!phonearea.test($F('deneyim3tel1')) || !phonenumber.test($F('deneyim3tel2'))){
            errors += "- Üçüncü deneyim telefonunuzu düzeltiniz(###-#######).\n";
        }
    }
    
    if($F('deneyim1Bas') == "" || $F('deneyim1Son') == "" ) {
        errors += "- Birinci deneyim başlangıç/bitiş tarihlerini giriniz.\n";
    }

    if($F('referans1adi') == "") {
        errors += "- Birinci referans adını giriniz.\n";
    }
    if($F('referans1isyeri') == "") {
        errors += "- Birinci referans işyerini giriniz.\n";
    }
    if($F('referans1gorevi') == "") {
        errors += "- Birinci referans görevini giriniz.\n";
    }
    if($F('referans1tel1') == "" || $F('referans1tel2') == "" ) {
        errors += "- Birinci referans telefonunu giriniz.\n";
    }

    if($F('referans1tel1') != "" || $F('referans1tel2') != "") {
        if(!phonearea.test($F('referans1tel1')) || !phonenumber.test($F('referans1tel2'))){
            errors += "- Birinci referans telefonunuzu düzeltiniz(###-#######).\n";
        }
    }
    if($F('referans2tel1') != "" || $F('referans2tel2') != "") {
        if(!phonearea.test($F('referans2tel1')) || !phonenumber.test($F('referans2tel2'))){
            errors += "- İkinci referans telefonunuzu düzeltiniz(###-#######).\n";
        }
    }

    if($F('adres') == "") {
        errors += "- Adresinizi giriniz.\n";
    }
    if($F('evtel1') == "" || $F('evtel2') == "" ) {
        errors += "- Ev telefonunuzu giriniz.\n";
    }
    if($F('evtel1') != "" || $F('evtel2') != "") {
        if(!phonearea.test($F('evtel1')) || !phonenumber.test($F('evtel2'))){
            errors += "- Ev telefonunuzu düzeltiniz(###-#######).\n";
        }
    }

    if($F('istel1') != "" || $F('istel2') != "") {
        if(!phonearea.test($F('istel1')) || !phonenumber.test($F('istel2'))){
            errors += "- İş telefonunuzu düzeltiniz(###-#######).\n";
        }
    }
    if($F('ceptel1') == "" || $F('ceptel2') == "" ) {
        errors += "- Cep telefonunuzu giriniz.\n";
    }
     if($F('ceptel1') != "" || $F('ceptel2') != "") {
        if(!phonearea.test($F('ceptel1')) || !phonenumber.test($F('ceptel2'))){
            errors += "- Cep telefonunuzu düzeltiniz(###-#######).\n";
        }
    }
   
//    if(!$('evirtibat').checked && !$('isirtibat').checked && !$('cepirtibat').checked) {
//        errors += "- İrtibat telefonu belirleyiniz.\n";
//    }
//    
    if(errors != "") {
        alert('Eksik ve yanlış bilgileri düzeltiniz:\n\n' + errors);
        return false;
    }
    
    
    return true;

}

function sendIKForm() {
    if(checkIKForm()) {
        new Ajax.Updater('ikform_all','ikFormHandler.ashx',{asynchronous:true, parameters:Form.serializeWithEscape('aspnetForm')});
    } else {
        $$$('gonder').disabled = false;
    }
}

function checkIKFormEN() {
    var errors ="";
    
    if($F('adi') == "") {
        errors += "- Enter your name.\n";
    }
    if($F('soyadi') == "") {
        errors += "- Enter your surname.\n";
    }
    if($F('dGun') == "Gün") {
        errors += "- Enter your birthday.\n";
    }
    
    if($F('dAy') == "Ay") {
        errors += "- Enter month of your birthday.\n";
    }

    if($F('dYil') == "Yıl") {
        errors += "- Enter year of your birthday.\n";
    }

    if($F('ctl00_middle_dYer') == "") {
        errors += "- Enter place of birth.\n";
    }

    if(!$$$('cinsiyet1').checked && !$$$('cinsiyet2').checked) {
        errors += "- Enter your gender.\n";
    }

    if(!$$$('uyruk1').checked && !$$$('uyruk2').checked) {
        errors += "- Enter your nationality.\n";
    } else if($$$('uyruk2').checked && $F('uyrukDiger') == "") {
        errors += "- Enter your nationality.\n";
    }

    if($F('egitimdurumu') == "Seçiniz") {
        errors += "- Enter education.\n";
    }
    
    if($F('liseBas') == "" || $F('liseSon') == "" ||$F('lise') == "" ) {
        errors += "- Enter your high school info.\n";
    }
    
    if($F('deneyim1isyeri') == "") {
        errors += "- Enter your first job.\n";
    }
    if($F('deneyim1tel1') == "" || $F('deneyim1tel2') == "" ) {
        errors += "- Enter phone for your first job.\n";
    } 
    
    if(!phonearea.test($F('deneyim1tel1')) || !phonenumber.test($F('deneyim1tel2'))){
        errors += "- Correct phone for your first job(###-#######).\n";
    }

    if($F('deneyim2tel1') != "" || $F('deneyim2tel2') != "") {
        if(!phonearea.test($F('deneyim2tel1')) || !phonenumber.test($F('deneyim2tel2'))){
            errors += "- Correct phone for your second job(###-#######).\n";
        }
    }

    if($F('deneyim3tel1') != "" || $F('deneyim3tel2') != "") {
        if(!phonearea.test($F('deneyim3tel1')) || !phonenumber.test($F('deneyim3tel2'))){
            errors += "- Correct phone for your third job(###-#######).\n";
        }
    }
    
    if($F('deneyim1Bas') == "" || $F('deneyim1Son') == "" ) {
        errors += "- Enter your start/finish dates for your first job.\n";
    }

    if($F('referans1adi') == "") {
        errors += "- Enter your first reference's name.\n";
    }
    if($F('referans1isyeri') == "") {
        errors += "- Enter your first reference's company name.\n";
    }
    if($F('referans1gorevi') == "") {
        errors += "- Enter your first reference's title.\n";
    }
    if($F('referans1tel1') == "" || $F('referans1tel2') == "" ) {
        errors += "- Enter your first reference's phone.\n";
    }

    if($F('referans1tel1') != "" || $F('referans1tel2') != "") {
        if(!phonearea.test($F('referans1tel1')) || !phonenumber.test($F('referans1tel2'))){
            errors += "- Corrert your first reference's phone(###-#######).\n";
        }
    }
    if($F('referans2tel1') != "" || $F('referans2tel2') != "") {
        if(!phonearea.test($F('referans2tel1')) || !phonenumber.test($F('referans2tel2'))){
            errors += "- Correct your second reference's phone(###-#######).\n";
        }
    }

    if($F('adres') == "") {
        errors += "- Enter your address.\n";
    }
    if($F('evtel1') == "" || $F('evtel2') == "" ) {
        errors += "- Enter your home number.\n";
    }
    if($F('evtel1') != "" || $F('evtel2') != "") {
        if(!phonearea.test($F('evtel1')) || !phonenumber.test($F('evtel2'))){
            errors += "- Coorect your home number(###-#######).\n";
        }
    }

    if($F('istel1') != "" || $F('istel2') != "") {
        if(!phonearea.test($F('istel1')) || !phonenumber.test($F('istel2'))){
            errors += "- Correct your work number(###-#######).\n";
        }
    }
    if($F('ceptel1') == "" || $F('ceptel2') == "" ) {
        errors += "- Enter your mobile number.\n";
    }
     if($F('ceptel1') != "" || $F('ceptel2') != "") {
        if(!phonearea.test($F('ceptel1')) || !phonenumber.test($F('ceptel2'))){
            errors += "- Correct your mobile number(###-#######).\n";
        }
    }
   
//    if(!$('evirtibat').checked && !$('isirtibat').checked && !$('cepirtibat').checked) {
//        errors += "- Choose your contact number.\n";
//    }
    
    if(errors != "") {
        alert('Enter missing or invlaid information:\n\n' + errors);
        return false;
    }
    
    
    return true;

}

function sendIKFormEN() {
    if(checkIKFormEN()) {
        new Ajax.Updater('ikform_all','../ikFormHandler.ashx',{asynchronous:true, parameters:Form.serializeWithEscape('aspnetForm')});
    } else {
        $$$('gonder').disabled = false;
    }
}

function checkIletisimForm() {
    var errors ="";
    if($F('ad') == "") {
        errors += "- Adınızı giriniz.\n";
    }
    if($F('soyad') == "") {
        errors += "- Soyadınızı giriniz.\n";
    }
    if($F('eposta') == "") {
        errors += "- Epostanızı giriniz.\n";
    }
    if($F('tel1') == "" || $F('tel2') == "") {
        errors += "- Telefonunuzu giriniz.\n";
    } else if($F('tel1') != "" || $F('tel2') != "") {
        if(!phonearea.test($F('tel1')) || !phonenumber.test($F('tel2'))){
            errors += "- Telefonunuzu düzeltiniz(###-#######).\n";
        }
    }
    if(errors != "") {
        alert('Eksik bilgileri giriniz:\n\n' + errors);
        return false;
    }
    return true;
}

function checkIletisimFormEN() {
    var errors ="";
    if($F('ad') == "") {
        errors += "- Enter your name.\n";
    }
    if($F('soyad') == "") {
        errors += "- Enter your surname.\n";
    }
    if($F('eposta') == "") {
        errors += "- Enter your email.\n";
    }
    if($F('tel1') == "" || $F('tel2') == "") {
        errors += "- Enter your phone.\n";
    } else if($F('tel1') != "" || $F('tel2') != "") {
        if(!phonearea.test($F('tel1')) || !phonenumber.test($F('tel2'))){
            errors += "- Correct your phone(###-#######).\n";
        }
    }
    if(errors != "") {
        alert('Please correct following errors:\n\n' + errors);
        return false;
    }
    return true;
}


function sendIletisimForm() {

    if(checkIletisimForm()) {
        new Ajax.Updater('iletisim','IletisimFormHandler.ashx',{asynchronous:true, parameters:Form.serializeWithEscape('aspnetForm')}); 
    }
    return false;
}

function sendIletisimFormEN() {

    if(checkIletisimFormEN()) {
        new Ajax.Updater('iletisim','IletisimFormHandler.ashx',{asynchronous:true, parameters:Form.serializeWithEscape('aspnetForm')}); 
    }
    return false;
}

function HandleFileClickButton() {
    $$$('cvUploadFile').click();
    $$$('cvFile').value = $$$('cvUploadFile').value;
}

function updateIlceDDL() {
    new Ajax.Updater('ilcespan','ats_ilcecombo.ashx?il=' + escape($F('ctl00_middle_ddlIl')) + '$selected=' + escape($F('ctl00_middle_ddlIl')),{asynchronous:true});
}

var sssHandlerFunc = function(t){
    $$$('sss_div').innerHTML = t.responseText;
}

var sssErrFunc = function(t){
    $$$('sss_div').innerHTML = t.statusText;
}

function loadSSS() {
    if($$$('sss_kategori').options[$$$('sss_kategori').selectedIndex].value != '') {
        $$$('sss_div').innerHTML = loadingText;
        new Ajax.Request('sssHandler.ashx?kategori_id='+$$$('sss_kategori').options[$$$('sss_kategori').selectedIndex].value,{onSuccess:sssHandlerFunc, onFailure:sssErrFunc,asynchronous:true});
    } else {
        $$$('sss_div').innerHTML = "";
    }
}

function download(link) {
    window.location.href = link;
}

function new_window(url) {

link = window.open(url,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1");

}

function new_dialog(url) {

link = window.open(url,"","width=300,height=75,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0");

}

function searchtextchanged(e) {

    var keycode;
    if (window.event.keyCode) keycode = window.event.keyCode;
    else if (e) keycode = e.which;
    else return true;
    
    if(keycode == 13) {
        runsearch();
        return false;
    } else {
        return true;
    }
    
}

function runsearch() {
    window.location=  'http://www.hdisigorta.com.tr/search.aspx?searchfor=' + $$$('searchtext').value;
}

function PrintThisPage() 
{ 
   var sOption="toolbar=no,location=no,directories=yes,menubar=yes,"; 
         sOption+="scrollbars=yes,width=750,height=600,left=100,top=25"; 
   
   var winprint=window.open("print.aspx","Print",sOption); 
 
    winprint.focus(); 
}

function EmailThisPage() 
{ 
   var sOption="toolbar=no,location=no,directories=no,menubar=no,"; 
         sOption+="scrollbars=yes,width=400,height=200,left=100,top=25"; 
   
   var winprint=window.open("email.aspx","Email",sOption); 
 
    winprint.focus(); 
}

function EmailThisPageEN() 
{ 
   var sOption="toolbar=no,location=no,directories=no,menubar=no,"; 
         sOption+="scrollbars=yes,width=400,height=200,left=100,top=25"; 
   
   var winprint=window.open("../email.aspx","Email",sOption); 
 
    winprint.focus(); 
}

function removeCVFile() 
{
    if($F('dosyaadi') != '') {
        new Ajax.Request('removecv.ashx?filename=' + $F('dosyaadi'), {asynchronous:true});
        $$$('dosyaadi').value = "";
    }
}

var errFunc = function(t) {
    alert('Error ' + t.status + ' -- ' + t.statusText);
}

var handlerFunc = function(t) {
    $$$('ats_div').innerHTML = t.responseText;
}

function updateATS(p) {
    $$$('ats_div').innerHTML = loadingText;
    new Ajax.Request('ats_list.ashx?' + p, { onSuccess:handlerFunc, onFailure:errFunc});
}

function updateAcenteler(p) {
    $$$('acenteler_div').innerHTML = loadingText;
    //new Ajax.Request('ats_list.ashx?' + p, { onSuccess:handlerFunc, onFailure:errFunc});
    new Ajax.Updater('acenteler_div','acenteler_list.ashx?' + p);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function ekraniKapat() {
			$('.golge').remove();
			$('body').append('<div class="golge"></div>');
			$('.golge').addClass('front');
		}

function ekraniAc() {
    $('.golge').remove();
}

function mesajGoster() {
    ekraniKapat();
    var html = '';
    html += '<div id="yilbasi">';
    html += '<a href="#" id="popClose"><img src="http://www.hdisigorta.com.tr/images/close_delete_2.png"></a>';
    html += '<p id="ybmesaj" style="font-family: \'Dynalight\', cursive;">Sağlık, güven, huzur dolu, her şeyin gönlünüzce gerçekleşeceği bir yıl dileriz.';
    html += '</p><p id="ybslogan">HDI Sigorta. Daima yanınızda.</p>';
    html += '</div>';
    $('body').append(html);
    $('#popClose').click(function() {
        mesajKaldir();
    });

    //snow
    $('#yilbasi').snowfall({flakeCount : 50, maxSpeed : 10});
}

function mesajKaldir() {
    $('#yilbasi').snowfall('clear');
    $('#yilbasi').remove();
    ekraniAc();
    $.cookie("ybgoster", "false");
}
