function get_object ( id )
{

	if ( document.getElementById ) // this is the way the standards work
		id_object = document.getElementById( id );
	else if ( document.all ) // this is the way old msie versions work
    	id_object = document.all[id];
	else if ( document.layers ) // this is the way nn4 works
		id_object = document.layers[id];
		
	return id_object;
	
}

function show_faq_answer ( id ) {
	
	close_faq_all();
	
	var temp_id = "faq_answer_" + id;
	var answer_object = get_object( temp_id );
	answer_object.style.display = 'block';
	
}

function close_faq_all () {
	
	for ( var i = 1; i <= 7; i++ )
	{
		
		var temp_id = "faq_answer_" + i;
		var answer_object = get_object( temp_id );
		answer_object.style.display = 'none';
		
	}
		
}

var video_sub_count;

function show_video_sub ( id ) {
	
	close_video_all();
	
	var temp_id = "videos_" + id;
	var sub_object = get_object( temp_id );
	sub_object.style.display = 'block';
	
}

function close_video_all () {
	
	for ( var i = 1; i <= video_sub_count; i++ )
	{
		
		var temp_id = "videos_" + i;
		var sub_object = get_object( temp_id );
		sub_object.style.display = 'none';
		
	}
		
}

function main_image_change ( id, folder )
{

	var img_src = "img/" + folder + "/main_" + id + "_large.jpg";
	document.main_image_img.src = img_src;
	
	var info_object = get_object( 'main_info' );
	
	var source_name = "main_info_" + id;
	var source_object = get_object( source_name );
	
	info_object.innerHTML = source_object.innerHTML;
	
}

var feature_count;

function set_feature_count ( count )
{
	
	feature_count = count;
	
}

function feature_change ( id )
{
	
	if ( id != 0 )
	{
		
		var temp_id = "feature_" + id;
		var feature_object = get_object( temp_id );
		feature_object.style.display = 'block';
		
		var image_object = get_object( 'plow_isolated' );
		image_object.style.display = 'none';
		
	} else {
	
		var image_object = get_object( 'plow_isolated' );
		image_object.style.display = 'block';
		
		for ( var i = 1; i <= feature_count; i++ )
		{
			
			var temp_id = "feature_" + i;
			var feature_object = get_object( temp_id );
			feature_object.style.display = 'none';
			
		}
		
	}	
	
}

function open_window ( url )
{

	window.open( url,'blizzard_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=600,height=400');

}

function open_video_window ( video_file )
{
	
	var url = 'video_view.asp?video_file=' + video_file;
	window.open( url,'blizzard_video_window','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=600,height=420');

}

function makeWin(file, window, tmpwidth, tmpheight, tmpScrollBars) {
    msgWindow = open(file, window, 'resizable=no,width=' + tmpwidth + ',height=' + tmpheight + ',scrollbars=' + tmpScrollBars + ',location=0');
    if (msgWindow.opener == null) msgWindow.opener = self;
}