<!--
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_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_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 confirmSubmit(soru)
{
var agree=confirm(soru);
if (agree)
	return true ;
else
	return false ;
}

function showselectedimage(e){
	var image=e.value;
	var img = document.getElementById('image'); 
		if(image!="" && image!="select"){
		img.src = image;
		}else{
		img.src = "blank.gif";
		}
	}


function openindex($title,$file)
      { 
OpenWindow=window.open("", "newwin", "height=5, width=5,toolbar=no,scrollbars="+scroll+",menubar=no");
OpenWindow.document.write("<TITLE>" + $title +"</TITLE>")
OpenWindow.document.write("        <script language='javascript'>            function fitPic() {  self.focus();              if (window.innerWidth){                    iWidth = window.innerWidth+10;                    iHeight = window.innerHeight+10;                }else{                    iWidth = document.body.clientWidth;                    iHeight =document.body.clientHeight;                }                iWidth = document.images[0].width - iWidth;                iHeight = document.images[0].height - iHeight;                window.resizeBy(iWidth, iHeight);            };        </script><BODY onLoad=\"fitPic()\" style=\"margin:0px;padding:0px;\">")
OpenWindow.document.write("<img src=\"uimages/"+$file+"\"><div style=\"height:100%; width:100%;\"> <a href=\"javascript:;\" onclick=\"window.close()\"><img src=\"images/delete-page-blue.gif\" style=\"position:absolute; margin:4px;float:right; right:0px; bottom:0px; z-index:2;\" border=0></a> </div>")
OpenWindow.document.write("</BODY>")
OpenWindow.document.write("</HTML>")

OpenWindow.document.close()
self.name="main"
     }
	 
	 
function IsValidTime(timeStr) {
// Checks if time is in HH:MM:SS AM/PM format.
// The seconds and AM/PM are optional.

var timePat = /^(\d{1,2}):(\d{2})(:(\d{2}))?(\s?(AM|am|PM|pm))?$/;

var matchArray = timeStr.match(timePat);
if (matchArray == null) {
alert("Time is not in a valid format.");
return false;
}
hour = matchArray[1];
minute = matchArray[2];
second = matchArray[4];
ampm = matchArray[6];

if (second=="") { second = null; }
if (ampm=="") { ampm = null }

if (hour < 0  || hour > 23) {
alert("Hour must be between 1 and 12. (or 0 and 23 for military time)");
return false;
}
if (hour <= 12 && ampm == null) {
if (confirm("Please indicate which time format you are using.  OK = Standard Time, CANCEL = Military Time")) {
alert("You must specify AM or PM.");
return false;
   }
}
if  (hour > 12 && ampm != null) {
alert("You can't specify AM or PM for military time.");
return false;
}
if (minute<0 || minute > 59) {
alert ("Minute must be between 0 and 59.");
return false;
}
if (second != null && (second < 0 || second > 59)) {
alert ("Second must be between 0 and 59.");
return false;
}
return true;
}     



//-->



