﻿/// <reference path="jquery-1.3.2-vsdoc.js" />
function el(name)
    {
        return document.getElementById(name);
    }

    function hideFooter(elid)
    {
        document.getElementById(elid).style.display="none";
    }

    function showFooter(elid, imagename)
    {
        document.getElementById(elid).style.display="inline";
        document.getElementById(elid).style.border="none";
        //document.getElementById(elid).src = "/images/menufooters/" + imagename;
        document.getElementById(elid).src = "/handlers/resizeimage.ashx?image=/images/fullsize/" + imagename + "&width=200&height=200";
    }

    function PopupPic(sPicURL)
    {
    window.open("popuppic.aspx?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
    }

    //regex constants//
    var constREEMail = /([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/;

    image1 = new Image();
    image1.src = "/favicon.ico";
    
    function NewC2TWindow(myname,w,h,scroll,pos)
    {
        var win=null;
        mypage="http://account.click2talk.com/account/click2talk/c2tpopup/popup.aspx?guid=961RkYxuBinTNZOlpxulXbC";
        if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/4:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
        settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';win=window.open(mypage,myname,settings);
    }

window.size = function()
{
	var w = 0;
	var h = 0;

	//IE
	if(!window.innerWidth)
	{
		//strict mode
		if(!(document.documentElement.clientWidth == 0))
		{
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		}
		//quirks mode
		else
		{
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
	}
	//w3c
	else
	{
		w = window.innerWidth;
		h = window.innerHeight;
	}
	return {width:w,height:h};
}

window.center = function()
{
	var hWnd = (arguments[0] != null) ? arguments[0] : {width:0,height:0};

	var _x = 0;
	var _y = 0;
	var offsetX = 0;
	var offsetY = 0;

	//IE
	if(!window.pageYOffset)
	{
		//strict mode
		if(!(document.documentElement.scrollTop == 0))
		{
			offsetY = document.documentElement.scrollTop;
			offsetX = document.documentElement.scrollLeft;
		}
		//quirks mode
		else
		{
			offsetY = document.body.scrollTop;
			offsetX = document.body.scrollLeft;
		}
	}
	//w3c
	else
	{
		offsetX = window.pageXOffset;
		offsetY = window.pageYOffset;
	}

	_x = ((this.size().width-hWnd.width)/2)+offsetX;
	_y = ((this.size().height-hWnd.height)/2)+offsetY;

	return{x:_x,y:_y};
}

$(document).ready(function(){

    $(".prevbtn-slide").click(function(){

	    $("#prevpanel").slideToggle("slow");
	    $(this).toggleClass("prevactive"); return false;
    });
});
