
function linkToCards_OLD(title,category)
{
        window.location="/stores/mickeys/Search.bok?category=" + title + "_cards"
}

function ClearAll()
{
	var ml = document.messageList;
	var len = ml.elements.length;
	for (var i = 0; i < len; i++) {
	    var e = ml.elements[i];
	    if (e.name == "Mid") {
		alert(e);
	    }
	}
	ml.toggleAll.checked = false;
}

//    var kkk = '&keyword=' + document.forms['cartstart'].grade.value + " " +  document.forms['cartstart'].team.value

//four_across
var flag=0;

function linkToCards(title)
{
        var sport;
        sport = args['category'].split('_')[0];
	window.location="/stores/mickeys/Search.bok?category=" + title + "_cards" + "&sport=" + sport;
}

function addImage(loc,w,h)
{
 if(w.length == 0 || h.length == 0) 
 {
    document.write('<img border="0" align="right" src="'+loc+'">');
 }
 else 
 {
    document.write('<img border="0" align="right" src="'+loc+'" width="'+w+'" height="'+h+'">');
 }
}

function addImagePos(loc,w,h,pos)
{
 if(w.length == 0 || h.length == 0) 
 {
    document.write('<img border="0" hspace=10 vspace=4 align="'+pos+'"  src="'+loc+'">');
 }
 else 
 {
    document.write('<img border="0" hspace=10 vspace=4 align="'+pos+'" src="'+loc+'" width="'+w+'" height="'+h+'">');
 }
}


function addLink(loc)
{
    document.write("<a href=javascript:linkToCards('"+loc+"') >" );
}


function add_row()
{
// to increase or decrease the number of columns in your row, increase or decrease the flag number 
// i.e., flag < 4 for a four column layout, flag < 2 for a two column layout. 
// Then change the colspan to reflect the number of columns you are spanning based on the flag number. 
// Also, the percentage may need to change on the text columns to be visually pleasing. 
// If you are displaying an odd number of columns in your layout
//  go to Store Manager under "Search and Cart Options"
//  change the max # of items to show on a page to an odd number rather that an even number.
  if (flag < 3)
  {
    flag+=1;
  }
  else
  {
    document.write('</tr><tr valign="top"><td colspan="6"><BR></td></tr><tr valign="top">');
    flag=1;
  }
}
