﻿if (top.location != self.location) top.location = self.location;
function Form_onsubmit()
{
    setTimeout("DisableButton()", 1000);
    setTimeout("EnableButton()", 14000);
    //if (navigator.userAgent.indexOf("Firefox") > -1)
    //    alert("Click\n\r\n\r'Run ClickOnce Application'\n\r\n\rin following dialog to start Raffleprinter program with Firefox\n\r\n\r(Saving the File will not work)\n\r");
    return true;
}
function DisableButton()
{
    document.getElementById("ctl00_btnLaunchTicketer").disabled = true;
    if (document.getElementById("ctl00_ContentPlaceHolder1_btnLaunchTicketer") != null)
        document.getElementById("ctl00_ContentPlaceHolder1_btnLaunchTicketer").disabled = true;
}
function EnableButton()
{
    document.getElementById("ctl00_btnLaunchTicketer").disabled = false;
    if (document.getElementById("ctl00_ContentPlaceHolder1_btnLaunchTicketer") != null)
        document.getElementById("ctl00_ContentPlaceHolder1_btnLaunchTicketer").disabled = false;
}
function BookmarkPage()
{	
	var loc = document.location.href;
	if (loc.indexOf("?") >0)
		loc = loc.substring(0, loc.indexOf("?"));
	if (document.all)
		window.external.AddFavorite(loc, document.title);
	else if (window.sidebar)
		window.sidebar.addPanel(window.document.title, loc, "");
	var bug = new Image(); 
    	bug.src = "http://www.blocklayer.com/Logger.ashx?p="+ escape(document.location.href.substring(11)) +"&a=Bookmarked";
}
function TellAFriend()
{
    var loc = document.location.href;
    if (loc.indexOf("?") > 0)
		loc = loc.substring(0, loc.indexOf("?"));
    var w = window.open("TellFriend.aspx?loc="+ loc,null,"height=240,width=450,scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no,location=no");
    w.focus();
}
function GetFramework()
{
    var bug = new Image(); 
    bug.src = "http://www.blocklayer.com/Logger.ashx?p=Framework3&a=Ticketer3";
    window.navigate('App2008/setup.exe');
   // window.location.href = "App2008/setup.exe";
}
function SetLog()
{
    var frms = document.getElementsByName("google_ads_frame");
    for (var i=0; i<frms.length; i++)
    {
        frms[i].onfocus = AsLog; 
    }
}
function SetTitles()
{
    document.getElementById("marg1").style.backgroundColor = "#f5f5f5";
    document.getElementById("marg2").style.backgroundColor = "#f5f5f5";
    for (var i = 0; i < document.images.length; i++)
    {
        if (document.images[i].alt.length > 0)
            document.images[i].title = document.images[i].alt;
    }
}
function Children(adType)
{
    window.open("Transfer.aspx?a=" + adType);
}
function ExplainIE()
{
    alert("Raffleprinter is a Windows WPF Application, deployed via 'Clickonce'\n\r\n\rTo start the program you need to visit this site using Internet Explorer\n\r\n\rSorry for the inconvenience");
}
function Chat()
{
    var w = window.open("Chat.aspx", null, "height=720,width=640,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no");
    w.focus();
}