// JavaScript Document
function ajaxTriggered(address,targetDiv){
	$.ajax({
	  url: "fetchItems.php?"+address,
	  cache: false,
	  success: function(data){
		$('#'+targetDiv).html(data);
		$('#extraInfoHolder').animate({ height: 303, opacity: "0.7"}, "slow");
		$('#topImage').animate({opacity: "show"}, 850);
	  }
	});
	$("#loading").ajaxStart(function(){
	   $(this).show();
	 });
	 $("#loading").ajaxStop(function(){
	   $(this).hide();
	 });
}

function changeColor(linkName,sNum){
	if(sNum == 's1'){
		$('#'+linkName).addClass("static");
	} else if(sNum == 's2'){
		$('#'+linkName).addClass("linkPointer");
	}
}
function itemsSetting(item1,item2){
	$('#'+item1).change(function(){
		var index = $('#'+item1)[0].selectedIndex; 
		 $('#'+item2).attr("selectedIndex", index);
	});
	$('#'+item2).change(function(){
		var index = $('#'+item2)[0].selectedIndex; 
		 $('#'+item1).attr("selectedIndex", index);
	});
	return true;
}