var hdst='15px';
var ourl='http://on1.picsrc.net/';
var dnr=true;
function bov(){this.className='cstsTHov';}
function bout(){this.className='cstsT';}
function c_dr(){setTimeout(function(){if(dnr)document.location.href=self.location;},25000)}
function r_dr(){dnr=false;}
function inith() {
    try{window.moveTo(0,0);
    window.resizeTo(screen.width, screen.height)}catch(e){}
    setTimeout(function(){$("#content .hed").corner(hdst)},90);
    $("#banner").click(function(){document.location.href='index.html'});
    $(".bkmk").css('visibility','visible').corner();
    $(".cstsT").hover(bov,bout);
}
function nav_men_h(frstc) {
    var s = "<div id=navmen>";
    s += "<div class=dvtp>"+fv_n+" Favorite Categories</div>";
    $.each(mfc,function(i,c){
        if(c.pn == pct) s += "<div class=selp>"+c.dn+"</div>";
        else s += "<a class=fnb id=fcn"+i+" href=\""+c.pn+".html\">"+c.dn+"</a>";
    });
    if(mfc.length==0) s += "<div style='margin-left:7px;white-space:nowrap'>No Favorites Chosen</div>";
    s +="<div class=dvbt><hr style='margin:0px 0px 10px 0px'></div>";
    $.each(ct,function(i,c){
        if(typeof(c.dv) != "undefined") if(c.dv == "tp") s +="<div class=dvtp>"+c.dvn+"</div>";
        if(c.pn == pct) s += "<div class=selp>"+c.dn+"</div>";
        else s += "<a class=mnb id=ccn"+i+" href=\""+c.pn+".html\">"+c.dn+"</a>";
        if(typeof(c.dv) != "undefined") if(c.dv == "bt") s +="<div class=dvbt><hr style='margin:0px'></div>";
    });
    s += "</div>";$("#avmenu").empty().append(s);
    try{favEv()}catch(e){}
}
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function eraseCookie(name)
{
	createCookie(name,"",-1);
}
function getjs(su,cb){$.ajax({type:"GET",url:su,data:null,success:cb,dataType: "script",cache:true});}
function shmfc_h() {
    $("#myfct").empty();
    if(mfc.length == 0) {
        $("#nofcmsg").show();
        nav_men_h();
        return;
    } else { $("#nofcmsg").hide();}
    var ou = ourl+"images/";
    for(var i=0;i<mfc.length;i=i+4) {
        var s = "<tr><td><center><a href='"+mfc[i].pn+".html'><img class=wgi src='"+ou+mfc[i].u+"'>"+mfc[i].dn+"</a></center></td>";
        if(mfc[i+1] != null) s += "<td><center><a href='"+mfc[i+1].pn+".html'><img class=wgi src='"+ou+mfc[i+1].u+"'>"+mfc[i+1].dn+"</a></center></td>";
        if(mfc[i+2] != null) s += "<td><center><a href='"+mfc[i+2].pn+".html'><img class=wgi src='"+ou+mfc[i+2].u+"'>"+mfc[i+2].dn+"</a></center></td>";
        if(mfc[i+3] != null) s += "<td><center><a href='"+mfc[i+3].pn+".html'><img class=wgi src='"+ou+mfc[i+3].u+"'>"+mfc[i+3].dn+"</a></center></td>";
        s += "</tr>";
        $("#myfct").append(s);
    }
    $(".wgi").hover(function(){this.className = "wgihov"},function(){this.className = "wgi"});
    nav_men_h();
}

// v1.7 (1/26/07)
jQuery.fn.corner = function(o) {
    function hex2(s) {
        var s = parseInt(s).toString(16);
        return ( s.length < 2 ) ? '0'+s : s;
    };
    function gpc(node) {
        for ( ; node && node.nodeName.toLowerCase() != 'html'; node = node.parentNode  ) {
            var v = jQuery.css(node,'backgroundColor');
            if ( v.indexOf('rgb') >= 0 ) {
                rgb = v.match(/\d+/g);
                return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
            }
            if ( v && v != 'transparent' )
                return v;
        }
        return '#ffffff';
    };
    function getW(i) {
        switch(fx) {
        case 'round':  return Math.round(width*(1-Math.cos(Math.asin(i/width))));
        case 'cool':   return Math.round(width*(1+Math.cos(Math.asin(i/width))));
        case 'sharp':  return Math.round(width*(1-Math.cos(Math.acos(i/width))));
        case 'bite':   return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));
        case 'slide':  return Math.round(width*(Math.atan2(i,width/i)));
        case 'jut':    return Math.round(width*(Math.atan2(width,(width-i-1))));
        case 'curl':   return Math.round(width*(Math.atan(i)));
        case 'tear':   return Math.round(width*(Math.cos(i)));
        case 'wicked': return Math.round(width*(Math.tan(i)));
        case 'long':   return Math.round(width*(Math.sqrt(i)));
        case 'sculpt': return Math.round(width*(Math.log((width-i-1),width)));
        case 'dog':    return (i&1) ? (i+1) : width;
        case 'dog2':   return (i&2) ? (i+1) : width;
        case 'dog3':   return (i&3) ? (i+1) : width;
        case 'fray':   return (i%2)*width;
        case 'notch':  return width; 
        case 'bevel':  return i+1;
        }
    };
    o = (o||"").toLowerCase();
    var keep = /keep/.test(o);                       // keep borders?
    var cc = ((o.match(/cc:(#[0-9a-f]+)|/)||[])[1]);  // corner color
    var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);  // strip color
    var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10; // corner width
    var re = /round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;
    var fx = ((o.match(re)||['round'])[0]);
    var edges = { T:0, B:1 };
    var opts = {
        TL:  /top|tl/.test(o),       TR:  /top|tr/.test(o),
        BL:  /bottom|bl/.test(o),    BR:  /bottom|br/.test(o)
    };
    if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )
        opts = { TL:1, TR:1, BL:1, BR:1 };
    var strip = document.createElement('div');
    strip.className = "cornrcs";
    strip.style.overflow = 'hidden';
    strip.style.height = '1px';
    strip.style.backgroundColor = sc || 'transparent';
    strip.style.borderStyle = 'solid';
    return this.each(function(index){
        var pad = {
            T: parseInt(jQuery.css(this,'paddingTop'))||0,     R: parseInt(jQuery.css(this,'paddingRight'))||0,
            B: parseInt(jQuery.css(this,'paddingBottom'))||0,  L: parseInt(jQuery.css(this,'paddingLeft'))||0
        };

        if (jQuery.browser.msie) this.style.zoom = 1; // force 'hasLayout' in IE
        if (!keep) this.style.border = 'none';
        strip.style.borderColor = cc || gpc(this.parentNode);
        var cssHeight = jQuery.curCSS(this, 'height');

        for (var j in edges) {
            var bot = edges[j];
            strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');
            var d = document.createElement('div');
            var ds = d.style;

            bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);

            if (bot && cssHeight != 'auto') {
                if (jQuery.css(this,'position') == 'static')
                    this.style.position = 'relative';
                ds.position = 'absolute';
                ds.bottom = ds.left = ds.padding = ds.margin = '0';
                if (jQuery.browser.msie)
                    ds.setExpression('width', 'this.parentNode.offsetWidth');
                else
                    ds.width = '100%';
            }
            else {
                ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' : 
                                    (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';                
            }

            for (var i=0; i < width; i++) {
                var w = Math.max(0,getW(i));
                var e = strip.cloneNode(false);
                e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';
                bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
            }
        }
    });
};
var ct=[{pn:"4thofJuly",dn:"4th of July"},{pn:"summerComments",dn:"Summer Comments"},{pn:"angels",dn:"Angels"},{pn:"apologies",dn:"Apologies"},{pn:"autumnGreetings",dn:"Autumn Greetings"},{pn:"autumnGraphics",dn:"Autumn Graphics"},{pn:"avatars",dn:"Avatars"},{pn:"birthday",dn:"Birthday"},{pn:"blessings",dn:"Blessings"},{pn:"christianSymbols",dn:"Christian Symbols"},{pn:"christianDolls",dn:"Christian Dolls"},{pn:"crazyKittens",dn:"Crazy Kittens"},{pn:"dangleCharms",dn:"Dangle Charms"},{pn:"flowers",dn:"Flowers"},{pn:"friendshipAndLove",dn:"Friendship & Love"},{pn:"godBlessAmerica",dn:"GB America"},{pn:"greetings",dn:"Greetings"},{pn:"honorMemory",dn:"Honor Memory"},{pn:"hugs",dn:"Hugs"},{pn:"humorous",dn:"Humorous"},{pn:"patrioticHonor",dn:"Patriotic Honor"},{pn:"profileExtras",dn:"Profile Extras"},{pn:"religiousImagery",dn:"Religious Imagery"},{pn:"scriptures",dn:"Scriptures"},{pn:"september11th",dn:"September 11th"},{pn:"shoutOuts",dn:"Shout Outs"},{pn:"specialOccasions",dn:"Special Occasions"},{pn:"thanksforAdd",dn:"Thanks for Add"},{pn:"xOXO",dn:"XOXO"}];