﻿function hata(aciklama)  {
	aciklama = aciklama.replace("¨","'");
	aciklama = aciklama.replace("¨","'");
   hs.htmlExpand(null, {
      src: 'hata.asp?hata=' + aciklama, objectType: 'iframe',  width: 650 
   });
//*return hs.htmlExpand(this, { objectType: 'iframe', width: 850} )
}

function fis(aciklama)  {
	aciklama = aciklama.replace("¨","'");
	aciklama = aciklama.replace("¨","'");
   hs.htmlExpand(null, {
      src: 'fis.detayi.asp?fis=' + aciklama, objectType: 'iframe',  width: 950 
   });
//*return hs.htmlExpand(this, { objectType: 'iframe', width: 850} )
}

function git(aciklama)  {
	aciklama = aciklama.replace("¨","'");
	aciklama = aciklama.replace("¨","'");
   hs.htmlExpand(this, {
      src: aciklama, objectType: 'iframe',  width: 950 
   });
//*return hs.htmlExpand(this, { objectType: 'iframe', width: 850} )
}

function mail(aciklama)  {
	aciklama = aciklama.replace("¨","'");
	aciklama = aciklama.replace("¨","'");
   hs.htmlExpand(null, {
      src: 'mail.asp?' + aciklama, objectType: 'iframe',  width: 650 
   });
//*return hs.htmlExpand(this, { objectType: 'iframe', width: 850} )
}

var _countDowncontainer=0;
var _currentSeconds=0;

function ActivateCountDown(strContainerID, initialValue) {
	_countDowncontainer = document.getElementById(strContainerID);
	
	if (!_countDowncontainer) {
		alert("count down error: container does not exist: "+strContainerID+
			"\nmake sure html element with this ID exists");
		return;
	}
	
	SetCountdownText(initialValue);
	window.setTimeout("CountDownTick()", 1000);
}

function CountDownTick() {
	if (_currentSeconds <= 0) {
		alert("Oturmunuz Sonlandırılmıştır!");
		return;
	}
	
	SetCountdownText(_currentSeconds-1);
	window.setTimeout("CountDownTick()", 1000);
}

function SetCountdownText(seconds) {
	//store:
	_currentSeconds = seconds;
	
	//get minutes:
	var minutes=parseInt(seconds/60);
	
	//shrink:
	seconds = (seconds%60);
	
	//get hours:
	var hours=parseInt(minutes/60);
	
	//shrink:
	minutes = (minutes%60);
	
	//build text:
	var strText = AddZero(hours) + ":" + AddZero(minutes) + ":" + AddZero(seconds);
	
	//apply:
	_countDowncontainer.innerHTML = strText;
}

function AddZero(num) {
	return ((num >= 0)&&(num < 10))?"0"+num:num+"";
}

function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
//-->

function uyari(link_ok,link_cancel,mesaj) {
var msg = confirm(mesaj)
if (msg) {window.location.href = link_ok}
else 
{window.location.href = link_cancel}
}
