﻿function Video(swfDivID, Video, Photo, Title, Url) {
    if ((Video != '') && (Photo != '') && (Title != '') && (Url != '')) {
        Video = "../" + Video;
        so = new SWFObject("Swf/Video.swf", "mymovie", "202", "185", "8", "#000");
        so.addParam('allowfullscreen', 'true');
        so.addVariable("vid", Video);
        so.addVariable("pic", Photo);
        so.addVariable("title", Title);
        so.addVariable("url", Url);
        if (document.getElementById(swfDivID) != null) so.write(swfDivID);
    }
}

function DateControl(ddlDay, ddlMonth, ddlYear) {
    var Day = document.getElementById(ddlDay).value;
    var Month = document.getElementById(ddlMonth).value;
    var Year = document.getElementById(ddlYear).value;

    if ((Day == "0") || (Month == "0") || (Year == "0")) { return false; }

    switch (Month) {
        case "02":
            if ((Day > 29) || ((Year % 4 != 0) && (Day == 29))) {
                return false;
            }

        case "04":
            if (Day > 30) {
                return false;
            }

        case "06":
            if (Day > 30) {
                return false;
            }

        case "09":
            if (Day > 30) {
                return false;
            }

        case "11":
            if (Day > 30) {
                return false;
            }

        default:
            return true;
            break;
    }
}

var ShowBoxItemLength = 0;
var ShowBoxCount = 0;

function MasonryPrep() {
	ShowBoxCount++;
	
	if (ShowBoxCount == ShowBoxItemLength)
		$(function() { $('.content-container').masonry(); })
}


function PhotoAdd(ActivityID) {
    var wpen = window.open('/PhotoAdd.aspx?j=' + ActivityID, 'HayatiDoldurEtkinlikFotoğraf', 'scrollbars, width=600, height=600, resizable');
    wpen.focus();
}
