function populatedropdown(dayfield, monthfield, yearfield){
var today=new Date()
var dayfield=document.getElementById(dayfield)
var monthfield=document.getElementById(monthfield)
var yearfield=document.getElementById(yearfield)
for (var i=0; i<31; i++)
dayfield.options[i]=new Option(i+1, i+1)
dayfield.options[today.getDate()-1]=new Option(today.getDate(), today.getDate(), true, true) //select today's day
for (var m=0; m<12; m++)
monthfield.options[m]=new Option(m+1, m+1)
monthfield.options[today.getMonth()]=new Option(today.getMonth()+1, today.getMonth()+1, true, true) //select today's month
var thisyear=today.getFullYear()
for (var y=0; y<2; y++){
yearfield.options[y]=new Option(thisyear, thisyear)
thisyear+=1
}
yearfield.options[0]=new Option(today.getFullYear(), today.getFullYear(), true, true) //select today's year
}

// AnchorPosition
function getAnchorPosition(anchorname) {
	var coordinates = new Object();
	var x=0;
	var y=0;
	var use_gebi = false;
	var use_css = false;
	var use_layers = false;
	if (document.getElementById) { use_gebi = true; }
	else if (document.all) { use_css = true; }
	else if (document.layers) { use_layers = true; }
 	if (use_gebi && document.all) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o = document.getElementById(anchorname);
		x = o.offsetLeft;
		y = o.offsetTop;
		}
 	else if (use_css) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name == anchorname) {
				found=1;
				break;
				}
			}
		if (found == 0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x = document.anchors[i].x;
		y = document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x = x;
	coordinates.y = y;
	return coordinates;
	}
function getAnchorWindowPosition(anchorname) {
	var coordinates = getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x = coordinates.x + window.screenLeft;
			y = coordinates.y + window.screenTop;
			}
		else {
			x = coordinates.x + window.screenX + (window.outerWidth-window.innerWidth) - window.pageXOffset;
			y = coordinates.y + window.screenY + (window.outerHeight-24-window.innerHeight) - window.pageYOffset;
			}
		}
	else if (document.all) {
		x = coordinates.x + window.screenLeft;
		y = coordinates.y + window.screenTop;
		}
	else if (document.layers) {
		x = coordinates.x + window.screenX + (window.outerWidth-window.innerWidth) - window.pageXOffset;
		y = coordinates.y + window.screenY + (window.outerHeight-24-window.innerHeight) - window.pageYOffset;
		}
	coordinates.x = x;
	coordinates.y = y;
	return coordinates;
	}
function AnchorPosition_getPageOffsetLeft (el) {
	var ol = el.offsetLeft;
	while ((el = el.offsetParent) != null) { 
		ol += el.offsetLeft; 
		}
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	var scrollamount = document.body.scrollLeft;
	return AnchorPosition_getPageOffsetLeft(el)-scrollamount;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot = el.offsetTop;
	while((el = el.offsetParent) != null) { 
		ot += el.offsetTop; 
		}
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	var scrollamount = document.body.scrollTop;
	return AnchorPosition_getPageOffsetTop(el)-scrollamount;
	}
// CalendarPopup	
function CalendarPopup() {
	var newCalendar;
	if (arguments.length>0) {
		newCalendar = new PopupWindow(arguments[0]);
		}
	else {
		newCalendar = new PopupWindow();
		newCalendar.setSize(150,175);
		}
	newCalendar.offsetX = 0;
	newCalendar.offsetY = 0;
	newCalendar.autoHide();
	newCalendar.monthNames = new Array("Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık");
	newCalendar.dayHeaders = new Array("P","P","S","Ç","P","C","C");
	newCalendar.returnFunction = "tmpReturnFunction";
	newCalendar.weekStartDay = 0;
	newCalendar.setReturnFunction = CalendarPopup_setReturnFunction;
	newCalendar.setMonthNames = CalendarPopup_setMonthNames;
	newCalendar.setDayHeaders = CalendarPopup_setDayHeaders;
	newCalendar.setWeekStartDay = CalendarPopup_setWeekStartDay;
	newCalendar.showCalendar = CalendarPopup_showCalendar;
	newCalendar.hideCalendar = CalendarPopup_hideCalendar;
	newCalendar.getStyles = CalendarPopup_getStyles;
	newCalendar.refreshCalendar = CalendarPopup_refreshCalendar;
	newCalendar.getCalendar = CalendarPopup_getCalendar;
	return newCalendar;
	}

function CalendarPopup_tmpReturnFunction(y,m,d) {
	alert('Use setReturnFunction() to define which function will get the clicked results!');
	}
function CalendarPopup_setReturnFunction(name) {
	this.returnFunction = name;
	}
function CalendarPopup_setMonthNames() {
	for (var i=0; i<arguments.length; i++) {
		this.monthNames[i] = arguments[i];
		}
	}
function CalendarPopup_setDayHeaders() {
	for (var i=0; i<arguments.length; i++) {
		this.dayHeaders[i] = arguments[i];
		}
	}
function CalendarPopup_setWeekStartDay(day) {
	this.weekStartDay = day;
	}
function CalendarPopup_hideCalendar() {
	if (arguments.length > 0) {
		window.popupWindowObjects[arguments[0]].hidePopup();
		}
	else {
		this.hidePopup();
		}
	}
function CalendarPopup_refreshCalendar(index) {
	var calObject = window.popupWindowObjects[index];
	if (arguments.length>1) { 
		calObject.populate(calObject.getCalendar(arguments[1],arguments[2]));
		}
	else {
		calObject.populate(calObject.getCalendar());
		}
	calObject.refresh();
	}
function CalendarPopup_showCalendar(anchorname) {
	this.populate(this.getCalendar());
	this.showPopup(anchorname);
	}
function CalendarPopup_getStyles() {
	var result = "";
	result += "<STYLE>\n";
	result += "cal { font-family:arial; font-size: 8pt; }\n";
	result += "calmonth { font-family:arial; font-size: 8pt; text-align: right;}\n";
	result += "caltoday { font-family:arial; font-size: 8pt; text-align: right; color: red; border-width:1; border-type:solid; border-color:#800000; }\n";
	result += "A.cancel { font-family:arial; font-size: 8pt; height: 20px; color: gray; }\n";
	result += "A.cal { text-decoration:none; color:#000000; }\n";
	result += "A.calthismonth { text-decoration:none; color:#000000; font-weight: bold;}\n";
	result += "A.calothermonth { text-decoration:none; color:#808080; }\n";
	result += "</STYLE>\n";
	return result;
	}
function CalendarPopup_getCalendar() {
	var now = new Date();
	if (arguments.length > 0) { var month = arguments[0]; }
		else { var month = now.getMonth()+1; }
	if (arguments.length > 1) { var year = arguments[1]; }
		else { var year = now.getFullYear(); }
	var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
	if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) { // leap year
		daysinmonth[2] = 29;
		}
	var current_month = new Date(year,month-1,1);
	var display_year = year;
	var display_month = month;
	var display_date = 1;
	var weekday= current_month.getDay();
	var offset = 0;
	if (weekday >= this.weekStartDay) {
		offset = weekday - this.weekStartDay;
		}
	else {
		offset = 7-this.weekStartDay+weekday;
		}
	if (offset > 0) {
		display_month--;
		if (display_month < 1) { display_month = 12; display_year--; }
		display_date = daysinmonth[display_month]-offset+1;
		}
	var next_month = month+1;
	var next_month_year = year;
	if (next_month > 12) { next_month=1; next_month_year++; }
	var last_month = month-1;
	var last_month_year = year;
	if (last_month < 1) { last_month=12; last_month_year--; }
	var date_class;
	var result = "";
	if (this.type == "WINDOW") {
		var windowref = "window.opener.";
		}
	else {
		var windowref = "";
		}
	if (this.type == "WINDOW") {
		result += "<HTML><HEAD><TITLE>Takvim</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";
		result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';
		result += '<TR BGCOLOR="#99CCFF">\n';
		result += ' <TD BGCOLOR="#99CCFF" COLSPAN="3" VALIGN="MIDDLE"><A HREF="#" onClick="cal.hidePopup();return false;"><img src="images/calclose.gif" width="7" height="7" alt="" border="0"></a></TD>\n';
		result += '</TR>\n';
		}
	else {
		result += '<TABLE WIDTH=144 BORDER=1 BORDERWIDTH=1 BORDERCOLOR="#000000" CELLSPACING=0 CELLPADDING=2 BGCOLOR="#FFFFFF">\n';
		// result += '<TR BGCOLOR="#99CCFF">\n';
		// result += ' <TD BGCOLOR="#99CCFF" COLSPAN="3" VALIGN="MIDDLE"><A HREF="#" onClick="cal.hidePopup();return false;"><img src="images/calclose.gif" alt="" border="0"></A></TD>\n';
		// result += '</TR>\n';
		result += '<TR><TD ALIGN=CENTER>\n';
		result += '<CENTER>\n';
		result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR="#FFFFFF">\n';
		}
	result += '<TR BGCOLOR="#FFFFFF" HEIGHT="15">\n';
	result += '	<TD BGCOLOR="#FFFFFF" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+last_month+','+last_month_year+');"><img src="images/prevmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '	<TD BGCOLOR="#FFFFFF" style="color: red; font-weight:bold;" WIDTH=100 ALIGN=CENTER>'+this.monthNames[month-1]+' '+year+'</TD>\n';
	result += '	<TD BGCOLOR="#FFFFFF" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+next_month+','+next_month_year+');"><img src="images/nextmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '</TR></TABLE>\n';
	result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
	result += '<TR BGCOLOR="#FFFFFF">\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#000000">'+this.dayHeaders[(this.weekStartDay)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#000000">'+this.dayHeaders[(this.weekStartDay+1)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#000000">'+this.dayHeaders[(this.weekStartDay+2)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#000000">'+this.dayHeaders[(this.weekStartDay+3)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#000000">'+this.dayHeaders[(this.weekStartDay+4)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#000000">'+this.dayHeaders[(this.weekStartDay+5)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#000000">'+this.dayHeaders[(this.weekStartDay+6)%7]+'</TD>\n';
	result += '</TR>\n';
	result += '<TR><TD COLSPAN=7 ALIGN=CENTER><IMG SRC="images/graypixel.gif" WIDTH=120 HEIGHT=1></TD></TR>\n';
	for (var row=1; row<=6; row++) {
		result += '<TR>\n';
		for (var col=1; col<=7; col++) {
			if (display_month == month) {
				date_class = "calthismonth";
				}
			else {
				date_class = "calothermonth";
				}
			if ((display_month == now.getMonth()+1) && (display_date==now.getDate()) && (display_year==now.getFullYear())) {
				td_class="caltoday";
				}
			else {
				td_class="calmonth";
				}
			result += '	<TD CLASS="'+td_class+'" ALIGN="CENTER"><A HREF="javascript:'+windowref+this.returnFunction+'('+display_year+','+display_month+','+display_date+');'+windowref+'CalendarPopup_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+display_date+'</A></TD>\n';
			display_date++;
			if (display_date > daysinmonth[display_month]) {
				display_date=1;
				display_month++;
				}
			if (display_month > 12) {
				display_month=1;
				display_year++;
				}
			}
		result += '</TR>';
		}
	result += '<TR><TD COLSPAN=7 ALIGN=CENTER><IMG SRC="images/graypixel.gif" WIDTH=120 HEIGHT=1></TD></TR>\n';
	result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR="#FFFFFF">\n';
	result += '<TR BGCOLOR="#FFFFFF" HEIGHT="15">\n';
	result += '	<TD BGCOLOR="#FFFFFF" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+last_month+','+last_month_year+');"><img src="images/prevmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '	<TD BGCOLOR="#FFFFFF" CLASS="cal" WIDTH=100 ALIGN=CENTER></TD>\n';
	result += '	<TD BGCOLOR="#FFFFFF" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+next_month+','+next_month_year+');"><img src="images/nextmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '</TR></TABLE>\n';
	// result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
	// result += '<TR>\n';
	// result += '	<TD COLSPAN=7 ALIGN=CENTER>\n';
	// result += '		<A HREF="#" class="cancel" onClick="cal.hidePopup();return false;">Cancel</A>\n';
	// result += '		<BR>\n';
	// result += '	</TD></TR></TABLE>';
	result += '	</CENTER></TD></TR></TABLE>\n';
	if (this.type == "WINDOW") {
		result += "</BODY></HTML>\n";
		}
	return result;
	}

// PopupWindow	
function PopupWindow_getXYPosition(anchorname) {
	var coordinates;
	if (this.type == "WINDOW") {
		coordinates = getAnchorWindowPosition(anchorname);
		}
	else {
		coordinates = getAnchorPosition(anchorname);
		}
	this.x = coordinates.x;
	this.y = coordinates.y;
	}
function PopupWindow_setSize(width,height) {
	this.width = width;
	this.height = height;
	}
function PopupWindow_populate(contents) {
	this.contents = contents;
	this.populated = false;
	}
function PopupWindow_refresh() {
	if (this.divName != null) {
		if (this.use_gebi) {
			document.getElementById(this.divName).innerHTML = this.contents;
			}
		else if (this.use_css) { 
			document.all[this.divName].innerHTML = this.contents;
			}
		else if (this.use_layers) { 
			var d = document.layers[this.divName]; 
			d.document.open();
			d.document.writeln(this.contents);
			d.document.close();
			}
		}
	else {
		if (this.popupWindow != null && !this.popupWindow.closed) {
			this.popupWindow.document.open();
			this.popupWindow.document.writeln(this.contents);
			this.popupWindow.document.close();
			}
		}
	}
function PopupWindow_showPopup(anchorname) {
	this.getXYPosition(anchorname);
	this.x += this.offsetX;
	this.y += this.offsetY;
	if (!this.populated && (this.contents != "")) {
		this.populated = true;
		this.refresh();
		}
	if (this.divName != null) {
		if (this.use_gebi) {
			document.getElementById(this.divName).style.left = this.x;
			document.getElementById(this.divName).style.top = this.y;
			document.getElementById(this.divName).style.visibility = "visible";
			}
		else if (this.use_css) {
			document.all[this.divName].style.left = this.x;
			document.all[this.divName].style.top = this.y;
			document.all[this.divName].style.visibility = "visible";
			}
		else if (this.use_layers) {
			document.layers[this.divName].left = this.x;
			document.layers[this.divName].top = this.y;
			document.layers[this.divName].visibility = "visible";
			}
		}
	else {
		if (this.popupWindow == null || this.popupWindow.closed) {
			this.popupWindow = window.open("about:blank","window_"+anchorname,"toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no,width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
			}
		this.refresh();
		}
	}
function PopupWindow_hidePopup() {
	if (this.divName != null) {
		if (this.use_gebi) {
			document.getElementById(this.divName).style.visibility = "hidden";
			}
		else if (this.use_css) {
			document.all[this.divName].style.visibility = "hidden";
			}
		else if (this.use_layers) {
			document.layers[this.divName].visibility = "hidden";
			}
		}
	else {
		if (this.popupWindow && !this.popupWindow.closed) {
			this.popupWindow.close();
			this.popupWindow = null;
			}
		}
	}
function PopupWindow_isClicked(e) {
	if (this.divName != null) {
		if (this.use_layers) {
			var clickX = e.pageX;
			var clickY = e.pageY;
			var t = document.layers[this.divName];
			if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
				return true;
				}
			else { return false; }
			}
		else if (document.all) { 
			var t = window.event.srcElement;
			while (t.parentElement != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentElement;
				}
			return false;
			}
		else if (this.use_gebi) {
			var t = e.originalTarget;
			while (t.parentNode != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentNode;
				}
			return false;
			}
		return false;
		}
	return false;
	}
function PopupWindow_hideIfNotClicked(e) {
	if (this.autoHideEnabled && !this.isClicked(e)) {
		this.hidePopup();
		}
	}
function PopupWindow_autoHide() {
	this.autoHideEnabled = true;
	}
function PopupWindow_hidePopupWindows(e) {
	for (var i=0; i<popupWindowObjects.length; i++) {
		if (popupWindowObjects[i] != null) {
			var p = popupWindowObjects[i];
			p.hideIfNotClicked(e);
			}
		}
	}
function PopupWindow_attachListener() {
	if (document.layers) {
		document.captureEvents(Event.MOUSEUP);
		}
	window.popupWindowOldEventListener = document.onmouseup;
	if (window.popupWindowOldEventListener != null) {
		document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
		}
	else {
		document.onmouseup = PopupWindow_hidePopupWindows;
		}
	}
function PopupWindow() {
	if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
	if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
	if (!window.listenerAttached) {
		window.listenerAttached = true;
		PopupWindow_attachListener();
		}
	this.index = popupWindowIndex++;
	popupWindowObjects[this.index] = this;
	this.divName = null;
	this.popupWindow = null;
	this.width=0;
	this.height=0;
	this.populated = false;
	this.visible = false;
	this.autoHideEnabled = false;
	
	this.contents = "";
	if (arguments.length>0) {
		this.type="DIV";
		this.divName = arguments[0];
		}
	else {
		this.type="WINDOW";
		}
	this.use_gebi = false;
	this.use_css = false;
	this.use_layers = false;
	if (document.getElementById) { this.use_gebi = true; }
	else if (document.all) { this.use_css = true; }
	else if (document.layers) { this.use_layers = true; }
	else { this.type = "WINDOW"; }
	this.offsetX = 0;
	this.offsetY = 0;
	this.getXYPosition = PopupWindow_getXYPosition;
	this.populate = PopupWindow_populate;
	this.refresh = PopupWindow_refresh;
	this.showPopup = PopupWindow_showPopup;
	this.hidePopup = PopupWindow_hidePopup;
	this.setSize = PopupWindow_setSize;
	this.isClicked = PopupWindow_isClicked;
	this.autoHide = PopupWindow_autoHide;
	this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
	}
	
	var calCheckIn= new CalendarPopup("calendarCheckIn");
	calCheckIn.setReturnFunction("showDateCheckIn");
	calCheckIn.setDayHeaders('Pa','Pt','Sa','Ça','Pe','Cu','Ct');
	var offsetX=0;
	var offsetY=0;
	var bn=navigator.platform
	var leftmargin=0
	var scrheight=0;scrwidth=0;
	var bw=navigator.userAgent;
	var os="Win"
	var ie=false;
	var ns=false;
	var sf=false;
	var fx=false
	var op=false;
	var mz=false;
	scrheight =(window.screen.height);
	scrwidth =(window.screen.width);
	//alert("scrheight:" +scrheight +" scrwidth:" +scrwidth);
	//alert(bw);
	if(bn.indexOf("Win32")==-1){os="Mac";}
	if(bw.indexOf("Opera")!=-1)
	{op=true;}
	else if(bw.indexOf("Safari")!=-1)
	{sf=true;}
	else if(bw.indexOf("Firefox")!=-1)
	{fx=true;}
	else if(bw.indexOf("MSIE")!=-1)
	{ie=true;}
	else if(bw.indexOf("Netscape")!=-1 && bw.indexOf("Mozilla")!=-1)
	{ns=true;}
	else if(bw.indexOf("Mozilla")!=-1)
	{mz=true;}
	else
	{op=true;}

	var pos=new Array(0,64,0,64,0,64,0,64,  			// win-ie 800x600;1024x768;1152x864;1280x720 
				      0,64,0,64,0,64,0,64, 	  			// win-op 800x600;1024x768;1152x864;1280x720
				      180,572,286,572,352,572,414,572,	// win-fx 800x600;1024x768;1152x864;1280x720 
				  	  180,572,286,572,352,572,414,572,	// win-ns 800x600;1024x768;1152x864;1280x720
				  	  180,572,286,572,352,572,414,572,	// win-mz 800x600;1024x768;1152x864;1280x720
					   
				      0,64,-100,64,-150,64,-230,64,		// mac-ie 800x600;1024x768;1152x864;1280x720 
					  0,64,0,64,0,64,0,64,           	// mac-op 800x600;1024x768;1152x864;1280x720 
				      180,572,286,572,352,572,414,572,	// mac-fx 800x600;1024x768;1152x864;1280x720 
					  180,572,286,572,352,572,414,572,	// mac-ns 800x600;1024x768;1152x864;1280x720
					  180,572,286,572,352,572,414,572,
					  414,414,414);   					// mac-sf 800x600;1024x768;1152x864;1280x720 			
	setPos(pos);

	function setPos(pos)
	{
		if(os=="Win")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600") {offsetX=parseInt(pos[0]);offsetY=parseInt(pos[1]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[2]);offsetY=parseInt(pos[3]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[4]);offsetY=parseInt(pos[5]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				//alert("X:"+offsetX+"   Y:"+offsetY);
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[8]);offsetY=parseInt(pos[9]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[10]);offsetY=parseInt(pos[11]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[12]);offsetY=parseInt(pos[13]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				//alert("X:"+offsetX+"   Y:"+offsetY);
			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[16]);offsetY=parseInt(pos[17]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[18]);offsetY=parseInt(pos[19]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[20]);offsetY=parseInt(pos[21]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[22]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[23]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
			else if(ns)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[24]);offsetY=parseInt(pos[25]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[26]);offsetY=parseInt(pos[27]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[28]);offsetY=parseInt(pos[29]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[30]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[31]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
			else if(mz)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[32]);offsetY=parseInt(pos[33]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[34]);offsetY=parseInt(pos[35]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[36]);offsetY=parseInt(pos[37]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[38]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[39]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
		}
		else if(os=="Mac")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[40]);offsetY=parseInt(pos[41]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[42]);offsetY=parseInt(pos[43]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[44]);offsetY=parseInt(pos[45]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[46]);offsetY=parseInt(pos[47]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[48]);offsetY=parseInt(pos[49]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[50]);offsetY=parseInt(pos[51]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[52]);offsetY=parseInt(pos[53]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[54]);offsetY=parseInt(pos[55]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[56]);offsetY=parseInt(pos[57]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[58]);offsetY=parseInt(pos[59]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[60]);offsetY=parseInt(pos[61]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[62]);offsetY=parseInt(pos[63]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(ns)
			{
				
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[64]);offsetY=parseInt(pos[65]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[66]);offsetY=parseInt(pos[67]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[68]);offsetY=parseInt(pos[69]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[70]);offsetY=parseInt(pos[71]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			
			else if(sf)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[72]);offsetY=parseInt(pos[73]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[74]);offsetY=parseInt(pos[75]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[76]);offsetY=parseInt(pos[77]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[78]);offsetY=parseInt(pos[79]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
		}
	}	
	calCheckIn.offsetX = offsetX ;	// 55;
	calCheckIn.offsetY = offsetY	// 15;
	
	//calCheckIn.offsetX = 0;
	//calCheckIn.offsetY = 35;
				
	function showDateCheckIn(y,m,d)
	{
		window.document.QRezervation.month.value = m;
		window.document.QRezervation.day.value = d;
		window.document.QRezervation.year.value = y;
	}
	document.write(calCheckIn.getStyles());

