﻿<!--
function open_window(url, width, height)
{
	//var x = window.open(url,"content","height=" + height + ", width=" + width + ", scrollbars=no,status=no,toolbar=no,menubar=no,location=no,top=7,modal=yes");
	var x = window.showModalDialog(url,"content","dialogHeight:" + height + "px; dialogWidth:" + width + "px; dialogTop: 50px; dialogLeft: 50px; edge: Raised; center: No; help: No; resizable: No; status: No;");
	if (x!=null)
	{
		if (x==true)
		{
			window.location.reload();
		}
	}
}
	
function open_windowNonModal(url, width, height)
{
	var x = window.open(url,"content","height=" + height + ", width=" + width + ", scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes,left=50,top=50,modal=yes");
	//var x = window.showModalDialog(url,"content","dialogHeight:" + height + "px; dialogWidth:" + width + "px;");
	
    if (window.focus) 
	{ x.focus();
	}
	
	if (x!=null)
	{
		if (x==true)
		{
			window.location.reload();
		}
	}
}

function open_windowNonModal_flex(url, width, height)
{
	var x = window.open(url,"content","height=" + height + ", width=" + width + ", scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes,left=50,top=50,modal=no");
	//var x = window.showModalDialog(url,"content","dialogHeight:" + height + "px; dialogWidth:" + width + "px;");
	
    if (window.focus) 
	{ x.focus();
	}
	
	if (x!=null)
	{
		if (x==true)
		{
			window.location.reload();
		}
	}
}
	
	
	function open_windowSearch(url)
{
	var x = window.open(url);
	//var x = window.showModalDialog(url,"content","dialogHeight:" + height + "px; dialogWidth:" + width + "px;");
	
    if (window.focus) 
	{ x.focus();
	}
	
	if (x!=null)
	{
		if (x==true)
		{
			window.location.reload();
		}
	}
}

	
function reloadWindow()
{
	window.location.href = window.location.href;
}

function hideAll(num)
{
    var strLen = num.length;
    if (strLen<=3)
    {    
        for (var x = 1; x <= 99; x++)
        {
                var el = document.getElementById('m'+ x);
                if (el)
                {
                if(document.getElementById('m'+ x).style.display=="block")
                    {
                    var plus=document.getElementById('p' + x);
		            plus.style.display="block";
		            var minus=document.getElementById('m' + x);
		            minus.style.display="none";
		            }
		        }
        }
    }
    else
    { 
        for (var x = 100; x <= 199; x++)
        {
                var el = document.getElementById('m'+ x);
                if (el)
                {
                if(document.getElementById('m'+ x).style.display=="block")
                    {
                    var plus=document.getElementById('p' + x);
		            plus.style.display="block";
		            var minus=document.getElementById('m' + x);
		            minus.style.display="none";
		            }
		        }
        }
    }
}

function toggle(trow)
{
var strLen = trow.length;
var number = trow.substring(1,strLen);
hideAll(trow);
	if (trow.charAt(0)=='p')
	{
	var plus=document.getElementById('p' + number);
	plus.style.display="none";
	var minus=document.getElementById('m' + number);
	minus.style.display="block";
	}
	else
	{
		if (trow.charAt(0)=='m')
		{
		var plus=document.getElementById('p' + number);
		plus.style.display="block";
		var minus=document.getElementById('m' + number);
		minus.style.display="none";
		}
	}
}

function openDetails(content_id)
{
    window.location.href = 'ContentDetails.aspx?content_id=' + content_id;
}
function loginAlert()
{
    alert(" Please Login To Access This Page");
}
function changeZIndex(direction,panel)
{
//alert("ZINDEXdirection: " + direction + " panel: " + panel); 
var odiv2 = document.getElementById("Layer2");
var odiv3 = document.getElementById("Layer3");
    if (panel =="575x405_Event")
    {
        //alert(panel);
        if (direction=="front")
        {   
            odiv3.style.zIndex = "3";
            odiv3.style.display = "block";
            //alert("block");
        }
        else
        {
            odiv3.style.zIndex = "-3";
            odiv3.style.display = "none";
            //alert("none");
        }
    }
    else
    {
        //alert(panel);
        if (direction=="front")
        {
            odiv2.style.display = "block";
            odiv2.style.zIndex = "2";
            //alert("block");
        }
        else
        {
            odiv2.style.zIndex = "-2";
            odiv2.style.display = "none";
            //alert("none");
        }
    }
}

function showHideCommPanel(direction,panel)
{
//alert("direction: " + direction + " panel: " + panel); 
var odiv2 = document.getElementById("Layer2");
var odiv3 = document.getElementById("Layer3");
    if (panel =="575x405_Event")
    {
        //alert(panel);
        if (direction=="front")
        {
            odiv3.style.display = "block";
            //alert("block");
        }
        else
        {
            odiv3.style.display = "none";
            //alert("none");
        }
    }
    else
    {
        //alert(panel);
        if (direction=="front")
        {
            odiv2.style.display = "block";
            //alert("block");
        }
        else
        {
            odiv2.style.display = "none";
            //alert("none");
        }
    }    
}

function openAlertOrLoginWindow()
{

openAlertWindow();
//alert("Please login to the system");
return;
}




function openAlertWindow()
{

open_windowNonModal('login.aspx', '375', '350');

//alert("Please Login To The System");

return false;
}


function OpenInterNationalWindow(sel)
           
   {
        var newurl = sel.options[sel.selectedIndex].value;
        var selIndex = sel.selectedIndex;
         ///alert(selIndex);
                
        if (selIndex > 1)
         {
             window.open(newurl);
         }
        else 
         {
             alert("Please Select Valid Country Name");
         }
    }
    
function CaptureUser(zApp)
{
	var Today = new Date();
	//var loc = root.getLocale();
    //prefs.language = loc.getLanguage(); 
    //prefs.country = loc.getCountry();
    //prefs.timezone = root.getTimeZone().getID();
	
	document.location="PTouch.aspx?App=" + zApp + "&Datez=" + Today.toLocaleDateString() + "&Zone=" + Today;
}
// -->