function mainJumper() {
  var indx = document.quickjump.toggle.selectedIndex;
  var url  = document.quickjump.toggle.options[indx].value;
  if(url != "-")
    { location.href = url; }
  else
    { document.quickjump.toggle.selectedIndex = 0; }
}

function sportJumper() {
  var indx = document.sportjump.list.selectedIndex;
  var url  = document.sportjump.list.options[indx].value;
  if(url != "-")
    { location.href = url; }
  else
    { document.sportjump.list.selectedIndex = 0; }
}


function resultJumper(filename, aos, sort_field, start_limit, field_name)
  { var idx = eval("document.deledit." + field_name + ".selectedIndex");
	var aaa = eval("document.deledit." + field_name + ".options[idx].value");
	
	var rr = readCookie('cohs_settings');
	createCookie('cohs_settings', aaa, 364);
	
    location.href = filename + ".php?control=view&asc_or_desc=" + aos + "&sorter=" + sort_field + "&start_limit=" + start_limit + "&res_per_page=" + aaa;
  }


function picJumper() {
  var indx = document.pics.new_photo.selectedIndex;
  var url  = document.pics.new_photo.options[indx].value;
  if(url != "-")
    { location.href = url; }
  else
    { document.pics.new_photo.selectedIndex = 0; }
}



function season_jumper(sp_id, func_name) {
  var indx = document.season_jump.s_id.selectedIndex;
  var seas_id  = document.season_jump.s_id.options[indx].value;
  var f_string = "";
  
  if(func_name != "")
    { f_string = "&f=" + func_name; }
  
  var url  = "./?id=" + sp_id + "&season_id=" + seas_id + f_string;
  
  if(url != "-")
    { location.href = url; }
  else
    { document.season_jump.s_id.selectedIndex = 0; }
}

function season_jumper_lite() {
  var indx = document.season_jump.s_id.selectedIndex;
  var seas_id  = document.season_jump.s_id.options[indx].value;
  
  var url  = "./?season_id=" + seas_id;
  
  if(url != "-")
    { location.href = url; }
  else
    { document.season_jump.s_id.selectedIndex = 0; }
}



function photo_jumper(a)
  { location.href = "./?c=" + a; }

function act(a,b) {
 if(document.images)
   document[a].src = eval(a + 'on.src');
   if(!b)
   { b=''; }
    window.status=b;
   }
   
function inact(a) {
 if (document.images)
   document[a].src = eval(a + 'off.src');
   window.status=' ';
   }
      
function statmsg(a) {
window.status = a;
}

function unstat() {
window.status = ' ';
}

function acrobatics(file_name, form_name, control)
  { indx = eval("document." + form_name + ".id.selectedIndex");
	id_num = eval("document." + form_name + ".id.options[indx].value");
	
	file_string = ".php?control=";
	loc1 = file_name + file_string;
	
	var_string = "&get=1&id=";
	loc2 = control + var_string;
	
	ampers = "&";
	loc3 = id_num + ampers;
	
	trail = "_id=on";
	loc4 = id_num + trail;
	
	loc = loc1 + loc2 + loc3 + loc4;
	document.location.href = loc;
  }



function cloak_and_dagger(a,b)
  { c = a.length - b;
    d = a.substring(c);
    e = a.substring(0,c);
    
    location.href = "mailto:" + d + e + "@cohs.com"; 
  }


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);
}
